3.2.1. Running Autodyn using the AUTODYNWRAPPER

MPI must be installed on each machine that will be used in the parallel processing environment by following the installation instructions for Intel MPI as provided in Setting up a DMP Analysis in the Ansys, Inc. Installation Guides.


Note:  The recommended method of running an Autodyn job using MPI is by using the AUTODYNWRAPPER.exe file, which is described in Running Autodyn in Batch Mode on Linux Platforms.


The following is an alternative method of starting an Autodyn parallel job using MPI. This method gives you the ability to add other MPI options that are not supported by AUTODYNWRAPPER.exe.

Create a file called applfile, and in this file enter the following text, making the relevant changes for your parallel model, machine names, and installation path, should the installation not be in the default location:

  • Intel MPI:

    -genv ANSYS_EXD_MPI_TYPE intelmpi -host [machinenameA] -np 1 (cont'd on next line...)
    (...cont'd) "/usr/ansys_inc/v242/autodyn/bin/autodyn" -i ./admodel_0.ad -c 0
    
    -genv ANSYS_EXD_MPI_TYPE intelmpi -host [machinenameB] -np [number_of_processes] (cont'd on next line...)
    (...cont'd) "/usr/ansys_inc/v242/autodyn/bin/adworker"
  • OpenMPI:

    -x ANSYS_EXD_MPI_TYPE openmpi -host [machinenameA]:nn -np 1 (continued on next line...)
    (...cont'd) "/usr/ansys_inc/v242/autodyn/bin/autodyn" -i ./admodel_0.ad -c 0
    
    -x ANSYS_EXD_MPI_TYPE openmpi -host [machinenameB]:mm -np [number_of_processes] (continued on next line...)
    (...cont'd) "/usr/ansys_inc/v242/autodyn/bin/adworker"

The commands shown above will launch an Autodyn analysis of model file admodel_0.ad starting at cycle 0, using 1 master process on machinenameA and number_of_processes worker processes on machinenameB.


Note:  For Intel MPI 2018.3 and older versions on systems with ptrace restrictions, such as Ubuntu, append to the applfile the following extra argument: -genv I_MPI_SHM_LMT shm. This fix is documented on the Intel Community forum. Newer versions of Intel MPI may not need this extra argument.

For OpenMPI, the integer numbers nn and mm behind the machine names are the amount of processes that are run on the specific machine. For the example above, nn=1 and mm=numbers_of_processes. When the whole analysis above is run on a single machine then both nn and mm should be the total amount of processes run on that machine, which is nn = mm = number_of_processes + 1.


The Autodyn analysis can be started using mpiexec. It is important that you reference the correct version of MPI, otherwise the wrong mpiexec command will be picked up from the path environment variable. You can reference the correct version of MPI by permanently setting the I_MPI_ROOT (Intel MPI) or OPAL_PREFIX (OpenMPI) environment variable to point to latest supported version, or by temporarily changing it through a batch script.

To start the Autodyn analysis, create a batch file in the same application data directory as the applfile file and execute it.

For example, create a blank file called autodyn_mpi.bat. In this file enter:

  • Intel MPI:

    set I_MPI_ROOT=<install dir>/tp/MPI/Intel/2021.11.0/linx64/
    "%I_MPI_ROOT%\bin\mpiexec.exe" -configfile applfile
  • OpenMPI:

    set OPAL_PREFIX=<install dir>/tp/MPI/OpenMPI/4.0.5/linx64/
    "%OPAL_PREFIX%\bin\mpiexec.exe" -app applfile

Once the batch file is executed, the Autodyn analysis starts, along with the number of workers specified in applfile.