User Tools

Site Tools


howto:su2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howto:su2 [2015/06/27 21:33]
ccrosby
howto:su2 [2022/11/02 16:10] (current)
ccrosby [Sample PBS script]
Line 1: Line 1:
 ====== Running the open-source code SU2 on the CHPC system ====== ====== Running the open-source code SU2 on the CHPC system ======
 ===== Introduction ===== ===== Introduction =====
-Please refer to [[http://su2.stanford.edu|the SU2 home page]] for more information on SU2, an open-source code targeted at aerodynamics and adjoint shape development.  The current version of the is 4.0, and has been installed in '''/opt/gridware/non-supported/SU2''' +Please refer to [[http://su2.stanford.edu|the SU2 home page]] for more information on SU2, an open-source code targeted at aerodynamics and adjoint shape development.  The current version of the code is 6.2.0, and has been installed in '''/apps/chpc/compmech/CFD/SU2''' There are modules for the SU2 versions installed on Lengau ''module load chpc/compmech/SU2/6.2-intel'' will set up the environment for the latest version, compiled with the Intel compiler There are also versions compiled with gcc/mpich and pgi/mpich.
- +
-===== Environment ===== +
-To set up a suitable environment for running SU2, add the following lines to your .bashrc file and ensure that they are sourced: +
- +
-<code> +
-#### Setup environment for SU2, uses some OpenFOAM stuff,  +
-#### therefore start by setting up OpenFOAM-2.4.0 environment +
-. /opt/gridware/applications/OpenFOAM/OF240 +
-module load /opt/gridware/bioinformatics/modules/python/2.7.5 +
-export SU2_RUN="/opt/gridware/non-supported/SU2/bin" +
-export SU2_HOME="/opt/gridware/non-supported/SU2/SU2v4.0.0" +
-export PATH=$PATH:$SU2_RUN +
-export PYTHONPATH=$PYTHONPATH:$SU2_RUN +
-</code> +
- +
-The OpenFOAM settings are merely there to ensure that some more recent libraries and utilities that were compiled for OpenFOAM are available.  SU2 has nothing whatsoever to do with OpenFOAM.+
  
 ===== Sample PBS script ===== ===== Sample PBS script =====
Line 24: Line 8:
 Onera M6 transonic wing example from the TestCases/euler/oneram6 directory. Onera M6 transonic wing example from the TestCases/euler/oneram6 directory.
  
-<code>+<file bash runSU2.qsub>
 #!/bin/bash  #!/bin/bash 
-# This example script requests nodes of the ''Dell'' cluster, each with 12 processor cores +# This example script requests nodes of the cluster, each with 24 processor cores 
-#PBS -l select=4:ncpus=12:mpiprocs=12:mem=2GB:jobtype=dell,place=free:group=nodetype +#PBS -P projectid 
-#PBS -q workq+#PBS -l select=3:ncpus=24:mpiprocs=24:nodetype=haswell_reg 
 +#PBS -q normal
 #PBS -l walltime=01:00:00 #PBS -l walltime=01:00:00
-#PBS -o /export/home/user/scratch/SU2/TestCases/euler/oneram6/stdout +#PBS -o /mnt/lustre/users/username/su2Jobs/job01/stdout 
-#PBS -e /export/home/user/scratch/SU2/TestCases/euler/oneram6/stderr+#PBS -e /mnt/lustre/users/username/su2Jobs/job01/stderr
 #PBS -m abe #PBS -m abe
 #PBS -M user@wherever.co.za #PBS -M user@wherever.co.za
-Setup the environment +#### Set up environment for SU2 
-#### Setup environment for SU2, uses some OpenFOAM stuff,  +module add chpc/compmech/SU2/6.2-intel  
-#### therefore start by setting up OpenFOAM-2.4.0 environment +# Set the working directory environment variable explicitly. 
-. /opt/gridware/applications/OpenFOAM/OF240 +export PBS_JOBDIR=/mnt/lustre/users/username/su2Jobs/job01 
-module load /opt/gridware/bioinformatics/modules/python/2.7.5 +Change to the job directory
-export SU2_RUN="/opt/gridware/non-supported/SU2/bin" +
-export SU2_HOME="/opt/gridware/non-supported/SU2/SU2v4.0.0" +
-export PATH=$PATH:$SU2_RUN +
-export PYTHONPATH=$PYTHONPATH:$SU2_RUN +
-The -d option used with moab no longer works.  Set this environment variable explicitly. +
-export PBS_JOBDIR=/export/home/user/SU2/TestCases/euler/oneram6 +
-Explicitly change to the job directory+
 cd $PBS_JOBDIR cd $PBS_JOBDIR
 nproc=`cat $PBS_NODEFILE | wc -l` nproc=`cat $PBS_NODEFILE | wc -l`
 ### Run the SU2_CFD solver ### Run the SU2_CFD solver
-mpirun -np $nproc -machinefile $PBS_NODEFILE SU2_CFD inv_ONERAM6_JST.cfg > SU2_CFD.out+### For the gcc/mpich and PGI/mpich versions, use mpirun -iface ib0 .... 
 +mpirun -np $nproc SU2_CFD inv_ONERAM6_JST.cfg > SU2_CFD.out
 ### Check to see if the solution_flow.dat file exists.  If it does,  ### Check to see if the solution_flow.dat file exists.  If it does, 
 ###  use it to generate the necessary output files.  If it doesn't,  ###  use it to generate the necessary output files.  If it doesn't, 
Line 60: Line 39:
 fi fi
 ### Build the specified format output files ### Build the specified format output files
-mpirun -np 1 -machinefile $PBS_NODEFILE SU2_SOL inv_ONERAM6_JST.cfg > SU2_SOL.out +SU2_SOL inv_ONERAM6_JST.cfg > SU2_SOL.out 
-</code>+</file>
  
-===== Postprocesing =====+===== Postprocessing =====
 By default, the SU2 example cases write Tecplot format output files.  CHPC does not have a license  By default, the SU2 example cases write Tecplot format output files.  CHPC does not have a license 
 for Tecplot, although it is possible to read Tecplot files into Paraview.  However, in the SU2 input file  for Tecplot, although it is possible to read Tecplot files into Paraview.  However, in the SU2 input file 
 it is easy to specify Paraview format output files (VTK) directly.  Refer to [[howto:remote_viz|the instructions on Remote Visualization]] to obtain a graphics environment for post-processing with VirtualGL and [[howto:paraview|Paraview]] or [[howto:visit|VisIt]]. it is easy to specify Paraview format output files (VTK) directly.  Refer to [[howto:remote_viz|the instructions on Remote Visualization]] to obtain a graphics environment for post-processing with VirtualGL and [[howto:paraview|Paraview]] or [[howto:visit|VisIt]].
 +
 +===== Scaling =====
 +SU2 scales reasonably well, down to about 50 000 cells per core.  Performance with the Intel compiler is better than GCC or PGI.  Refer to the following graph:
 +
 +{{:howto:su2_scaling_6.2.png|}}
/app/dokuwiki/data/attic/howto/su2.1435433634.txt.gz · Last modified: 2021/12/09 16:42 (external edit)