NOTE: Most users will not need to go through this step as MPI will be enabled when using the packaged installation script as described on this page: Building the Flow Solver
Enabling MPI Support
To build an MPI based parallel executable version of nsu3d, the MPI variable in the make file should be set to:
MPI = MPI_ON
This has the effect of including all calls to the MPI message-passing library. In addition to this, the appropriate MPI library must be linked at load time. This can be usually be accomplished in two manners:
In order to run an MPI executable, the appropriate mpirun or mpiexec utility must be used. Thus, for example a 32 processor run is invoked as:
mpirun -np 32 nsu3d input.d
The -np parameter denotes the requested number of MPI processes. This is usually equal to the number of available processors, but may be a different number in principle. If -np is larger than the number of processors, multiple MPI processes will be assigned to each processor. If -np is smaller than the number of processors, idle processors will result.
In all cases, the -np parameter should be no larger than the number of partitions in the partitioned grid file, or the run will fail. On the other hand, the -np parameter can be smaller than the number of grid partitions. In this case, multiple grid partitions are processed sequentially by each MPI process. Efficient execution is achieved when the number of grid partitions is a multiple of the number of MPI processes. For example, a 32 way grid partition can be run efficiently on 1, 2, 4, 16, or 32 MPI processes.