This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
howto:ansysmechanical [2018/10/18 14:14] ccrosby created |
howto:ansysmechanical [2022/03/22 12:20] (current) ccrosby [Example job script] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Ansys Mechanical at the CHPC ====== | ====== Ansys Mechanical at the CHPC ====== | ||
| - | The Ansys Mechanical sofware is installed together with the CFD solvers in the directory ''/ | + | The Ansys Mechanical sofware is installed together with the CFD solvers in the directory ''/ |
| + | |||
| + | ===== Setting up runs ===== | ||
| + | The most efficient way of using the cluster is by means of pre-written files for the mechanical solver. | ||
| + | |||
| + | The Ansys RSM (Remote Solver Management) method has turned out to be tricky to use with the cluster scheduler, and it is far easier to use the GUI software to write input files for the mechanical solver. | ||
| + | |||
| + | ===== Example job script ===== | ||
| + | |||
| + | <file bash runMechanical.pbs> | ||
| + | # | ||
| + | ##### The following line will request 2 (virtual) nodes, each with 24 cores running 24 mpi processes for | ||
| + | ##### a total of 48-way parallel. | ||
| + | ##### compute nodes have 128 GB each. | ||
| + | #PBS -l select=2: | ||
| + | ## For your own benefit, try to estimate a realistic walltime request. | ||
| + | ## wallclock requirement interferes with efficient scheduling, will delay the launch of the job, | ||
| + | ## and ties up more of your CPU-time allocation untill the job has finished. | ||
| + | #PBS -q normal | ||
| + | #PBS -P myprojectcode | ||
| + | #PBS -l walltime=1: | ||
| + | #PBS -o / | ||
| + | #PBS -e / | ||
| + | #PBS -m abe | ||
| + | #PBS -M username@email.co.za | ||
| + | ##### Running commands | ||
| + | ### Tell it where to find the license | ||
| + | export LM_LICENSE_FILE=1055@login1 | ||
| + | export ANSYSLMD_LICENSE_FILE=1055@login1 | ||
| + | ### You may need the Intel compiler to be available | ||
| + | module load chpc/ | ||
| + | ### Mesa is needed to provide libGLU.so | ||
| + | module load chpc/ | ||
| + | #### There is no -d option available under PBS Pro, therefore | ||
| + | #### explicitly set working directory and change to that. | ||
| + | export PBS_JOBDIR=/ | ||
| + | cd $PBS_JOBDIR | ||
| + | ### Count the number of lines in the machinefile | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| + | ### Get a file with only one line per host | ||
| + | cat $PBS_NODEFILE | sort -u > hostlist | ||
| + | ### Create a machinefile with the number of MPI processes per node appended to each hostname | ||
| + | sed ' | ||
| + | ### Select the solver that you want to run | ||
| + | exe=/ | ||
| + | ### Command to execute the solver | ||
| + | $exe -b nolist -s noread -i name_of_input_file.dat -o some_output.out -np $nproc -dis -machinefile hosts | ||
| + | </ | ||