4.5. Example Problems

This section contains tutorials for running Distributed ANSYS on Linux and Windows platforms.

This tutorial is divided into two parts.

The first part walks you through setting up your distributed environment and running a test to verify that communication between systems is occurring correctly. Running this part is optional (though strongly recommended), and need only be done when you initially configure your environment, or when you change your environment by adding, removing, or changing machines.

The second part of the tutorial walks you through setting up your distributed environment and then directly running a sample problem. The tutorial is designed so that you can modify settings (such as the number of machines in the cluster, number of cores on each machine, etc.), but we strongly recommend that the first time you run this tutorial, you follow the steps exactly. Once you're familiar with the process, you can then modify the tutorial to more closely match your particular environment. You can then use the files generated in future GUI or batch runs.

Sample inputs to use for each example problem are included on the media under Program Files\ANSYS Inc\V182\ansys\Data\models (Windows) or /ansys_inc/v182/ansys/data/models (Linux). Static and modal examples are provided. The problem setup for each platform is the same whether you run the static or the modal example.

4.5.1. Example: Running Distributed ANSYS on Linux

The following tutorial walks you through the setup of your Distributed ANSYS environment, and is applicable only to systems running ANSYS 18.2 on a 64-bit Linux cluster under IBM MPI 9.1.4.2. The ANSYS 18.2 installation includes IBM MPI 9.1.4.2.

One of the sample problems, tutor1_carrier_linux.inp (static) or tutor2_carrier_modal.inp (modal), is required to complete the tutorial. Save this file to your working directory before beginning the tutorial. You can run either sample problem using the problem setup described here.

Part A: Setup and Run mpitest

  1. Set up identical installation and working directory structures on all machines (master and slaves) in the cluster.

  2. Type hostname on each machine in the cluster. Note the name of each machine. You will need this name to set up both the .rhosts file and the Configure Cluster option of the ANS_ADMIN182 utility.

    Set up the .rhosts file on each machine. The .rhosts file lists each machine in the cluster, followed by your username. The machines should be listed using their complete system name, as taken from uname. For example, each .rhosts file for our two-machine cluster looks like this (where golinux1 and golinux2 are example machine names, and jqd is an example username):

    golinux1 jqd 
    golinux2 jqd 

    Change/verify .rhosts file permissions on all machines by issuing:

    chmod 600 .rhosts

    Navigate to your working directory. Run the following:

    /ansys_inc/v182/ansys/bin/mpitest182

The mpitest program should start without errors. If it does not, check your paths, .rhosts file, and permissions; correct any errors; and rerun.

Part B: Setup and Run a Distributed Solution

  1. Set up identical installation and working directory structures on all machines (master and slaves) in the cluster.

  2. Install ANSYS 18.2 on the master machine, following the typical installation process.

  3. Install ANSYS 18.2 on the slave machines.

    Steps 2 and 3 above will install all necessary components on your machines, including IBM MPI 9.1.4.2.

  4. Type hostname on each machine in the cluster. Note the name of each machine. You will need this name to set up both the .rhosts file and the Configure Cluster option of the ANS_ADMIN182 utility.

  5. Set up the .rhosts file on each machine. The .rhosts file lists each machine in the cluster, followed by your username. The machines should be listed using their complete system name, as taken from uname. For example, each .rhosts file for our two-machine cluster looks like this (where golinux1 and golinux2 are example machine names, and jqd is an example username):

    golinux1 jqd 
    golinux2 jqd 
  6. Change/verify .rhosts file permissions on all machines by issuing:

    chmod 600 .rhosts

  7. Verify communication between machines via rsh. If the communication between machines is happening correctly, you will not need a password.

  8. Run the ANS_ADMIN182 utility:

    /ansys_inc/v182/ansys/bin/ans_admin182

  9. Choose ANSYS / Workbench Configuration Cluster. Under Select file to configure, choose the hosts182.ans file to be configured and choose Configure for Distributed ANSYS. Click OK. Then enter the system name (from Step 4) in the Machine hostname field and click Add.

    On the next dialog box, enter the system type in the Machine type drop-down, and the number of cores in the Max number of jobs/processors field for each machine in the cluster. Click OK. When you are finished adding machines, click Close and then click Exit to leave the ANS_ADMIN182 utility. The resulting hosts182.ans file using our example machines would look like this:

    golinux1 linem64t 0 1 0 0 /home/jqd MPI 1 1  
    golinux2 linem64t 0 1 0 0 /home/jqd MPI 1 1 
  10. Start ANSYS using the launcher:

    launcher182

  11. Select the correct environment and license.

  12. Go to the High Performance Computing Setup tab. Select Use Distributed Computing (MPP). You must also specify either local machine or multiple hosts. For multiple hosts, select the machines you want to use from the list of available hosts. The list of available hosts is populated from the hosts182.ans file. Click on the machines you want to use and click Add to move them to the Selected Hosts list to use them for this run. You can also add or remove a host, but be aware that adding or removing a host from here will modify only this run; the hosts182.ans file will not be updated with any new information from this dialog box.

    If necessary, you can also run secure shell (ssh) by selecting Use Secure Shell instead of Remote Shell (ssh instead of rsh).

  13. Click Run to launch ANSYS.

  14. In ANSYS, select File>Read Input From and navigate to tutor1_carrier_linux.inp or tutor2_carrier_modal.inp.

  15. The example will progress through the building, loading, and meshing of the model. When it stops, select Main Menu>Solution>Analysis Type>Sol'n Controls.

  16. On the Solution Controls dialog box, click on the Sol'n Options tab.

  17. Select the Pre-Condition CG solver.

  18. Click OK on the Solution Controls dialog box.

  19. Solve the analysis. Choose Main Menu>Solution>Solve>Current LS. Click OK.

  20. When the solution is complete, you can postprocess your results as you would with any analysis. For example, you could select Main Menu>General Postproc>Read Results>First Set and select the desired result item to display.

4.5.2. Example: Running Distributed ANSYS on Windows

The following tutorial walks you through the setup of your Distributed ANSYS environment, and is applicable only to systems running ANSYS 18.2 on a Windows cluster under IBM MPI 9.1.4.2.

One of the sample problems, tutor1_carrier_win.inp (static) or tutor2_carrier_modal.inp (modal), is required to complete the tutorial. These files are found in Program Files\ANSYS Inc\V182\ansys\Data\models. Copy the file you want to use to your working directory before beginning the tutorial. You can run either sample problem using the problem setup described here.

  1. Set up identical installation and working directory structures on all machines (master and slaves) in the cluster.

  2. Install ANSYS 18.2 on the master machine, following the typical installation process.

  3. Configure ANSYS 18.2 on the slave machines.

  4. Install and register IBM MPI 9.1.4.2 on both machines following the instructions in the beginning of this chapter.

  5. Add %MPI_ROOT%\bin to the PATH environmental variable on both machines (assuming IBM MPI 9.1.4.2 was installed on the C:\ drive). This line must be in your path for the mpirun command to be recognized.

  6. On each machine, right-click on My Computer, left-click on Properties, and select the Network Identification or Computer Name tab. The full computer name will be listed. Note the name of each machine (not including the domain). You will need this name to set up the Configure Cluster option of the ANS_ADMIN utility.

  7. Run the ANS_ADMIN utility on the master machine: Start >Programs >ANSYS 18.2 >Utilities >ANS_ADMIN 18.2.

  8. Choose ANSYS / Workbench Configure Cluster to configure the hosts182.ans file.

    • Specify the directory in which the hosts182.ans will be configured (two possible locations are presented). Also select Configure for ... Distributed ANSYS. Click OK.

    • Enter the system name (from Step 6) in the Machine hostname field and click Add. On the next dialog box, enter the system type in the Machine type drop-down, and the number of cores in the Max number of jobs/processors field and click OK. Repeat this step for each machine in the cluster. When you are finished adding machines, click Close and then File >Exit. The resulting hosts182.ans file using our example machines where machine1 has 2 cores and machine2 has 4 cores would look like this:

      machine1 intel 0 2 0 0 MPI 1 1  
      machine2 intel 0 4 0 0 MPI 1 1 
  9. Start ANSYS using the launcher: Start >Programs >ANSYS 18.2 > Mechanical APDL Product Launcher 18.2.

  10. Select ANSYS Batch as the Simulation Environment, and choose a license. Specify tutor1_carrier_win.inp or tutor2_carrier_modal.inp as your input file. Both of these examples use the PCG solver. You must specify your working directory to be the location where this file is located.

  11. Go to the High Performance Computing Setup tab. Select Use Distributed Computing (MPP). You must specify either local machine or multiple hosts. For multiple hosts, select the machines you want to use from the list of available hosts. The list of available hosts is populated from the hosts182.ans file. Click on the machines you want to use and click Add to move them to the Selected Hosts list to use them for this run. Click on a machine in Selected Hosts and click Edit if you wish to add multiple cores for that host. You can also add or remove a host, but be aware that adding or removing a host from here will modify only this run; the hosts182.ans file will not be updated with any new information from this dialog box.

  12. Click Run.

  13. When the solution is complete, you can postprocess your results as you would with any analysis.


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