Ansys: Difference between revisions

From SciNet Users Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
Once you have an account, you must contact CMC and tell them you want to use the Ansys tools on Niagara, and give them your SciNet username.
Once you have an account, you must contact CMC and tell them you want to use the Ansys tools on Niagara, and give them your SciNet username.


=Running using the Niagara installation=
=Running on Niagara=


==Ansys 2020R2==
Commercial software modules are not available by default, and require a 'module use' command:
Commercial modules can only be accessed using the 'module use' command.


  module use /scinet/niagara/software/commercial/modules
  module use /scinet/niagara/software/commercial/modules
  module load ansys/2020r2
  module load ansys/2021r2


Programs available:
Programs available:
Line 31: Line 30:
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.
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 ansys202==
==Running ansys==


Example submission script for a job running on 1 node, with max walltime of 11 hours:
Example submission script for a job running on 1 node, with max walltime of 11 hours:
Line 43: Line 42:


module use /scinet/niagara/software/commercial/modules
module use /scinet/niagara/software/commercial/modules
module load ansys/2020r2
module load ansys/2021r2


# 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 49: Line 48:


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 ':')
ansys202 -b -j JOBNAME -dis -machines "$machines" -i ansys.in
ansys212 -b -j JOBNAME -dis -machines "$machines" -i ansys.in
</source>
</source>
More infromation can be found here: https://docs.computecanada.ca/wiki/ANSYS


<!--
<!--
Line 70: Line 66:
You can run the script given in the previous section by substituting the previous module commands with the above two.
You can run the script given in the previous section by substituting the previous module commands with the above two.


More infromation can be found here: https://docs.computecanada.ca/wiki/ANSYS  
More information can be found here: https://docs.computecanada.ca/wiki/ANSYS  




-->
-->

Revision as of 18:48, 21 March 2022

The Ansys engineering simulation tools are installed in both the Niagara and CC software stacks.

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 Niagara, and give them your SciNet username.

Running on Niagara

Commercial software modules are not available by default, and require a 'module use' command:

module use /scinet/niagara/software/commercial/modules
module load ansys/2021r2

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.

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=40
#SBATCH --time=11:00:00
#SBATCH --job-name test

module use /scinet/niagara/software/commercial/modules
module load ansys/2021r2

# 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 ':')
ansys212 -b -j JOBNAME -dis -machines "$machines" -i ansys.in