This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
howto:fds [2018/07/26 14:33] ccrosby created |
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. |
| - | When running | + | < |
| - | tasks. | + | module load chpc/ |
| - | Onera M6 transonic wing example | + | 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, | ||
| + | ## | ||
| + | ## 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 | ||
| + | #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 | ||
| + | #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 | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| + | mpirun -np $nproc -machinefile $PBS_NODEFILE fds_openmp FDS_inputFile.fds > fds.out | ||
| + | </file> | ||
| + | |||
| + | ===== Sample PBS script for version 6.7.0 ===== | ||
| <file bash runFDS.qsub> | <file bash runFDS.qsub> | ||
| - | #!/bin/bash | + | # |
| - | # This example script | + | ## Lines starting with the # symbol are comments, unless followed by ! or PBS, |
| - | #PBS -P projectid | + | ## in which case they are directives |
| - | #PBS -l select=3: | + | ## The following PBS directive |
| - | #PBS -q normal | + | ## The $PBS_NODEFILE file will contain |
| - | #PBS -l walltime=01:00:00 | + | ## This is only meaningful if your model contains 16 grids |
| - | #PBS -o / | + | ## The number of grids must match the number of MPI processes |
| - | #PBS -e /home/username/scratch/foamJobs/job01/stderr | + | #PBS -l select=2: |
| - | #PBS -m abe | + | ## Specify your own project shortcode here |
| - | #PBS -M user@wherever.co.za | + | #PBS -P MECH1234 |
| - | #### Setup environment for SU2 | + | ## The walltime should be a small overestimate of the expected run time |
| - | module add chpc/compmech/SU2/6.1 | + | ## Requesting a very long walltime may delay the start of your job |
| - | # The -d option used with moab no longer works. | + | ## If the requested walltime is too short, the job will be killed before it is finished |
| - | export PBS_JOBDIR=/ | + | #PBS -l walltime=6:00:00 |
| - | # Explicitly change to the job directory | + | ## Obviously use your own paths here |
| + | #PBS -e /mnt/lustre/users/jblogs/FDS_Runs/stderr.txt | ||
| + | #PBS -o /mnt/lustre/users/ | ||
| + | export PBS_JOBDIR=/ | ||
| cd $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` | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| - | ### Run the SU2_CFD solver | + | mpirun -np $nproc |
| - | mpirun -np $nproc | + | |
| - | ### Check to see if the solution_flow.dat file exists. | + | |
| - | ### use it to generate the necessary output files. | + | |
| - | ### copy the restart file to solution_flow.dat and generate the output. | + | |
| - | ### Make sure that these two file names are consistent with what you have | + | |
| - | ### used in the .cfg file for the run. | + | |
| - | if [ ! -e solution_flow.dat ] ; | + | |
| - | | + | |
| - | cp restart_flow.dat solution_flow.dat | + | |
| - | fi | + | |
| - | ### Build the specified format output files | + | |
| - | SU2_SOL inv_ONERAM6_JST.cfg > SU2_SOL.out | + | |
| </ | </ | ||
| - | ===== Postprocesing | + | ===== Postprocessing |
| - | By default, the SU2 example cases write Tecplot format output files. | + | Smokeview is also installed on the system, and can be accessed with the command '' |
| - | for Tecplot, although it is possible to read Tecplot files into Paraview. | + | |
| - | it is easy to specify Paraview format output files (VTK) directly. | + | 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 ===== | ||
| + | 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 === | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | |||