### 3.1.3. Running Autodyn with Microsoft MPI

Microsoft MPI must be installed on each machine that will be used in the parallel processing environment by following the installation instructions for Microsoft MPI as provided in Setting up Distributed ANSYS.

Note: The recommended method of running an Autodyn job using Microsoft MPI is by using the AUTODYNWRAPPER.exe file, which is described in Running Autodyn on Windows Platforms. The following is an alternative method of starting an Autodyn parallel job using Microsoft MPI. This method gives you the ability to add other Microsoft 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:

    -env ANSYS_EXD_MPI_TYPE msmpi -wdir %EXD_WDIR% -n 1 autodyn.exe
    -env ANSYS_EXD_MPI_TYPE msmpi -wdir %EXD_WDIR% -n [number of slaves] adslave.exe

The commands shown above will launch 1 master process and `number of slaves` slave processes. The working directory is specified by the `-wdir` option and should be provided if the installation of Autodyn is not in the default location.

Start Autodyn 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 MS_MPI_ROOT environment variable to point to latest supported version, or by temporarily changing it through a batch script.

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

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

    set MS_MPI_ROOT="<Location of Microsoft MPI Install>"
    set EXD_WDIR=<Location of Autodyn Executables>
    %MS_MPI_ROOT%\bin\mpiexec.exe -configfile applfile

The file locations should be set to correspond to the local installation; for example:

    set MS_MPI_ROOT="C:\Program Files\Microsoft MPI"
    set EXD_WDIR=%AWP_ROOT182%\aisol\AUTODYN\winx64

Once the batch file is executed, Autodyn starts, along with the number of slaves specified in applfile. You can now create your model or load an existing one and proceed with your analysis.

Release 18.2 - © ANSYS, Inc. All rights reserved.