User Tools

Site Tools


howto:rocky_dem

This is an old revision of the document!


Running the commercial discrete element code Rocky DEM on the CHPC system

Introduction

Please refer to the Rocky DEM home page for more information on Rocky, a commercial code targeted at discrete element modelling. The current version of the code is 4.3, and has been installed in '/apps/chpc/compmech/Rocky/rocky4/Rocky'. Discrete element modelling lends itself to execution on GPUs, and the performance benefit is so compelling that there is little point in running the code on CPU

Sample PBS script

runRocky.qsub
#!/bin/bash
## Lines starting with the # symbol are comments, unless followed by ! or PBS, 
##  in which case they are directives
## The following PBS directive requests one GPU node with two GPUs
##  The environment variable $CUDA_VISIBLE_DEVICES will contain the indices of the GPUs assigned to this job
##  
#PBS -l select=1:ncpus=20:mpiprocs=20:ngpus=2 -q gpu_2 
## Specify your own project shortcode here
#PBS -P RCHPC 
## The walltime should be a small overestimate of the expected run time
##  Requesting a very long walltime may delay the start of your job
##  If the requested walltime is too short, the job will be killed before it is finished
#PBS -l walltime=2:00:00
##  Obviously use your own paths here
#PBS -e /home/jblogs/lustre/Rocky_Run/stderr.txt
#PBS -o /home/jblogs/lustre/Rocky_Run/stdout.txt
## These two lines will send you an email on Abort, Begin and End of the job
##  Obviously use your own real email address
#PBS -m abe
#PBS -M jblogs@email.co.za
## Tell the system where your Rocky case is
export PBS_JOBDIR=/home/jblogs/lustre/Rocky_Run
## Change into that directory
cd $PBS_JOBDIR
## There is no license available on this particular port.  Licensing needs to be negotiated with the software vendor
export LM_LICENSE_FILE=4321@chpclic1
## Parse the environment variable to find the GPU(s) assigned to you, and pass this information to Rocky.
IFS=', ' read -r -a gpulist <<< "$CUDA_VISIBLE_DEVICES"
gpulistparameter=""
for element in "${gpulist[@]}"
 do
     gpulistparameter=$gpulistparameter" --gpu-num="$element
 done
echo $gpulistparameter
## Run the solver
/apps/chpc/compmech/Rocky/rocky4/Rocky --simulate  "./MyRockyCase.rocky" --resume=1 --use-gpu=1  $gpulistparameter
/app/dokuwiki/data/attic/howto/rocky_dem.1581324983.txt.gz · Last modified: 2021/12/09 16:42 (external edit)