Compiling and Linking MPI Applications. STMicroelectronics PGI
Mainos
Mainos
MPI Overview
Compiling and Linking MPI Applications
The PGI compilers provide an option,
-Mmpi=
, to make building MPI applications more convenient by adding the MPI include and library directories to the compiler's include and library search paths. The compiler determines the location of these directories using various mechanisms described in the MPI implementationspecific sections later in this chapter.
lists the
-Mmpi=
suboptions for each of the supported implementations.
Table 6.1. MPI Implementation Options
This MPI implementation...
Requires this option...
MPICH-1
MPICH-2
MVAPICH
HP-MPI
MSMPI
OpenMPI
-Mmpi=mpich1
-Mmpi=mpich2
-Mmpi=mvapich1
-Mmpi=hpmpi
-Mmpi=msmpi
-Mmpi
not supported. Use compiler wrappers.
Debugging MPI Applications
The PGI debugger, PGDBG, provides support for symbolic debugging of MPI applications. In PGI Workstation, this support is limited in two ways:
• The application processes must ron on a system where PGI Workstation is installed.
• The number of processes is limited, controlled by the license key.
For all implementations of MPI except MPICH-1, you use the PGDBG command to initiate an MPI debugging session. For example, you might invoke an HP-MPI session as follows:
% pgdbg -mpi:/opt/hpmpi/bin/mpirun -np 4 my_mpi_app
For specific information on how to initiate a debugging session for your instance of MPI, refer to the implementation-specific sections available later in this chapter.
PGDBG can display the contents of message queues for instances of MPI that have been configured to support that feature. The version of MPICH-1 provided with PGI Workstation as well as HP-MPI function properly. If you are using MPICH-2 or MVAPICH, these must be built and configured correctly. Further, MSMPI does not support dumping of message queue contents.
For more information on MPI and displaying message queues, refer to the documentation for your specific implementation.
74
Note
When you build an MPI application, you must use these options in both the compile and link steps.
Lataa
Mainos