How to get FLUENT through workbench to use the GPU?

As subject. I am using Fluent through workbench on a HPC. How to get FLUENT to use the GPU?
Tagged:
As subject. I am using Fluent through workbench on a HPC. How to get FLUENT to use the GPU?
Answers
What is the job scheduler on the cluster ?
What is the OS version ?
What is the graphics card on this node ?
Normally, you may have use stand-alone Fluent to achieve that but it also depends on the info that i asked above.
Redhat linux. It's a direct submission using qsub and mobaxterm.
I forgot to ask about ANSYS/Fluent version.
Can you provide a sample command (and script, if exist) that you are using to submit the job ?
Please also provide the output of the following commands
cat /etc/*release
lspci -vnn | grep VGA -A 12
glxinfo | grep OpenGL
Version 2020R2.
I have attached the GPU / Fluent / Workbench scripts.
The GPU one is pretty generic and doesn't show how to submit Fluent / Workbench to use the GPU
I have attached the output of the strings you asked
Sorry, ANSYS employee are not allowed to download file attachment.
Could you provide that in screenshots inline with text or perhaps copy the content and post as text here ?
#!/bin/bash
##
## ANSYS submission script for PBS on CRESCENT
## -------------------------------------------
##
## Follow the 6 steps below to configure your job
##
## STEP 1:
##
## Enter a job name after the -N on the line below:
##
#PBS -N fluent_example
##
## STEP 2:
##
## Select the number of cpus/cores required by modifying the #PBS -l select line below
##
## Normally you select cpus in chunks of 16 cpus
## The Maximum value for ncpus is 16 and mpiprocs MUST be the same value as ncpus.
##
## If more than 16 cpus are required then select multiple chunks of 16
## e.g. 16 CPUs: select=1:ncpus=16:mpiprocs=16
## 32 CPUs: select=2:ncpus=16:mpiprocs=16
## 48 CPUs: select=3:ncpus=16:mpiprocs=16
## ..etc..
##
#PBS -l select=1:ncpus=16:mpiprocs=16
##
## STEP 3:
##
## Select the correct queue by modifying the #PBS -q line below
##
## half_hour - 30 minutes
## one_hour - 1 hour
## three_hour - 3 hours
## six_hour - 6 hours
## half_day - 12 hours
## one_day - 24 hours
## two_day - 48 hours
## five_day - 120 hours
## ten_day - 240 hours (by special arrangement)
##
#PBS -q half_hour
##
## STEP 4:
##
## Replace the [email protected] email address
## with your Cranfield email address on the #PBS -M line below:
## Your email address is NOT your username
##
#PBS -m abe
#PBS -M [email protected]
##
## ====================================
## DO NOT CHANGE THE LINES BETWEEN HERE
## ====================================
#PBS -l application=ansys
#PBS -j oe
#PBS -W sandbox=PRIVATE
#PBS -k n
ln -s $PWD $PBS_O_WORKDIR/$PBS_JOBID
## Change to working directory
cd $PBS_O_WORKDIR
# Get node list from PBS and format for ANSYS:
ANSYS_NODES=`uniq -c ${PBS_NODEFILE} | awk -F. '{ print $1 }' | awk '{print $2 ":" $1}' | paste -s -d ':'`
## load module required by ANSYS/16.2
module load libGLU/9.0.0-foss-2016b
## ========
## AND HERE
## ========
##
## STEP 5:
##
## Load the default application environment
## For a specific version add the version number, e.g.
## module load ANSYS/17.1
##
module load ANSYS/16.2
##
## STEP 6:
##
## Put the correct parameters in the ansys execution line
## below to run the ANSYS launcher
## Unless you are sure do not change the default parameters
##
## The main parameters to modify are -
## application name - must match the version loaded
## input filename - change input.jou to your own filename
ansys162 -dis -machines $ANSYS_NODES -dir $PBS_O_WORKDIR -b -i input.inp
## Tidy up the log directory
## DO NOT CHANGE THE LINE BELOW
## ============================
rm $PBS_O_WORKDIR/$PBS_JOBID
#
#!/bin/bash
##
## GPU submission script for PBS on CRESCENT
## -----------------------------------------
##
## Follow the 6 steps below to configure your job
##
## STEP 1:
##
## Enter a job name after the -N on the line below:
##
#PBS -N gpu_example
##
## STEP 2:
##
## Select the number of cpus/cores and GPUs required by modifying the #PBS -l select line below
##
## The Maximum value for ncpus is 8 and mpiprocs MUST be the same value as ncpus.
## The Maximum value for ngpus is 1
## e.g. 1 GPU and 8 CPUs : select=1:ncpus=8:mpiprocs=8;ngpus=1
##
#PBS -l select=1:ncpus=8:mpiprocs=8:ngpus=1
##
## STEP 3:
##
## There is only one queue for GPU jobs as defined in the #PBS -q line below
##
#PBS -q gpu
##
## The default walltime in the gpu queue is one day(24 hours)
## The maximum walltime in the gpu queue is five days(120 hours)
## In order to increase the walltime modify the #PBS -l walltime line below
## and remove one of the leading # characters
##
##PBS -l walltime=24:00:00
##
## STEP 4:
##
## Replace the [email protected] email address
## with your Cranfield email address on the #PBS -M line below:
## Your email address is NOT your username
##
#PBS -m abe
#PBS -M [email protected]
##
## ====================================
## DO NOT CHANGE THE LINES BETWEEN HERE
## ====================================
#PBS -j oe
#PBS -v "CUDA_VISIBLE_DEVICES="
#PBS -W sandbox=PRIVATE
#PBS -k n
ln -s $PWD $PBS_O_WORKDIR/$PBS_JOBID
## Allocated gpu(s)
echo CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES
## Change to working directory
cd $PBS_O_WORKDIR
## Calculate number of CPUs and GPUs
export cpus=`cat $PBS_NODEFILE | wc -l`
export gpus=`echo $CUDA_VISIBLE_DEVICES|awk -F"," '{print NF}'`
## ========
## AND HERE
## ========
##
## STEP 5:
##
## Load the default application environment
## For a specific version add the version number, e.g.
## module load CUDA/8.0.44
##
module load CUDA
##
## STEP 6:
##
## Run gpu application
##
## Put correct parameters and cuda application in the line below:
##
/apps/software/CUDA/9.0.176/extras/demo_suite/deviceQuery
## Tidy up the log directory
## DO NOT CHANGE THE LINE BELOW
## ============================
rm $PBS_O_WORKDIR/$PBS_JOBID
#
#!/bin/bash
##
## Workbench submission script for PBS on CRESCENT
## -----------------------------------------------
##
## Follow the 6 steps below to configure your job
##
## STEP 1:
##
## Enter a job name after the -N on the line below:
##
#PBS -N workbench-example
##
## STEP 2:
##
## Select the number of cpus/cores required by modifying the #PBS -l select line below
##
## Normally you select cpus in chunks of 16 cpus
## The Maximum value for ncpus is 16 and mpiprocs MUST be the same value as ncpus.
##
## If more than 16 cpus are required then select multiple chunks of 16
## e.g. 16 CPUs: select=1:ncpus=16:mpiprocs=16
## 32 CPUs: select=2:ncpus=16:mpiprocs=16
## 48 CPUs: select=3:ncpus=16:mpiprocs=16
## ..etc..
##
#PBS -l select=1:ncpus=16:mpiprocs=16
##
## STEP 3:
##
## Select the correct queue by modifying the #PBS -q line below
##
## half_hour - 30 minutes
## one_hour - 1 hour
## half_day - 12 hours
## three_hour - 3 hours
## six_hour - 6 hours
## one_day - 24 hours
## two_day - 48 hours
## five_day - 120 hours
## ten_day - 240 hours (by special arrangement)
##
#PBS -q half_hour
##
## STEP 4:
##
## Replace the [email protected] email address
## with your Cranfield email address on the #PBS -M line below:
## Your email address is NOT your username
##
#PBS -m abe
#PBS -M [email protected]
##
## ====================================
## DO NOT CHANGE THE LINES BETWEEN HERE
## ====================================
#PBS -l application=ansys
#PBS -j oe
#PBS -W sandbox=PRIVATE
#PBS -k n
ln -s $PWD $PBS_O_WORKDIR/$PBS_JOBID
## Change to working directory
cd $PBS_O_WORKDIR
## Calculate number of CPUs
export cpus=`cat $PBS_NODEFILE | wc -l`
# Get node list from PBS and format for ANSYS
ANSYS_NODES=`uniq -c ${PBS_NODEFILE} | awk -F. '{ print $1 }' | awk '{print $2 ":" $1}' | paste -s -d ':'`
## load module required by ANSYS
module load libXt libxcb
## Set dummy Display
export DISPLAY=hpcxserv-1.central.cranfield.ac.uk:0.0
## ========
## AND HERE
## ========
##
## STEP 5:
##
## Load the default application environment
## For a specific version add the version number, e.g.
## module load ANSYS/17.1
##
module load ANSYS
##
## STEP 6:
##
## Put correct parameters in workbench execution line
## below (i.e. replace wbsimulation.wbjn with your journal filename):
## see wbsimulation.wbjn in /apps/example/pbs for format of workbench journal file
##
runwb2 -b -r wbsimulation.wbjn
## Tidy up the log directory
## DO NOT CHANGE THE LINE BELOW
## ============================
rm $PBS_O_WORKDIR/$PBS_JOBID
#
Hello
If all you need to do is run solvers then explore configuring up ANSYS RSM to PBS or running Fluent under a scheduler per the documentation.
The graphics card model may not work for GPU acceleration and may not offer much benefit.
Running Workbench in batch may not be necessary unless other things are also being done.