5.1. Activating Hybrid Parallel Processing

As summarized in Table 1.1: Command Line Options to Specify Number of Processes and/or Threads per Process, DMP with the number of processes set to 4 is the default behavior if you do not specify any parallel processing options.

Hybrid parallel can be activated in two ways:

  1. You specify multiple threads per process explicitly (see Activating Hybrid Parallel by Command or Product Launcher for details).

  2. If no value has been set for -nt and the specifics of your analysis indicate that using hybrid parallel will improve performance, the program automatically invokes hybrid parallel (see Auto-hybrid for details).

5.1.1. Activating Hybrid Parallel by Command or Product Launcher

To activate hybrid parallel explicitly, specify multiple threads per process using the -nt command line option, which is 1 by default. For example, the following command line

ansys242 -b -np 8 -nt 2

specifies a hybrid parallel run using 8 MPI processes with 2 threads per process, and by Equation 1–1, the total core count is 16. For a complete list of command line options, see Starting a Mechanical APDL Session from the Command Level in the Operations Guide.

Alternatively, you can set the number of processes and number of threads per process in the product launcher. Figure 5.1: Product Launcher - High Performance Computing Setup shows the default values for a DMP run with 4 processes. The arrows in the figure indicate where you can specify the Number of Processes (for a DMP or hybrid parallel run) and invoke hybrid parallel by increasing the Threads per Process to a value larger than 1.

Figure 5.1: Product Launcher - High Performance Computing Setup

Product Launcher - High Performance Computing Setup


5.1.2. System-Specific Considerations

For hybrid parallel processing, the number of cores that the program uses is limited to the lesser of one of the following:

  • The number of cores prescribed, calculated by the number of processes multiplied by the number of threads per process.

  • The actual number of cores available.

If the number of cores prescribed is larger than the actual number of physical cores available, the number of threads/process will be reduced.

You can specify multiple settings for the number of cores to use during a session. To do so, it is recommended that you issue the /CLEAR command before resetting the number of cores for subsequent analyses.