Updated 2023-03-31
Ansys¶
Run Ansys Batch Mode¶
Overview¶
- Ansys consists of many different products as well as many ways to run those products using batch mode. This guide will focus on:
- Running the Ansys Mechanical APDL
- Using the Mechanical APDL Launcher to run batch script
SBATCH Script¶
- The beginning of the SBATCH script can be used as a template.
- The computation part of the script (non
#SBATCH
lines) will differ. SBATCH
Script can be found here.
#!/bin/bash
#SBATCH -JanyName
#SBATCH -A [Account]
#SBATCH -N1 --ntasks-per-node=8
#SBATCH --mem-per-cpu=4G
#SBATCH -t60
#SBATCH -qinferno
#SBATCH -oReport-%j.out
cd <dir that holds input files>
module load ansys/2021R2 #or any other version
<where the ansys run lines go, differing based on what you want to run>
- The
#SBATCH
directives are standard, requesting just 1 minute of walltime and 1 node with 4 cores. More on#SBATCH
directives can be found in the Using Slurm on Phoenix Guide - After, the computation portion begins. You must enter the directory where you store your input files, so that ansys knows what to run
- module load ansys/2021R2 loads ansys 2021 R2. You can find different versions to load with module avail ansys
module load ansys/2021R2
loads ansys 2021R2. You can find different versions to load withmodule avail ansys
- The last line is the line to run the ansys product, and will differ with what product you are running.
Ansys Mechanicak APDL¶
launcher212 -runbatch - np x -dis
will run.dat files in the directory specifiednohup ansys212 -b -p -np x -dis productvar < inputname > outputname 2>&1 &
: another option to run the solver,nohup
stands for no hangups and will make the job less prone to interuptions- For both, you must include
-np x
where x is the num of processors you requested in yourSBATCH
script
Using the Ansys Mechanical APDL Launcher¶
- The launcher is a gui tool that allows you to put all your inputs in, and then it will run the job or generate a command for you.
- RECOMMENDED WORKFLOW: Open launcher interactively, input all preferences including simulation environment and number of processors, then copy the command it generates and paste that in your SBATCH script.
- To make it create the command, after your parameters, click
tools
>Display Command line
Further Resources¶
- Ansys has many different option flags when running in Batch Mode
- A good resource to get an idea of all these options can be found here
- Also, Ansys documentation on batch runs can be found here
Run Ansys Interactively on Cluster¶
Overview¶
- Ansys has many different options for running interactively:
- Ansys Workbench
- polyflow
- cfx
- and more
- This guide will focus on Ansys Workbench, but will also detail how to launch some of the other products.
Set up Interactive Desktop on Phoenix OnDemand¶
- In order to access Phoenix OnDemand you must be connected to the GT VPN. If you do not already have the VPN set up, visit Configure the GT VPN
- Once connected to the VPN you can access the application at Phoenix OnDemand.
- Choose the
Slurm Interactive Apps
tab and selectInteractive Desktop
to setup and launch. - Setting up Interactive Desktop:
- Charge Account:
gts-<PI username> ("phx-pace-staff" works for trial. Required.)
- Quality of Service:
inferno
- Node Type:
GPU Tesla V100-16B or GPU Tesla V100-32B
- Nodes:
1
- Cores Per Node:
8 (Number of cores (CPUs) per node. Max: 24 cores per node.)
- GPUs Per Node:
1
- Memery Per Crore (GB):
Leave blank if unsure. Total memory for job is: nodes × cores × memory per core
- Number of hours:
1
- Charge Account:
- After the preceding details are entered, clik the
Launch
button - Once the
Launch Interactive Desktop
is an available option, click the button to open a Phoenix OnDemand Interactive Desktop to use for Ansys
Load Ansys¶
- Open terminal in the Interactive Desktop by clicking top left
Activities
> search forterminal
- All commands here on will be typed in the terminal
- To see available versions of Ansys run
module spider ansys # lists available ansys versions
module load ansys/2021R2 # loads anays 2021 R2
Launch Ansys Products¶
- To launch any Ansys product, you must have anysis loaded
- Ansys Workbench
runwb2
: launches Ansys Workbench- Can use
-B
to run inbatch mode
, useful for non-interactive job
- Mechanical APDL Solver
ansys212
: launches Ansyss Solver in the terminal
- Mechanical APDL Launcher
launcher212
: loads the Mechanical Apdl Launcher. The launcher allows you to set parameters and run the script using a GUI. Parameters set include number of processors, which you must set to the number you requested in theqsubtubovncserver
line when you submitted the interactive job.
- Launch additional Ansys Products
cfdpost
: lanches cfdpost guicfx5
: launches cfx5 guifluent
: Launches fluent. Fluent guide here