我要评分
获取效率
正确性
完整性
易理解

HPC Debugger Functions

High-performance computing (HPC) is a computing method and technology that uses large-scale, high-speed, and parallel computer systems to solve complex scientific, engineering, and business problems. HPC aims to accelerate problem solving and improve computation precision by using a substantial number of computing resources and parallel processing capabilities.

The HPC Debugger supports parallel debugging on multiple nodes in HPC scenarios. MPI and MPI+OpenMP applications must be debugged in launch mode.

Command Function

Debugs MPI and MPI+OpenMP applications in launch mode. It must be run using the mpirun command.

This tool supports C, C++, and Fortran.

Syntax

devkit debugger [-h | --help] {-t LAUNCH_TYPE | --type LAUNCH_TYPE} {-w APP_WORKLOAD | --workload APP_WORKLOAD} {-s SOURCE_PATH | --source SOURCE_PATH} {-m MPIRUN_CMD | --mpicmd MPIRUN_CMD} {-p RPC_SERVER_PORT | --port RPC_SERVER_PORT} [-l {0,1,2,3} | --log-level {0,1,2,3}] [-e ENVIRONMENT_VARIABLES | --env ENVIRONMENT_VARIABLES] [-a APP_ARGS | --args APP_ARGS] [-n THREAD_NUM | --threads THREAD_NUM]

Parameter Description

Table 1 Parameter description

Parameter

Option

Description

-h/--help

-

Obtains help information. This parameter is optional.

-t/--type

LAUNCH_TYPE

Debugging startup mode, which can be launch. This parameter is mandatory.

-w/--workload

APP_WORKLOAD

Executable file path of the application to be debugged. This parameter is mandatory.

Example: /home/test/mpi_demo

-s/--source

SOURCE_PATH

Source file directory of the application to be debugged. This parameter is mandatory.

Example: /home/test

-m/--mpicmd

MPIRUN_CMD

mpirun command to be executed. This parameter is mandatory and must be enclosed in double quotation marks.

Example: mpirun --allow-run-as-root -np 4

-p/--port

RPC_SERVER_PORT

Port for running the agent server to report startup information. This parameter is mandatory.

-l/--log-level

0/1/2/3

Log level, which defaults to 1. This parameter is optional.

  • 0: DEBUG
  • 1: INFO
  • 2: WARNING
  • 3: ERROR

-e/--env

ENVIRONMENT_VARIABLES

Environment variable. Use double quotation marks to enclose the environment variable. This parameter is optional. The options are:

  • export PATH=$PATH:/path/to/mpi
  • source /configure/mpi/path/file
  • module load /mpi/modulefiles

Example: export PATH=$PATH:/path/to/mpi

-a/--args

APP_ARGS

Running argument of the application to be debugged. If there are multiple arguments, separate them with spaces. This parameter is optional.

-n/--threads

THREAD_NUM

Number of OpenMP threads, which ranges from 1 to 1,024. This parameter is optional.

Example

Display the information about the functions supported by the HPC Debugger:

1
devkit debugger -h

Command output:

OVERVIEW
    Run this command to start a debugging task.
USAGE
    devkit debugger
    [-h | --help]
    {-t LAUNCH_TYPE | --type LAUNCH_TYPE}
    {-w APP_WORKLOAD | --workload APP_WORKLOAD}
    {-s SOURCE_PATH | --source SOURCE_PATH}
    {-m MPIRUN_CMD | --mpicmd MPIRUN_CMD}
    {-p RPC_SERVER_PORT | --port RPC_SERVER_PORT}
    [-l {0,1,2,3} | --log-level {0,1,2,3}]
    [-e ENVIRONMENT_VARIABLES | --env ENVIRONMENT_VARIABLES]
    [-a APP_ARGS | --args APP_ARGS]
    [-n THREAD_NUM | --threads THREAD_NUM]
OPTIONS
    -h, --help
    Get help information and exit.
    -t, --type
    [Mandatory option] Specifies the method of starting a debugging task. Choices=['launch'].
    -w, --workload APP_WORKLOAD
    [Mandatory option] Specifies the path to the executable file of the application to be debugged.
    -s, --source SOURCE_PATH
    [Mandatory option] Specifies the directory of the source code of the application to be debugged.
    -m, --mpicmd MPIRUN_CMD
    [Mandatory option] Specifies the mpirun command.
    -p, --port RPC_SERVER_PORT
    [Mandatory option] Specifies the port for starting the agent RPC server.
    -l, --log-level {0,1,2,3}
    Specifies the log level of the current task, 0(DEBUG) | 1(INFO) | 2(WARNING) | 3(ERROR). The default value is 1(INFO).
    -e, --env ENVIRONMENT_VARIABLES
    Specifies environment variables. You can configure the environment variables required for running a parallel HPC application in the following ways:
    Method1: export PATH=$PATH:/path/to/mpi.
    Method2: source /configure/mpi/path/file.
    Method3: module load /mpi/modulefiles.
    -a, --args APP_ARGS
    Specifies the running parameters of the application to be debugged.
    -n, --threads THREAD_NUM
    Specifies the number of OPENMP application threads.
EXAMPLE
    # Starts a task of debugging an MPI application with four ranks.
    devkit debugger -t launch -w /home/test/mpi_demo -s /home/test/ -m 'mpirun --allow-run-as-root -np 4' -p 9981