| United States-English |
|
|
|
![]() |
HP-MPI User's Guide > Chapter 4 ProfilingUsing counter instrumentation |
|
Counter instrumentation is a lightweight method for generating cumulative runtime statistics for your MPI applications. When you create an instrumentation profile, HP-MPI creates an output file in ASCII format. You can create instrumentation profiles for applications linked with the standard HP-MPI library. For applications linked with HP-MPI version 2.1 or later, you can also create profiles for applications linked with the thread-compliant library (-lmtmpi). Instrumentation is not supported for applications linked with the diagnostic library (-ldmpi). Counter instrumentation is a lightweight method for generating cumulative runtime statistics for MPI applications. When you create an instrumentation profile, HP-MPI creates an ASCII format file containing statistics about the execution. Instrumentation is not supported for applications linked with the diagnostic library (-ldmpi). The syntax for creating an instrumentation profile is: mpirun -i prefix[:l][:nc][:off] where
For example, to create an instrumentation profile for an executable called compute_pi: % $MPI_ROOT/bin/mpirun -i compute_pi -np 2 compute_pi This invocation creates an ASCII file named compute_pi.instr containing instrumentation profiling. Although -i is the preferred method of controlling instrumentation, the same functionality is also accessible by setting the MPI_INSTR environment variable. Refer to “MPI_INSTR” for syntax information. Specifications you make using mpirun -i override any specifications you make using the MPI_INSTR environment variable. By default, the entire application is profiled from MPI_Init to MPI_Finalize. However, HP-MPI provides the nonstandard MPIHP_Trace_on and MPIHP_Trace_off routines to collect profile information for selected code sections only. To use this functionality:
The ASCII instrumentation profile is a text file with the .instr extension. For example, to view the instrumentation file for the compute_pi.f application, you can print the prefix.instr file. If you defined prefix for the file as compute_pi, as you did when you created the instrumentation file in “Creating an instrumentation profile ”, you would print compute_pi.instr. The ASCII instrumentation profile provides the version, the date your application ran, and summarizes information according to application, rank, and routines. Figure 4-1 “ASCII instrumentation profile” is an example of an ASCII instrumentation profile. The information available in the prefix.instr file includes:
Figure 4-1 “ASCII instrumentation profile” displays the contents of the example report compute_pi.instr. Figure 4-1 ASCII instrumentation profile
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||