Need help on creating the script file for launching Ansys Mechanical job

  • Last Post 08 May 2018
peltier10 posted this 18 April 2018

Hi all,

I am doing Static Structural and Transient Thermal analysis using the Linux cluster. I am quite new with using the cluster and Linux. I did some research about how to create the script file to submit the job in Ansys Mechanical. I created .log and .db files and transferred them to the remote directory (cluster) via connecting to the cluster WinSCP. I tried to create the Linux shell script file by setting the environment variables and options, submitted the job with the qsub command. However, output files were empty. And in the error file, the error was

 /opt/gridengine/default/spool/compute-0-1/job_scripts/11055: line 6: /share/apps/ansys/v170/ansys/bin/ansys170/: Not a directory

rm: cannot remove `/tmp/11055.1.mpi.q/rsh': No such file or directory


Order By: Standard | Newest | Votes
peltier10 posted this 18 April 2018


My question is when I want to submit the job in Ansys Mechanical Workbench, how can I create the script file?I would be really appreciated If you can give me some information. Thanks.


peltier10 posted this 18 April 2018

I have tried to post some more stuff about the content of the script file I wrote. However, the website did not let me do it.

peteroznewman posted this 18 April 2018

You can attach .zip file extensions as well as .txt file extensions to this site. Please try again and list all the steps in detail.

Years ago, in ANSYS Mechanical, I used the Tools menu to Write Input File. Then I moved that file to some Linux machine where I issued a command to start the solver.  This is very primitive, but may be a required baby step to getting something to run on the cluster.

The good setup is to have Remote Solver Manager (RSM) configured on your installation of ANSYS. Then instead of clicking Solve to run on your local machine, you pick the pulldown on Solve and instead of just My Computer, Background, it will have Cluster and it does all the work for you to submit the job to the cluster.

peltier10 posted this 19 April 2018

Hi Peter. Thanks for your message. Unfortunately, we do not have Remote Solver Manager configured in the installation of Ansys in my university. It would be great if we had. I have attached the zip file below. I wrote all the steps I did to create the script file. 

Attached Files

peteroznewman posted this 20 April 2018


Hi Peltier,

Your original post said you wanted to run Structural models, but a lot of the documents you sent were to do with Fluent.

I recommend you take some baby steps to get something to run as a batch on your PC first, then try to adapt it to the cluster.

I have provided an ANSYS 17.2 archive called Cantilever172.wbpz for you to use. Start Workbench and use File, Restore Archive to save a workbench file to c:\local\

In Mechanical, Tools, Write Input File. I used input.dat as the name. No spaces in the filename!  I provided that in the zip file.

To see how to run the ansys solver on the PC, create a new folder c:\test and copy input.dat and run.bat to c:\test. I provided run.bat to work for ANSYS 17.2 so edit it in two places if you are on a different version.

Open a command window, change directory to c:\test then type run.bat and many files will be generated. One of the files is called file.db  Copy file.db from c:\test to c:\local\   (I also put file.db in the zip file).

In Mechanical, Tools, Read Results and select file.db.  Bingo, there are your results!

Now you just have to adapt that to the cluster.

Log into the cluster. Make a directory called test.

Use WinSCP to move input.dat to the folder test.

Modify run.bat to be a linux friendly script. You can assume ansys172 is in the path. Add whatever cluster command line is required to load the software.

When the script runs, you will see the same files created in home/test as you did in c:\test on the PC and file.db is the one you want. Use WinSCP to move it back to your PC and put in c:\local and you will have the same results.

Good luck and let me know how it goes.


Attached Files

peltier10 posted this 08 May 2018

Hi Peter. Sorry, It has been a long time since you answered the question. As you suggested I run the Ansys solver on the PC, then I modified it to Linux and tried to submit the job to cluster, it failed many times, then I, unfortunately, gave up trying. I am probably messing up with creating the shell script. I attached the text file for you to see how I created the shell script. 




Attached Files

peteroznewman posted this 08 May 2018

Your script is calling runwb2 which is not a solver, that is the Workbench GUI application.

To submit a job to the ansys solver, you call ansys170

For example, assuming you are in a folder where input.dat is located, then use the script in the attached txt file.

Attached Files