NOTE: Most users will not need to go through this step as Hybrid MPI-OpenMP support will be enabled when using the packaged installation script as described on this page: Building the Flow Solver
Enabling Hybrid MPI-OpenMP Support
In order to build a hybrid MPI-OpenMP executable version of nsu3d, the procedure described for building an MPI based executable should be followed.
In addition to this, the appropriate compilation flags for OpenMP parallelization are required in the FFLAGS variable for the fortran compiler. Usually, this is achieved using the -mp compilation flag, along with any other desired optimization flags.
In order to run the hybrid MPI-OpenMP executable, the mpirun facility must be invoked as described previously:
mpirun -np 8 nsu3d < input.d
Where the -np parameter denotes the requested number of MPI processes. In addition, the NTHREAD parameter in the input file must be set to the number of desired threads to be spawned under each MPI process. For example, NTHREAD = 4 in this case will result in a 8x4 = 32 way parallel job, using 8 MPI processes running 4 threads apiece.
The rules for number of threads and MPI processes in relation to the number of grid partitions remains similar to those described previously