Rate This Document
Findability
Accuracy
Completeness
Readability

Creating an HPC Application Analysis Task

Function

The tool collects Performance Monitor Unit (PMU) events of the system and the key metrics of OpenMP and MPI applications to help accurately obtain the serial and parallel time of the parallel region and barrier-to-barrier, calibrated L2 microarchitecture metrics, instruction distribution, L3 usage, and memory bandwidth.

SVE and SME instruction collection can be collected for some servers equipped with the new Kunpeng 920 processor model but not for servers equipped with Kunpeng 920.

During OpenMP data collection, the kernel parameters /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid are enabled to collect call graph data and PMU events. After the collection is complete, the two kernel parameters are restored to their original values.

Table 1 provides the tutorials.

Table 1 Tutorials

Category

Scenario

Link

Code Samples

HPC application analysis

Prerequisites

  • At least one node has been installed successfully.
  • HPC application analysis is only applicable to physical servers powered by Kunpeng 920 processors, because the top-down and DRAM bandwidth data in HPC application tasks requires OS kernel 4.19 or later or patched openEuler 4.14 or later.
  • On an Ubuntu OS, data may fail to be collected in an HPC application analysis task. For details, see Failed to Collect HPC Application Analysis Task Data on Ubuntu. Ubuntu 20.04.1 does not support HPC application analysis.
  • To use MPICH, add the path of libmpi.so.12 to LD_LIBRARY_PATH, which is generally the lib folder in the MPICH installation path.
  • The C, C++, and Fortran programming languages must be enabled for MPI (Open MPI/MPICH). For example, for Open MPI that uses the GCC, run --enable-mpi-compatibility CC=gcc CXX=g++ FC=gfortran to enable C, C++, and Fortran.
  • Choose Open MPI 4.1.6 (preferred) or a later version and MPICH 4.3.0 (preferred) or a later version.

Procedure

  1. Click next to System Profiler.

    Choose General Analysis from the drop-down list. The page for creating a task is displayed.

  2. Set task parameters by referring to "Task Management" and Table 2.
    See Figure 1.
    Figure 1 Creating an HPC application analysis task
    Table 2 Parameters for creating an HPC application analysis task

    Parameter

    Description

    Task Name

    Task name. The name must meet the following requirements:

    • Contain only letters, digits, and underscores (_).
    • Contain 1 to 64 characters.

    Analysis Type

    Select HPC Application.

    Analysis Object

    Select Application. Currently, only Application is supported.

    Mode

    Select Launch application. Currently, only Launch application is supported.

    This parameter is mandatory when Analysis Object is set to Application.

    Application Path

    Enter the absolute path of the application to be analyzed. For example, to analyze the loop_test application stored in the /home/test directory, enter /home/test/loop_test.

    NOTE:
    • By default, applications in the /opt/ or /home/ directory are analyzed. The administrator can click in the upper right corner on the home page and choose Tool Settings > System Profiler > System Settings, and enter application paths (separated by semicolons) in the Application Path text box. Only administrators can modify this parameter. Common users can only view this parameter.
    • You are advised to set the application path to a path such as /home or /opt. Do not set the application path to a system directory such as /, /dev, /sys, or /boot. Otherwise, system exceptions may occur.
    • The DevKit installation user must have the read and execute permissions on the applications to be analyzed.
    • In the multi-node scenario, you can enable Configure Node Parameters to configure this parameter separately for each node.

    (Optional) Application Parameters

    Set application parameters based on the actual scenario.

    NOTE:

    You can enable Configure Node Parameters to configure this parameter separately for each node.

    Analysis Mode

    Possible values are Statistical analysis (default) and Refined analysis.

    NOTE:

    SSH password-free login must be configured for nodes running MPI tasks. If it is not configured, enable SSH password-free login for the user who runs the mpirun process.

    Shared Directory

    Shared directory for analysis.

    The shared directory must start with /opt/ or /home/. If you need to use another path, perform operations following instructions in Configuring the Application Path. For details about how to configure a path as a common user, contact the administrator.

    NOTE:

    Properly configure the permissions on the shared directory to prevent network security risks caused by excessive permissions.

    mpirun Running Node

    Node where the mpirun process is running.

    mpirun Path

    MPI path.

    (Optional) mpirun Parameter

    Used for setting the MPI environment variable -x.

    NOTE:

    Specify the task node (for example, --hostfile) in the parameter. If only the -np parameter is entered, the task will be randomly sent to a node. As a result, the cluster and MPI operating environment are inconsistent, and the task fails.

    Sampling Mode

    Data sampling mode. The default value is Detail. This parameter is mandatory when Analysis Mode is set to Statistical analysis.

    • Summary: collects basic metrics. This mode has low sampling and analysis overheads.
    • Detail: collects hot functions and detailed metrics. This mode has high sampling and analysis overheads.

    Sampling Duration (s)

    Sampling duration, in seconds. The default value is 300.

    • When Analysis Mode is set to Statistical Analysis and Sampling Mode is set to Summary, the value range is 1 to 1,800.
    • When Analysis Mode is set to Statistical Analysis and Sampling Mode is set to Detail, the value range is 1 to 600.
    • When Analysis Mode is set to Refined analysis, the value range is 1 to 600.

    If the entered value is outside the allowed range, an error message is displayed. By default, Limited application running time is selected. If you select Unlimited application running time, data will be collected until the application finishes running.

    NOTE:
    • A longer sampling duration requires more memory resources and a longer analysis duration. If you select Unlimited for Sampling Duration, ensure that the application stops before system resources are used up.
    • The task may fail if the sampling duration is too short and the application running has not been completed.

    Sampling Delay (s)

    The sampling starts after the specified time. This parameter is used to ignore the program startup analysis, warm up the sampling program, and eliminate sampling delay caused by factors such as environment detection. The default value is 0. In Summary mode, the value range is 0 to 900. In Detail mode, the value range is 0 to 599. If the entered value is outside the allowed range, an error message is displayed.

    (Optional) MPI Only

    Only MPI data is collected while OpenMP data is not.

    This parameter is disabled by default. It is available in Advanced Settings when Analysis Mode is set to Statistical analysis.

    (Optional) Collect Critical Path

    This parameter is disabled by default. It is available when Analysis Mode is set to Statistical analysis.

    (Optional) Basic Information Collection

    Indicates whether to collect RDMA or shared storage data. By default, this option is not selected. It can be selected when Analysis Mode is set to Refined analysis.

    Basic Information Sampling Interval (s)

    Interval for sampling RDMA or shared storage data. The default value is 1. The value range is 1 to 15. This parameter is available when Analysis Mode is set to Refined analysis.

    (Optional) Collect More Call Stack Statistics

    Indicates whether to collect call stacks and top-down events. This parameter is disabled by default. It is available in Advanced Settings when Analysis Mode is set to Refined analysis.

  3. Click OK.

    You can click the icons next to the task name to perform the following operations:

    • : cancels the analysis task. After an analysis task is canceled, the collected information will be deleted. You can also use this button to start an analysis task. Starting analysis will interrupt the current collection and use the collected data for analysis. The task may fail because the application is stopped.
    • : restarts the analysis task. You can modify task parameter settings and restart an analysis task. This button is available when a task is canceled or fails.
    • : deletes the analysis task. After a task is deleted, all data of this task will be deleted. Exercise caution when performing this operation.
    • : performs the analysis again. The analysis task is renamed and restarted.
    • : changes the task or report name. The report naming rule is the same as that of a task.