Skip to content

Ansys

ANSYS offers a comprehensive software suite that spans the entire range of physics, providing access to virtually any field of engineering simulation that a design process requires. You can find out about the features it provides at www.ansys.com.

Ansys is available as a module on Apocrita.

Usage

To run the default version of Ansys, simply load the ansys module:

module load ansys

Ansys documentation

anshelp no longer available

The Ansys documentation used to be available via the anshelp command, but this now requires a web browser and thus does not work on Apocrita.

For more detailed documentation, please visit the official ANSYS online documentation website.

Licensing

Ansys is licensed for 128 cores on Apocrita, when running the application you can request licences via the --licenses=ansys:<number of cores> parameter.

Example jobs

In all the example jobs below, replace SIM-FILE with the name of your simulation file.

One node or less

Here is an example Mechanical APDL job running on 4 cores and 16G of ram on a single node.

#!/bin/bash
#SBATCH --ntasks=4          # (or -n 4) Request 4 cores
#SBATCH --time=1:0:0        # (or -t 1:0:0) Request 1 hour runtime
#SBATCH --mem-per-cpu=4G    # Request 1GB RAM per core (4GB total)
#SBATCH --licenses=ansys:4  # Request 4 ANSYS licences

module load ansys
mapdl -np ${SLURM_NTASKS} -b < SIM-FILE

Here is an example CFX job running on 4 cores and 16G of ram on a single node.

#!/bin/bash
#SBATCH --ntasks=4          # (or -n 4) Request 4 cores
#SBATCH --time=1:0:0        # (or -t 1:0:0) Request 1 hour runtime
#SBATCH --mem-per-cpu=4G    # Request 1GB RAM per core (4GB total)
#SBATCH --licenses=ansys:4  # Request 4 ANSYS licences

module load ansys
cfx5solve -batch -parallel -par-local -part ${SLURM_NTASKS} -def SIM-FILE

Here is an example of a fluent 3d job running on 4 cores and 16G of ram on a single node.

#!/bin/bash
#SBATCH --ntasks=4          # (or -n 4) Request 4 cores
#SBATCH --time=1:0:0        # (or -t 1:0:0) Request 1 hour runtime
#SBATCH --mem-per-cpu=4G    # Request 1GB RAM per core (4GB total)
#SBATCH --licenses=ansys:4  # Request 4 ANSYS licences

module load ansys
fluent 3d -g -rsh -t${SLURM_NTASKS} -i SIM-FILE

Parallel job

Here is an example of an Ansys job running on 96 cores across two ddy nodes.

#!/bin/bash
#SBATCH --partition=parallel  # (or -p parallel) Request the parallel partition
#SBATCH --nodes=2             # (or -N 2) Request 2 nodes
#SBATCH --ntasks=96           # (or -n 96) Request 96 cores
#SBATCH --time=240:0:0        # (or -t 240:0:0) Request 240 hours runtime
#SBATCH --licenses=ansys:96   # Request 96 ANSYS licences
#SBATCH --exclusive           # Request all CPUs per node
#SBATCH --mem=0               # Request all available memory per node

module load ansys
ansys232 -dis -np ${SLURM_NTASKS} -b < SIM-FILE

GPU job

Here is an example job running on 12 cores and 1 GPU:

#!/bin/bash
#SBATCH --partition=gpushort  # (or -p gpushort) Request the gpushort partition
#SBATCH --ntasks=8            # (or -n 8) Request 8 cores
#SBATCH --time=1:0:0          # (or -t 1:0:0) Request 1 hour runtime
#SBATCH --mem-per-cpu=11G     # Request 11GB RAM per core (88GB total)
#SBATCH --gres=gpu:1          # Request 1 GPU of any type
#SBATCH --licenses=ansys:8    # Request 8 ANSYS licences

module load ansys
fluent 3d -g -rsh -t${SLURM_NTASKS} -gpgpu=${SLURM_GPUS_ON_NODE} -i SIM-FILE