This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:fds [2018/07/27 10:07] ccrosby [Sample PBS script] |
howto:fds [2022/10/05 13:35] (current) ccrosby [Postprocessing] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Running the open-source Fire Dynamics Simulator FDS on the CHPC system ====== | ====== Running the open-source Fire Dynamics Simulator FDS on the CHPC system ====== | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | Please refer to [[https:// | + | Please refer to [[https:// |
| - | ===== Sample PBS script ===== | + | The most recent version is FDS-6.7.9. |
| + | < | ||
| + | module load chpc/ | ||
| + | module load chpc/ | ||
| + | </ | ||
| + | |||
| + | This will give you access to two fds executables: | ||
| + | - fds has been compiled without support for OpenMP and should be used with MPI only | ||
| + | - fds_openmp has been compiled with OpenMP support and can be used for single node and hybrid parallel runs | ||
| + | |||
| + | If you intend using MPI parallel, it will be necessary to provide a machinefile for this version, which has not been compiled with one of the system MPI compilers. | ||
| + | < | ||
| + | mpirun -np 48 -machinefile $PBS_NODEFILE fds box_burn_away1.fds > fds.out | ||
| + | </ | ||
| + | |||
| + | If you want to run Smokeview on a compute node, it will be necessary to load a module for Mesa software rendering: | ||
| + | < | ||
| + | module load chpc/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Sample PBS script | ||
| + | |||
| + | <file bash runFDS679.qsub> | ||
| + | # | ||
| + | ## Lines starting with the # symbol are comments, unless followed by ! or PBS, | ||
| + | ## in which case they are directives | ||
| + | ## The following PBS directive requests two 24 core compute nodes | ||
| + | ## The $PBS_NODEFILE file will contain the hostnames for 16 MPI processes (2 X 8, as per mpiprocs) | ||
| + | ## This is only meaningful if your model contains 16 grids | ||
| + | ## The number of grids must match the number of MPI processes | ||
| + | #PBS -l select=2: | ||
| + | ## Specify your own project shortcode here | ||
| + | #PBS -P MECH1234 | ||
| + | ## 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=6: | ||
| + | ## Obviously use your own paths here | ||
| + | #PBS -e / | ||
| + | #PBS -o / | ||
| + | export PBS_JOBDIR=/ | ||
| + | cd $PBS_JOBDIR | ||
| + | module load chpc/ | ||
| + | ## Assign a sensible value for OMP_NUM_THREADS | ||
| + | ## If your number of MPI processes is a multiple of ## 24, it will be best to set it to 1, | ||
| + | ## and not use OpenMP at all | ||
| + | ## A value greater than 3 does not help | ||
| + | export OMP_NUM_THREADS=3 | ||
| + | ## The number of MPI processes is extracted from the length of the machinefile $PBS_NODEFILE | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| + | mpirun -np $nproc -machinefile $PBS_NODEFILE fds_openmp FDS_inputFile.fds > fds.out | ||
| + | </ | ||
| + | |||
| + | ===== Sample PBS script for version 6.7.0 ===== | ||
| <file bash runFDS.qsub> | <file bash runFDS.qsub> | ||
| Line 21: | Line 75: | ||
| #PBS -l walltime=6: | #PBS -l walltime=6: | ||
| ## Obviously use your own paths here | ## Obviously use your own paths here | ||
| - | #PBS -e /home/jblogs/lustre/ | + | #PBS -e /mnt/ |
| - | #PBS -o /home/jblogs/lustre/ | + | #PBS -o /mnt/ |
| - | ## These two lines will send you an email on Abort, Begin and End of the job | + | export PBS_JOBDIR=/ |
| - | ## Obviously use your own real email address | + | |
| - | #PBS -m abe | + | |
| - | #PBS -M jblogs@email.co.za | + | |
| - | export PBS_JOBDIR=/ | + | |
| cd $PBS_JOBDIR | cd $PBS_JOBDIR | ||
| module load chpc/ | module load chpc/ | ||
| Line 37: | Line 87: | ||
| ## The number of MPI processes is extracted from the length of the machinefile $PBS_NODEFILE | ## The number of MPI processes is extracted from the length of the machinefile $PBS_NODEFILE | ||
| nproc=`cat $PBS_NODEFILE | wc -l` | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| - | mpirun -np $nproc | + | mpirun -np $nproc fds FDS_inputFile.fds > fds.out |
| </ | </ | ||
| ===== Postprocessing ===== | ===== Postprocessing ===== | ||
| - | Smokeview is also installed on the system, and can be accessed with the command '' | + | Smokeview is also installed on the system, and can be accessed with the command '' |
| + | |||
| + | If you want to run Smokeview on a compute node, please read the instructions at https:// | ||
| + | |||
| + | It may also be practical to use the very well-developed visualisation codes [[howto: | ||
| ===== Parallel Scaling ===== | ===== Parallel Scaling ===== | ||
| + | FDS implements two forms of parallisation, | ||
| + | |||
| + | |||
| + | OpenMP provides only modest improvement in performance, | ||
| + | |||
| + | |||
| + | MPI parallel will only work if the model has been set up in such a way that the number of grids is equal to the number of MPI processes. | ||
| === Scaling graphs === | === Scaling graphs === | ||