Runing multiple instances of Ansys Mechanical at the same time

In summary, the user has a problem with running multiple instances of Ansys Mechanical in parallel and obtaining a significant speed up. The user has tried varying the number of processors and splitting the job list into two but has encountered crashes and small acceleration. The user then tried running two different jobs at the same time but one of them crashed. After receiving help, the user was able to successfully run several instances of Ansys Mechanical at the same time and obtain the expected speed up. The problem was caused by using the same working directory for both input files, which resulted in an input/output error. The user has provided a record of their log and error files to help others solve similar problems.
  • #1
Vigardo
88
7
Hello experts,

Is it possible to run several instances of Ansys Mechanical in Windows or Linux in parallel? How?

I need to dramatically speed up the solution of a large list of Ansys Mechanical jobs, typically more than 50000. Such analyses are performed by some script that runs each job in batch mode.

First, I tried to vary the number of processors from 1 to 4 with the "-np" option but the acceleration was very small, i.e. 10-20% only. This probably is caused by the small size of my system, typical execution time per job is between 1 and 10 seconds.

Second, as a workaround, I tried to split up the job list in two and run each part in different terminals, but unfortunately Ansys crashes.

This was the command I used in this test under Windows, is it ok?
#> "<MY_ANSYS_PATH>\ansys145.exe" -p ansys -dir <MY_WORK_DIRECTORY> -j [JOB_NAME] -s noread -l en-us -b nolist -np 2 -i <INPUT_FILE> -o <OUTPUT_FILE>

Third, I also tried to run two different jobs at the same time in different terminals that used a different working directory. Unforutnately one of them crashes first (windows alerts that Ansys stopped working) while the other finishes normally later. Note that to avoid Ansys-lock-related problems I set the Ansys´ environment variable ANSYS_LOCK to OFF (Ansys manual says that by default ANSYS_LOCK is ON "to create file locks that prevent users from opening a new job with the same name and in the same directory as the current job").

These were the new windows commands tested:

On_Terminal_1#> "<MY_ANSYS_PATH>\ANSYS145.exe" -p ansys -dir "<WORK_DIR_A>" -j job_A -s noread -l en-us -b nolist -np 1 -m 512 -db 256 -i my_job_A.txt -o my_job_A.out

On_Terminal_2#> "<MY_ANSYS_PATH>\ANSYS145.exe" -p ansys -dir "<WORK_DIR_B>" -j job_B -s noread -l en-us -b nolist -np 1 -m 512 -db 256 -i my_job_B.txt -o my_job_B.out

Any suggestion? I really don´t know what to do next... Thanks!
 
Engineering news on Phys.org
  • #2
Hi,

You can launch N runs with N licences in N different directories. Please show the content of your .err file for the third test.

Let me know if it's usefull.
 
  • Like
Likes Vigardo
  • #3
Very useful! Now I can run several instances of Ansys Mechanical at the same time and obtain the expected speed up!

Your indication highlighted the problem: both input files used the same working directory. The following ansys command overrode the "-dir" option of the input command at some point and caused the input/output error:

/CWD,'<C:<SOME_DIRECTORY_NAME>\test\ansys1'

Thanks a lot for your excellent help!

PS: Here is a record of the log and error files that lead to the solution of the problem to facilitate other users to solve their problems.While the job_A.err file was ok, the job_B.err indicated some Input/output error:

/COM,ANSYS RELEASE 14.5 UP20120918 21:39:14 10/25/2014
0***** process error reported by subroutine xdslor see xdslor abstract (ier = -202)
*** ERROR *** CP = 3.666 TIME= 21:39:21
Input/output error on unit = 20. Please check to see if the disk is full.

After checking that my disk is not full, I checked the output files. The first one (my_job_A.out) was OK, including the requested buckling factors. However, the second (my_job_B.out) had i/o errors after finishing static and buckling analyses. When I checked

1) After the static analysis:

*** ANSYS BINARY FILE STATISTICS
BUFFER SIZE USED= 16384
23.500 MB WRITTEN ON ELEMENT MATRIX FILE: buckling.emat
5.938 MB WRITTEN ON ELEMENT SAVED DATA FILE: buckling.esav
4.875 MB WRITTEN ON ASSEMBLED MATRIX FILE: buckling.full
5.938 MB WRITTEN ON RESULTS FILE: buckling.rst

FINISH SOLUTION PROCESSING
*** error while closing file. *** subroutine hdsan1 encountered
i/o error on i/o file no. = 20, 25, 9, 11, 31, 32, 22
***** ROUTINE COMPLETED ***** CP = 3.229

2) After the buckilng analysis:

********** CURRENT DISK AND DIRECTORY USAGE **********
Directory C:<SOME_DIRECTORY_NAME>\test\ansys1

25/10/2014 21:39 <DIR> .
25/10/2014 21:39 <DIR> ..
25/10/2014 21:39 2.191 buckling.BCS
25/10/2014 21:37 9.371.648 buckling.db
25/10/2014 21:39 24.641.536 buckling.emat
25/10/2014 21:39 6.225.920 buckling.esav
25/10/2014 21:39 9.502.720 buckling.full
25/10/2014 21:39 16.515.072 buckling.LN07
25/10/2014 21:39 0 buckling.LN09
25/10/2014 21:39 2.359.296 buckling.LN11
25/10/2014 21:39 0 buckling.LN20
25/10/2014 21:39 1.286.336 buckling.LN21
25/10/2014 21:39 0 buckling.LN22
25/10/2014 21:39 1.856.648 buckling.LN25
25/10/2014 21:39 1.856.648 buckling.LN28
25/10/2014 21:39 0 buckling.LN31
25/10/2014 21:39 0 buckling.LN32
25/10/2014 21:39 732 buckling.mntr
25/10/2014 21:37 2.883.584 buckling.mode
25/10/2014 21:39 0 buckling.rst
25/10/2014 21:39 151 buckling.stat
25/10/2014 21:36 136 job_a.err
25/10/2014 21:36 292 job_a.log
21 files 76.502.910 bytes
2 dirs 402.278.866.944 bytes free

*** ERROR *** CP = 3.666 TIME= 21:39:21
Input/output error on unit = 20. Please check to see if the disk is
full.
*** error while closing file. *** subroutine hdsan1 encountered
i/o error on i/o file no. = 20, 21, 22, 25, 28, 7, 9, 11, 31, 32
NUMBER OF WARNING MESSAGES ENCOUNTERED= 0
NUMBER OF ERROR MESSAGES ENCOUNTERED= 1
***** PROBLEM TERMINATED BY INDICATED ERROR(S) OR BY END OF INPUT DATA *****
 

1. Can I run multiple instances of Ansys Mechanical on my computer?

Yes, it is possible to run multiple instances of Ansys Mechanical on your computer. However, the number of instances you can run simultaneously depends on the capabilities of your computer's hardware.

2. How do I run multiple instances of Ansys Mechanical at the same time?

To run multiple instances of Ansys Mechanical, you will need to open the software multiple times. You can either open each instance separately or use the "New Window" option under the "File" menu to open multiple instances at once.

3. What are the benefits of running multiple instances of Ansys Mechanical?

Running multiple instances of Ansys Mechanical allows you to perform multiple simulations at the same time, increasing your productivity. It also allows you to compare results from different simulations or perform parametric studies more efficiently.

4. Are there any limitations to running multiple instances of Ansys Mechanical?

The main limitation of running multiple instances of Ansys Mechanical is the amount of RAM and processing power available on your computer. Running too many instances or performing complex simulations may cause your computer to slow down or crash.

5. Can I run different versions of Ansys Mechanical at the same time?

Yes, you can run different versions of Ansys Mechanical at the same time as long as they are installed on your computer. However, it is important to note that different versions may have compatibility issues and it is recommended to use the same version for all instances if possible.

Similar threads

  • Mechanical Engineering
Replies
6
Views
4K
Back
Top