Runing multiple instances of Ansys Mechanical at the same time

Click For Summary
Running multiple instances of Ansys Mechanical in parallel is possible by launching separate jobs in different directories, each with its own license. Initial attempts to speed up processing by adjusting the number of processors yielded minimal improvement due to the short execution time of individual jobs. The user faced crashes when trying to run jobs in the same working directory, which was resolved by ensuring unique directories for each job. The solution involved correcting the command to prevent input/output errors caused by directory conflicts. This approach successfully allowed for simultaneous job execution and improved processing speed.
Vigardo
Messages
87
Reaction score
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
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
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 *****
 
Had my central air system checked when it sortta wasn't working. I guess I hadn't replaced the filter. Guy suggested I might want to get a UV filter accessory. He said it would "kill bugs and particulates". I know UV can kill the former, not sure how he thinks it's gonna murder the latter. Now I'm finding out there's more than one type of UV filter: one for the air flow and one for the coil. He was suggesting we might get one for the air flow, but now we'll have to change the bulb...

Similar threads

  • · Replies 6 ·
Replies
6
Views
5K