12.07.2015 Views

PGI User's Guide

PGI User's Guide

PGI User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6. Using MPIyou are using MPICH-2 or MVAPICH, these must be built and configured correctly. Further, MSMPI does notsupport displaying message queue contents.For more information on MPI and displaying message queues, refer to the documentation for your specificimplementation.Profiling MPI ApplicationsThe <strong>PGI</strong> performance profiler, PGPROF, provides support for profiling MPI applications. The number ofprocesses that can be profiled is limited by your license. PGPROF instrumentation is inserted into the programby the compiler, and after the program is executed, the PGPROF profiler can display MPI message countstatistics as they relate to the source code of the application and the time spent in those portions of theapplication.To create and view a performance profile of your MPI application, you must first build an instrumented versionof the application using the -Mprof= option to specify one of the MPI implementations. The -Mprof= optionrequires that you use another profiling sub-option in conjunction with the MPI implementation suboptions,listed in Table 6.2.NoteWhen you build an MPI application for profiling, you must use these options in both the compile andlink steps.Table 6.2. MPI Profiling OptionsThis MPI implementation... Requires this profiling option...MPICH-1MPICH-2MVAPICHHP-MPIMSMPIOpenMPI-Mprof=mpich1,{func|hwcts|lines|time}-Mprof=mpich2,{func|hwcts|lines|time}-Mprof=mvapich1,{func|hwcts|lines|time}-Mprof=hpmpi,{func|hwcts|lines|time}-Mprof=msmpi,{func|lines}Use OpenMPI compiler wrappers with-Mprof={func|hwcts|lines|time}For example, you can use the following command to compile for profiling with MPICH-2:% pgfortran -fast -Mprof=mpich2,func my_mpi_app.f90NoteThe default versions of the compilation scripts, such as mpicc and mpif90, that are provided bysome MPI distributions, do not correctly support the -Mprof option. For best results, use the <strong>PGI</strong>compiler drivers in place of these scripts.For OpenMPI, refer to the <strong>PGI</strong> Workstation Installation <strong>Guide</strong> for more information on configuring theOpenMPI compiler wrappers to work with the <strong>PGI</strong> compilers on your system.75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!