Computing : Parallel Ansys on Maxwell

It's relatively easy to run ansys as a batch job making use of intrinsic parallelization. ansys licenses limit the number of concurrent threads. It used to be limited to 16 threads, but that might meanwhile be obsolete.

A very primitive example to run multi-threaded ansys on a single node on Maxwell:

ansys-single.sh
#!/bin/bash
#SBATCH --comment=ansys-single
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --job-name=ansys-single
#SBATCH --output=output.%j.ansys-single
#SBATCH --time=01:00:00
export LD_PRELOAD=""
source /etc/profile.d/modules.sh
module load maxwell ansys/19.1

nprocs=$(( `/usr/bin/nproc` /2 ))
nprocs=16 # more is currently not possible due to licenses

echo "Running on $nprocs cores "
hosts=$( srun hostname -f )
echo "Hosts: $hosts"

ANSYS_OPTS="-p aa_r -dir `pwd` -b -np $nprocs" 
time ansys191 $ANSYS_OPTS -i ballshear.inp -o ballshear.out

exit


A very primitive example to run multi-threaded ansys on multiple nodes on Maxwell:

ansys-multi.sh
#!/bin/bash
#SBATCH --comment=ansys-multi
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=16
#SBATCH --job-name=ansys-multi
#SBATCH --output=output.%j.ansys-multi
#SBATCH --time=01:00:00
export LD_PRELOAD=""
source /etc/profile.d/modules.sh
module load maxwell ansys/19.1

srun hostname -f &> slurmhosts.$SLURM_JOB_ID.txt

ANSYS_OPTS="-p aa_r -dir `pwd` -b dis -machines=slurmhosts.$SLURM_JOB_ID.txt"
time ansys191 $ANSYS_OPTS -i ballshear.inp -o ballshear.out

exit