7 | | The parallel region of an MPI parallel program is initialized by calling MPI_init. MPI uses communicators to define sets of parallel processes. By calling MPI_init, the communicator MPI_COMM_WORLD is initialized. This communicator contains all processes of the MPI-parallel program. Often it is sufficient to conduct all parallel communication using this communicator. Thus, numerical models often use only MPI_COMM_WORLD to control all communication. However, this approach will not allow for parallel model tasks. In order to allow parallel model tasks, it is required to replace MPI_COMM_WORLD by an alternative communicator that is split for the model tasks. We will denote this communicator COMM_MODEL. |
| 7 | |
| 8 | == Three communicators == |
| 9 | |
| 10 | MPI uses so-called 'communicators' to define sets of parallel processes. In order to provide the 2-level parallelism, three communicators need to be initialized that define the processes that are involved in different tasks of the data assimilation system. |
| 11 | The required communicators are initialized in the routine `init_parallel_pdaf` and called |
| 12 | * `COMM_model` - defines the processes that are involved in the model integrations |
| 13 | * `COMM_filter` - defines the processes that perform the filter analysis step |
| 14 | * `COMM_couple` - defines the processes that are involved when data are transferred between the model and the filter |
| 15 | |
| 16 | The parallel region of an MPI parallel program is initialized by calling `MPI_init`. By calling `MPI_init`, the communicator `MPI_COMM_WORLD` is initialized. This communicator is pre-defined by MPI to contain all processes of the MPI-parallel program. Often it is sufficient to conduct all parallel communication using only `MPI_COMM_WORLD`. Thus, numerical models often use only this communicator to control all communication. However, as `MPI_COMM_WORLD` contains all processes of the program, this approach will not allow for parallel model tasks. In order to allow parallel model tasks, it is required to replace `MPI_COMM_WORLD` by an alternative communicator that is split for the model tasks. We will denote this communicator `COMM_model`. |
| 17 | |
| 18 | == Using COMM_model == |
| 19 | |