Ansys: Difference between revisions
update cmc account url |
No edit summary |
||
| Line 1: | Line 1: | ||
The [http://www.ansys.com/ Ansys] engineering simulation tools are installed in | The [http://www.ansys.com/ Ansys] engineering simulation tools are installed in the CC software stack. | ||
=Getting a license= | =Getting a license= | ||
Licenses are provided by [https://www.cmc.ca CMC Microsystems]. Canadian students and faculty can register at [https://account.cmc.ca/MyAccount/GetAccount.aspx this page]. | Licenses are provided by [https://www.cmc.ca CMC Microsystems]. Canadian students and faculty can register at [https://account.cmc.ca/MyAccount/GetAccount.aspx this page]. | ||
Once you have an account, you must [https://cmcmicrosystems.formtitan.com/SupportForm contact CMC] and tell them you want to use the Ansys tools on | Once you have an account, you must [https://cmcmicrosystems.formtitan.com/SupportForm contact CMC] and tell them you want to use the Ansys tools on Trillium, and give them your SciNet username. | ||
You may also use a license server from the other GP clusters (Rorqual, Narval, Fir, Nibi), since Trillium doesn't have its own server. More information can be found here: | |||
You may also use a license server from the other GP clusters ( | |||
https://docs.computecanada.ca/wiki/ANSYS#Configuring_your_own_license_file | https://docs.computecanada.ca/wiki/ANSYS#Configuring_your_own_license_file | ||
=Running on | =Running on Trillium= | ||
Load the following modules (current as of Sep 2025, newer versions may be available): | |||
module | module load StdEnv/2023 | ||
module load ansys/ | module load ansys/2025R1.02 | ||
Programs available: | Programs available: | ||
| Line 25: | Line 24: | ||
* mapdl | * mapdl | ||
* ... | * ... | ||
You can use the Ansys graphical tools to set up your problem, but you cannot use the graphical tools to submit your job. The job must be submitted to the scheduler for running. | You can use the Ansys graphical tools to set up your problem, but you cannot use the graphical tools to submit your job. The job must be submitted to the scheduler for running. | ||
More information can be found here: https://docs.computecanada.ca/wiki/ANSYS | |||
==Setting up your .mw directory== | ==Setting up your .mw directory== | ||
| Line 43: | Line 45: | ||
#!/bin/bash | #!/bin/bash | ||
#SBATCH --nodes=1 | #SBATCH --nodes=1 | ||
#SBATCH --ntasks-per-node= | #SBATCH --ntasks-per-node=192 | ||
#SBATCH --time=11:00:00 | #SBATCH --time=11:00:00 | ||
#SBATCH --job-name test | #SBATCH --job-name test | ||
module | module load StdEnv/2023 | ||
module load ansys/ | module load ansys/2025R1.02 | ||
# DIRECTORY TO RUN - $SLURM_SUBMIT_DIR is directory job was submitted from | # DIRECTORY TO RUN - $SLURM_SUBMIT_DIR is directory job was submitted from | ||
| Line 54: | Line 56: | ||
machines=$(srun bash -c 'hostname -s' | sort | uniq | awk '{print $1 ":" 40}' | paste -s -d ':') | machines=$(srun bash -c 'hostname -s' | sort | uniq | awk '{print $1 ":" 40}' | paste -s -d ':') | ||
ansys251 -b -j JOBNAME -dis -machines "$machines" -i ansys.in | |||
</source> | </source> | ||
| Line 64: | Line 66: | ||
<source lang="bash"> | <source lang="bash"> | ||
ssh | ssh tri-gw -fNL 1055:license.server:1055 | ||
ssh | ssh tri-gw -fNL 1056:license.server:1056 | ||
ssh | ssh tri-gw -fNL 2325:license.server:2325 | ||
export ANSYSLI_SERVERS=2325@localhost | export ANSYSLI_SERVERS=2325@localhost | ||
| Line 76: | Line 78: | ||
<source> | <source> | ||
142.150.188. | 142.150.188.58 | ||
142.150.188. | 142.150.188.61 | ||
142.150.188. | 142.150.188.62 | ||
142.150.188. | 142.150.188.63 | ||
142.150.188. | 142.150.188.64 | ||
142.150.188. | 142.150.188.65 | ||
142.150.188. | 142.150.188.66 | ||
</source> | </source> | ||
| Line 91: | Line 90: | ||
INPUTFILE=input.jou | INPUTFILE=input.jou | ||
fluent 2ddp -t "$PBS_NP" -cnf="$PBS_NODEFILE" -mpi=intel -pib -pcheck -g -i "$INPUTFILE" | fluent 2ddp -t "$PBS_NP" -cnf="$PBS_NODEFILE" -mpi=intel -pib -pcheck -g -i "$INPUTFILE" | ||
--> | --> | ||
Revision as of 19:40, 26 September 2025
The Ansys engineering simulation tools are installed in the CC software stack.
Getting a license
Licenses are provided by CMC Microsystems. Canadian students and faculty can register at this page.
Once you have an account, you must contact CMC and tell them you want to use the Ansys tools on Trillium, and give them your SciNet username.
You may also use a license server from the other GP clusters (Rorqual, Narval, Fir, Nibi), since Trillium doesn't have its own server. More information can be found here:
https://docs.computecanada.ca/wiki/ANSYS#Configuring_your_own_license_file
Running on Trillium
Load the following modules (current as of Sep 2025, newer versions may be available):
module load StdEnv/2023 module load ansys/2025R1.02
Programs available:
- fluent
- ansysedt
- mapdl
- ...
You can use the Ansys graphical tools to set up your problem, but you cannot use the graphical tools to submit your job. The job must be submitted to the scheduler for running.
More information can be found here: https://docs.computecanada.ca/wiki/ANSYS
Setting up your .mw directory
Ansys will attempt to write to your $HOME/.mw directory. This will work when you are testing your workflow on the login nodes, because they can write to $HOME. However, recall that the compute nodes cannot write to the /home filesystem. If you attempt to run Ansys from a compute node using the default configuration, it will fail because Ansys cannot write to $HOME/.mw.
The solution is to create an alternative directory called $SCRATCH/.mw, and create a soft link from $HOME/.mw to $SCRATCH/.mw:
mkdir $SCRATCH/.mw ln -s $SCRATCH/.mw $HOME/.mw
This will fool Ansys into thinking it is writing to $HOME/.mw, when in fact it is writing to $SCRATCH/.mw. This command only needs to be run once.
Running ansys
Example submission script for a job running on 1 node, with max walltime of 11 hours:
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=192
#SBATCH --time=11:00:00
#SBATCH --job-name test
module load StdEnv/2023
module load ansys/2025R1.02
# DIRECTORY TO RUN - $SLURM_SUBMIT_DIR is directory job was submitted from
cd $SLURM_SUBMIT_DIR
machines=$(srun bash -c 'hostname -s' | sort | uniq | awk '{print $1 ":" 40}' | paste -s -d ':')
ansys251 -b -j JOBNAME -dis -machines "$machines" -i ansys.in
Custom license server
To use your own license server for Ansys, you'll need to open up ssh tunnels to the required ports, and point Ansys to the tunnels. For example:
ssh tri-gw -fNL 1055:license.server:1055 ssh tri-gw -fNL 1056:license.server:1056 ssh tri-gw -fNL 2325:license.server:2325 export ANSYSLI_SERVERS=2325@localhost export ANSYSLMD_LICENSE_FILE=1055@localhost export LM_LICENSE_FILE=1055@localhost
Make sure your firewall allows connections from the following IP addresses and confirm with your license provider which ports should be used with the ssh tunnel:
142.150.188.58 142.150.188.61 142.150.188.62 142.150.188.63 142.150.188.64 142.150.188.65 142.150.188.66