This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.
MPMD execution of a code coupling in batch
The MPMD (Multiple Program Multiple Data) execution model is supported
on Jean Zay. In this case, different executables are launched and communicate
with each other using MPI; all MPI processes are included within the
same communicator MPI_COMM_WORLD.
This execution model is achieved using a text file (named here
mpmd.conf) which contains the correspondence between the MPI processes and the
executables. This file then replaces an executable name as an argument of the srun command by being preceded by the --multi-prog option:
srun --multi-prog ./mpmd.conf
MPMD coupling of MPI codes
As an example, here is a configuration file that couples 3 MPI codes with a total of 8 MPI processes started:
0 ./a.out
1-3,7 ./b.out
4-6 ./c.out
- the MPI process of rank 0 is from the executable
./a.out, - the 4 MPI processes of rank 1 to 3 and 7 are from
./b.out, - the 3 MPI processes of rank 4 to 6 are from
./c.out.
The rest of the submission script is identical to that described for the execution of a parallel MPI code in batch but taking care to reserve 8 cores (#SBATCH --nodes=1 ; #SBATCH --ntasks-per-node=8).