Using MPE in MPICH


Up: Using MPE Next: Compilation and Linkage Previous: Display Program Selector

MPE has been seamlessly integrated into MPICH distribution, so user may find it easier to use MPE when using it with MPICH. Here are the differences of using MPE with MPICH and with other MPI implementations.



Up: Using MPE Next: Compilation and Linkage Previous: Display Program Selector


Compilation and Linkage


Up: Using MPE in MPICH Next: Inheritance of Environmental Variables Previous: Using MPE in MPICH

MPICH provides scripts to help users to compile and link C/C++ and F77/F90 programs. They are mpicc for C programs, mpiCC for C++ programs, mpif77 for F77 and mpif90 for F90 programs. In addition, these 4 scripts allows special options to be used to link with MPE profiling libraries. These options are :

-mpitrace
- to compile and link with tracing library.
-mpianim
- to compile and link with animation libraries.
-mpilog
- to compile and link with logging libraries.

For instance, the following command creates executable, fpilog, which generates logfile when it is executed.


mpif77 -mpilog -o fpilog fpilog.f  

For other MPI implementations, user needs to compile and link their application with MPE profiling libraries explicitly as shown in the example makefile.



Up: Using MPE in MPICH Next: Inheritance of Environmental Variables Previous: Using MPE in MPICH


Inheritance of Environmental Variables


Up: Using MPE in MPICH Next: Viewing Logfiles Previous: Compilation and Linkage

MPE relies on certain environmental variables (e.g. TMPDIR). These variables determine how MPE behaves. It is important to make sure that all the MPI processes receive the intended value of environmental variables. The complication of this issue comes from the fact that MPICH contains many different devices for different platforms, some of these devices have a different way of passing of environmental variables to other processes. The often used devices, like ch_p4 and ch_shmem, do not require special attention to pass the value of the environmental variable to spawned processes. The spawned process inherits the value from the launching process as long as the environmental variable in the launching process is set. But this is NOT true for all the devices, for instance, the ch_p4mpd device may require a special option of mpirun to be used to set the environmental variables to all processes.


mpirun -np N cpilog -MPDENV- MPE_LOG_FORMAT=SLOG 

In this example, the option -MPDENV- is needed to make sure that all processes have their environmental variable, MPE_LOG_FORMAT, set to SLOG.

For other MPI implementations, how environmental variables are passed remains unchanged. User needs to get familar with the environment and set the environmental variables accordingly.



Up: Using MPE in MPICH Next: Viewing Logfiles Previous: Compilation and Linkage


Viewing Logfiles


Up: Using MPE in MPICH Next: Debugging MPI programs with built-in tools Previous: Inheritance of Environmental Variables

MPE's install directory structure is the same as MPICH's. So all MPE's utility programs will be located in MPICH's bin/ directory. To view a logfile, say fpilog.slog, do


logviewer fpilog.slog 

The command will select and invoke Jumpshot-3 to display the content of SLOG file if Jumpshot-3 has been built and installed successfully.



Up: Using MPE in MPICH Next: Debugging MPI programs with built-in tools Previous: Inheritance of Environmental Variables