3.6. Example Problems

www.kxcad.net Home > CAE Index > ANSYS Index > Release 11.0 Documentation for ANSYS


Your Ad Here

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 processors 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\V110\ansys\Data\models (Windows) or /ansys_inc/v110/ansys/data/models (UNIX/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.

3.6.1. Example: Running Distributed ANSYS on Linux

The following tutorial walks you through the setup of your distributed solver environment, and is applicable only to systems running ANSYS 11.0 on a 64-bit Linux cluster (RH 3.0) under HP MPI 2.2.2. ANSYS 11.0 includes HP MPI 2.2.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.

expandPart 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_ADMIN 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/v110/ansys/bin/mpitesthpmpi110

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

expandPart 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 11.0 on the master machine, following the typical installation process.

  3. Install ANSYS 11.0 on the slave machines. Steps 2 and 3 above will install all necessary components on your machines, including HP MPI 2.2.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_ADMIN 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_ADMIN utility:

    /ansys_inc/v110/ansys/bin/ans_admin110

  9. Choose ANSYS/Workbench Configuration, and then click Configure Cluster. Under Select file to configure, choose the hosts110.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 processors 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_ADMIN utility. The resulting hosts110.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:

    launcher110

  11. Select the correct environment and license.

  12. Go to the High Performance Computing Setup tab. Select Use Distributed ANSYS. 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 hosts110.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 hosts110.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.

3.6.2. Example: Running Distributed ANSYS on Windows

The following tutorial walks you through the setup of your distributed solver environment, and is applicable only to systems running ANSYS 11.0 on a Windows cluster under MPICH2.

One of the sample problems, tutor1_carrier_win.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.

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

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

  3. Install ANSYS 11.0 on the slave machines.

  4. Install and register MPICH2 on both machines following the instructions in Prerequisites for Running Distributed ANSYS.

  5. Add C:\Program Files\MPICH2\bin to the PATH environmental variable on both machines (assuming MPICH2 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 11.0 >Utilities >ANS_ADMIN.

  8. Choose Configuration options, and then Configure Cluster to configure the hosts110.ans file.

    1. Specify the directory in which the hosts110.ans will be configured: Select the Configure a hosts110.ans file in a directory you specify option. Enter the working directory you set up in step 1. Click OK.

    2. 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 processors in the Max number of jobs/processors field and click OK for each machine in the cluster. When you are finished adding machines, click Close and then Exit. The resulting hosts110.ans file using our example machines where machine1 has 2 processors and machine2 has 4 processors 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 11.0 > ANSYS Product Launcher.

  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 ANSYS. 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 hosts110.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 processors 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 hosts110.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.

Your Ad Here