Ansys Suite (ansys, cfx, fluent, icem)
Table of Contents
Ansys
How to Access the Software
Load the ANSYS module
module load ANSYS
# or load specific version
module load ANSYS/2021R2
Example Batch Script
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=ANSYS_JOB
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=ansys-job-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Request number of CPUs
#SBATCH --ntasks=8
### Request all CPUs on one node
#SBATCH --nodes=1
### Change to the work directory
cd "$HOME/jobdirectory"
module load ANSYS
### Execute your application
### For different ansys versions, change the executable name accordingly,
### e.g. ansys212 for Ansys 21.2
### -b : Run the job in ANSYS batch mode.
### -i : ANSYS input file.
### -o : ANSYS output file:
ansys212 -b -o ansys.out -i ansys.in
Licensing
You may use Ansys using either one of two different licenses: The Ansys Academic Teaching license and the Ansys Academic Research license. The former one may be used for free by students (bachelor/master) for educational purposes and will automatically be available when you load the software. The Academic Research license may be purchased by RWTH institutes for research purposes. Users have to be granted access to use one of these licenses by the owning institute. Please contact your local IT administrator for this.
Please be aware that the teaching license is restricted in its features. For further details, please take a look at the feature set. Most importantly, the teaching licenses are restricted to 4 cores, as they do not provide the aa_r_hpc feature.
Per default, only the license paths to the research licenses (need to be paid) are set. If you wish to use the teaching licenses, please set the following environment variables AFTER loading the ansys module:
export ANSYSLI_SERVERS=50198@license3.rz.rwth-aachen.de:50198@license5.rz.rwth-aachen.de
export ANSYSLMD_LICENSE_FILE=50199@license.itc.rwth-aachen.de
One needs to reset the license preferences for each version one wishes to use. Please use
/rwthfs/rz/SW/ANSYS/shared_files/licensing/lic_admin/anslic_admin
and then:
Set License Preferences for User -> Choose Version -> Reset to Default
Changing License Preferences in Ansys
You may change the license preferences within the Ansys workbench according to your needs. This is especially important when choosing a Teaching license over an available Research license since the desired license needs to have a higher priority. To do so, start the workbench and navigate to Tools -> License Preferences... in the context menu:
Within the upcoming menu, use the buttons "Move up" and "Move down" to reorder the priority. The priority decreases from top to bottom. Proceed on all necessary tabs within the preference window.
Frequently Asked Questions
- How can I run the Ansys Workbench?
module load ANSYS runwb2
CFX
How to Access the Software
Load CFX module
module load ANSYS
Example Batch Scripts
Serial Job:
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=CFX_SERIAL
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=cfx-serial-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Change to the work directory, if not here
cd "$HOME/jobdirectory"
### load modules
module load ANSYS
# start non-interactive batch job
cfx5solve -def job.def
Parallel Job (please use only in batch system; does not work interactive):
Note: You might have to use Open MPI as your start-method if you notice a dramatic performance drop:
-start-method "Open MPI Distributed Parallel"
Batch Script
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=CFX_MPI
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=cfx-mpi-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Request number of hosts
#SBATCH --nodes=1
### Request number of CPUs
#SBATCH --ntasks=8
### Change to the work directory
cd "$HOME/jobdirectory"
### load modules
module load ANSYS
### start non-interactive batch job
cfx5solve -def job.def -par-dist "$R_WLM_CFXHOSTLIST" -start-method "Intel MPI Distributed Parallel"
Additional Information
Depending on the requirements of your simulation, the default single precision of CFX's solver might not yield proper results. The solver and its components can be set to double precision by adding the
-double
argument tocfx5solve
.
Fluent
How to Access the Software
How to load the Fluent module:
module load ANSYS
Example Batch Scripts
Serial Job
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=FLUENT_SERIAL
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=fluent-serial-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Change to the work directory
cd "$HOME/jobdirectory"
### load modules
module load ANSYS
# start non-interactive batch job
fluent -g -platform=intel -i journalfile
Parallel Job - Shared Memory
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=FLUENT_OMP
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=fluent-omp-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Request number of CPUs=Threads
#SBATCH --ntasks=8
#SBATCH --nodes=1
### Change to the work directory
cd "$HOME/jobdirectory"
### Load modules
module load ANSYS
# start non-interactive batch job
fluent 3d -g -pshmem -t$SLURM_NTASKS -platform=intel -i journalfile
Parallel Job - Distributed Memory
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=FLUENT_MPI
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output fluent-MPI-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Request number of CPUs
#SBATCH --ntasks=8
### Change to the work directory
cd "$HOME/jobdirectory"
### Load modules
module purge
module load ANSYS
# Set environment variables
export FLUENT_AFFINITY=0
export SLURM_ENABLED=1
### start non-interactive batch job
fluent 3ddp -g $R_WLM_FLUENT_PARAMETERS -i journalfile
Interactive usage
How to load the Fluent module
module load ANSYS
runwb2
In the Ansys Workbench:
- Select the "Component Toolbox"
- Add the "Fluent" Toolbox
- Run "Setup"
Select the "Processing Option" "Parallel"
(+ "Show more options")
(Tab "Parallel Settings")
- Choose "infiniband" as "Interconnects"
- Choose "openmpi" as "MPI types"
4. ICEM
How to Access the Software
How to load the ICEM module
module load ANSYS
Example Batch Script
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=ICEM_SERIAL
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=icem-serial-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Export an environment var - do you need that?
export A_ENV_VAR=10
### Change to the work directory
cd "$HOME/workdirectory"
### load modules
module load ANSYS
# start non-interactive batch job
icemcfd -batch -script icem.script
# You need a file containing information for net generation, e. g.
# an icem.skript containing the following line
#
# ic_run_tetra "Job.tin" "tetra_mesh.uns"
Known limitations
MPI vendors
Ansys is delivered with support for different MPI vendors: IBM-MPI (previously known as HP-MPI), OpenMPI, IntelMPI, each in varying versions, sometimes more than one, but mostly older versions. As we have an Intel OmniPath fabric in our clusters we focus on IntelMPI. We do not support IBMMPI and OpenMPI for Ansys (but do not rule out the possibility that these could work on some circumstances)
In terms of performance, a single-node job is (almost) always faster than the same amount of ranks spread across multiple nodes due to the fact that a fabric is always slower than intra-node communication. Try to stay on a single node whenever possible.