|
Article ID: 444
Last updated: 10 May, 2022
MPInside, an MPI application performance analysis and diagnostic tool from HPE, is a lightweight program that can be used with thousands of ranks. The tool is profile-based via PMPI, the MPI standard profiling interface. An MPInside analysis can provide you with communication statistics (collective and point-to-point) as well as information that can help you diagnose communication issues such as:
In addition to MPI communication profiling, MPInside provides the following optional features:
MPInside supports the full MPI 2.2 standard and the commonly used MPI libraries: HPE MPT, Intel MPI, and OpenMPI. Note: Some features may be limited to HPE MPT. Basic UsageMost features of MPInside do not require instrumentation, recompiling, or relinking of your application. However, using the -g compiler flag is recommended. The basic MPInside measurement produces a flat profile. No information is provided about the source lines that make the MPI calls. Environment SetupTo set up your environment to use MPInside, load the MPInside module and an MPI library module. Set the MPINSIDE_LIB environment variable to match the MPI library module. For example:
Note: MPINSIDE_LIB defaults to MPT. Communication ProfilingTo perform an analysis using MPInside, run the following commands (where XX = the number of MPI processes):
Note: The MPInside command is case-sensitive. By default, MPInside measures the elapsed times of the MPI functions and collects message statistics. After the MPI application completes successfully, the measurement and the statistics data are reported in a text file called mpinside_stats. This output file contains five sections:
You can import the mpinside_stats file to an Excel spreadsheet and plot the data for visual analysis (for example, analysis of possible load imbalance or communication characteristics). You can also compute derived metrics, such as average message size, from the mpinside_stats file. Additional FeaturesMPInside uses environment variables to set all of its options. These optional variables are documented in the mpinside man page. Recommended FeaturesWe recommend the following settings:
Advanced FeaturesThe advanced features described below may also be useful. MPINSIDE_SHOW_READ_WRITEMeasures the I/O time and includes several columns in the mpinside_stats output file indicating the time, number of Mbytes, and number of calls associated with the libc I/O functions. Note that the MPI function times and I/O times are subtracted from the total elapsed run times, and the result is reported as "Comput" time. MPINSIDE_SIZE_DISTRI [T+]nb_bars[:first-last]Prints a histogram of the request sizes distribution at the end of mpinside_stats for each rank specified in [:first-last]. If T+ is specified, size distribution time histograms are also printed. For example, setting MPINSIDE_SIZE_DISTRI to T+12:0-47 will print two histograms, as follows, for each rank (from 0 to 47) at the end of mpinside_stats:
MPINSIDE_CALLSTACK_DEPTH
Unwinds the stack up to the depth specified, and creates an mpinside_clstk.xxx file for each rank. The mpinside_clstk.xxx files can be post-processed with the utility MPInside_post -l to get the routine names and source line numbers. Use the -h option of MPInside_post to get more information. MPINSIDE_EVAL_COLLECTIVE_WAITChecks whether a slow collective operation (such as MPI_Bcast or MPI_Allreduce) is caused by some ranks reaching the rendezvous point much later than others. Setting this variable will put an MPI_Barrier and time it before any MPI collective operation. This assumes that the time of a collective operation is the sum of the time for all processors to synchronize plus the time of the actual operation (i.e, the physical transfer of data). In the mpinside_stats output file, the "b_xxx" column will give the MPI_Barrier time of the corresponding xxx MPI collective function, and the "xxx" column gives the remaining time. MPINSIDE_EVAL_SLTChecks whether a slow point-to-point communication is caused by late senders. Setting this variable will measure the time the Sends arrived late compared to Recv or Wait arrivals. In the mpinside_stats output file, the column "w_xxx" (for example, w_wait or w_recv) represents the send-late-time (SLT) for the corresponding xxx function. Note: The MPINSIDE_EVAL_COLLECTIVE_WAIT and MPINSIDE_EVAL_SLT variables are useful for identifying some problems that are intrinsic to an application, i.e., issues that cannot be remedied even with an ideal system (zero latency and infinite bandwidth). References
|