Using Ansys CFX On The HPC
Using Ansys CFX On The HPC
Author:
Peter Mills
HPC Administrator
University of Plymouth
Using Ansys CFX on the HPC
Getting Started
The following is a guide to using Ansys CFX on the High Performance
Computing Clusters.
Before we can consider running any code we need to get our files on to the
cluster.
It is recommended that you use an ftp client such as Tunnelier.
The software and the user guide for Tunnelier is available from the HPC
website - http://www.plymouth.ac.uk/pages/view.asp?page=33934
The <filename>.sh is the bash script for running the job and contains run
commands and other debugging information
The timelimit.ccl defines the run time for the job if you open and edit
this in note / wordpad you can change the time that the job will run for
before it stops.
When your Ansys job is run, it will generate additional files, these are:-
The <filename>.res is the graphical results file that the user can view
once the run is complete.
Note: The .out and .res are the output files generated by the job run.
These are the files that need to be copied back from the cluster to the local
desktop to view their results.
Page 1 of 6
.res files will only be generated after the analysis has been successfully
completed, if no .res appears then the run failed and by reading the .out
you will be able to see why the run has failed.
Once the user has download the .res and .out to the desktop they should
be deleted from the cluster as they take up a lot of file space.
Example Files
Firstly, login to the cluster you will be taken to your home folder.
To start you off, you will find in your home directory a folder ansys_scripts
Now cd into the CFX folder, followed by the Default folder and you will see the
files as shown below.
Page 2 of 6
You should now see the files mentioned earlier in understanding the file
formats in Ansys.
A copy of these files should be placed in what would be the working folder for
the users Ansys runs. Note - The Venturi_001.out and the Venturi_001.res files
are not required.
To copy the required files, firstly go back to the root of your home folder by
using the
command cd ~
Now create a new folder from which you will do your Ansys job runs.
Let’s assume you wish to name the folder “wave_tests” the user should enter:
Finally to copy over the required sample files type the following –
cp /export/home/<username>/ansys_scripts/CFX/Default/default.sh
timelimit.ccl Venturi.def /export/home/<username>/wave_tests/
Before we can use these files we need to check the ownership of them.
Page 3 of 6
The files are now ready for use.
Once we have the three files in our home folder, we need to edit the script file
(default.sh)
So that the file will run correctly and all the results will be outputted to the
users home folder.
When the file is displayed browse to the bottom of the file and you will see the
following
#
# run the cfx job
#
parallel="-par -part $nodes -par-host-list $par_host_list"
cd /home/pmills/wave_tests
/opt/ansys_inc/v120/CFX/bin/cfx5solve -def Venturi.def -ccl timelimit.ccl
$parallel
To the users name and the folder from which the script will be run.
cd /home/<username>/<folder name>
Save the file, we are now ready to go.
Page 4 of 6
Submitting an Ansys CFX job
When we submit the job, the scheduler on the cluster will decide which node/s
the job will be run on.
To submit a job to the cluster we need to submit the script file using the
following format
qsub <filename>.
.eg. qsub default.sh
[
To check the progress of our job we use qstat
Page 5 of 6
To check to see which nodes the job is running on we use the command
qstat –n <job number>
Once the job has finished, we can go back to our home folder and we should
now have the additional files
1) .res (results) file. This is the file that you would download to your local
machine.
2) .out (output)file. Output summary of the job submission.
3) .sh.o12656 file. Copy of script file, with job number appended to the
name.
The output and results file can now be copied back to your local machine so
that you are able to see the output details.
Page 6 of 6