Quantcast
Viewing all articles
Browse latest Browse all 1853

Configuring MPI Application Analysis

To collect performance data for an MPI application with the Intel® VTune™ Amplifier, use the following command:

$ mpirun-genvall-n <n> -l amplxe-cl -result-dir my_result -quiet -collect <analysis type> my_app [my_app_ options]

Note

To view the list of available analysis types, use amplxe-cl-help collect command.

where:

  • -genvall option of the mpiexec tool verifies that the user environment variables are passed to all instances of the profiled process. Otherwise, by default the processes are launched in the context of a system account and some environment variables (USERPROFILE, APPDATA) do not point where the tools expect them to point to.

  • <n> is the MPI process rank detected and captured by the collector automatically. As a result, the VTune Amplifier creates a number of result directories in the current directory, named as my_result.0, my_result.1, ... my_result.n, where the numeric suffix n corresponds to the MPI process rank. Using the suffix guarantees that multiple amplxe-cl instances launched in the same directory on different nodes do not overwrite the data of each other and can work in parallel. So, the VTune Amplifier creates a separate result directory for each analyzed process in the job.

    Note

    For hardware event-based sampling analysis types, the VTune Amplifier can collect single MPI ranks only. For example:

    $ mpirun -n 1 amplxe-cl -c advanced-hotspots -r ah -- ./test.x : -n 3 ./test.x

    To run event-based sampling analysis for several processes on one node, consider using -analyze-system option, for example:

    $ mpirun -host myhost -n 11 ./a.out : -host myhost -n 1 amplxe-cl -result-dir foo -c advanced-hotspots -analyze-system ./a.out

    But this type of analysis configuration can collect ITT API (for example, Task and Frame analysis) and rank data only for the launched process.

  • -l option of the mpiexec/mpirun tools marks stdout lines with an MPI rank.

  • -quiet / -q option suppresses the diagnostic output like progress messages.

To collect data for a subset of MPI processes in the workload, use the per-host syntax of mpirun/mpiexec* and specify different command lines to execute for different processes.

Examples

  1. This example runs the Hotspots analysis type recommended as a starting point:

    $ mpirun-n 4 amplxe-cl -result-dir my_result -collect hotspots -- my_app [my_app_ options]

  2. This example collects Hotspots data for two out of 16 processes in the job distributed across the hosts:

    $ mpirun-host myhost -n 14 ./a.out : -host myhost -n 2 amplxe-cl -result-dir foo -c hotspots ./a.out

    As a result, the VTune Amplifier creates two directories in the current directory: foo.14 and foo.15 (given that process ranks 14 and 15 were assigned to the last two processes in the job).

  3. As an alternative to the previous example, you can create a configuration file with the following content:

    # config.txt configuration file
    -host myhost -n 14 ./a.out
    -host myhost -n 2 amplxe-cl -quiet -collect hotspots -result-dir foo ./a.out

    and run the data collection as:

    $ mpirun-configfile ./config.txt

    to achieve the same result as in the previous example: foo.14 and foo.15 result directories are created.

  4. Similarly, this example uses specific host names to control where the analyzed processes are executed:

    # config.txt configuration file
    -host myhost1 -n 14 ./a.out
    -host myhost2 -n 2 amplxe-cl -quiet -collect hotspots -result-dir foo ./a.out

    When you mention the host names, the VTune Amplifier allocates consecutive MPI ranks to the specified hosts. In this example, ranks 0 to 13, inclusive, will be assigned to myhost1. The remaining ranks 14 and 15 will be assigned to myhost2.

Note

The examples above use the mpirun command as opposed to mpiexec and mpiexec.hydra while real-world jobs might use the mpiexec* ones. mpirun is a higher-level command that dispatches to mpiexec or mpiexec.hydra depending on the current default and options passed. All the listed examples work for the mpiexec* commands as well as the mpirun command.

Inglese

Viewing all articles
Browse latest Browse all 1853

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>