43 | | 2. Check whether the model uses `MPI_COMM_WORLD`. |
44 | | * If yes, then replace `MPI_COMM_WORLD` in all places except MPI_abort and MPI_finalize by a user-defined communicator, e.g `COMM_mymodel`, which can be initialized as `COMM_mymodel=MPI_COMM_WORLD`. |
45 | | * If no, then take note of the name of the communicator variable (we assume it's `COMM_mymodel`). The next steps are valid if the model uses COMM_mymodel, but setting it to MPI_COMM_WORLD. If the model is using less processes, this is a [#SpecialCase special case, which we discuss further below]. |
46 | | 3. Insert the call `init_parallel_pdaf` directly after `MPI_init`. |
47 | | 4. Adapt `init_parallel_pdaf` so that at the end of this routine you set `COMM_mymodel=COMM_model`. Potentially, also set the rank and size variables of the model, respectively, by `mype_model` and `npes_model`. |
48 | | 5. The number of model tasks in variable `n_modeltasks` is required by `init_parallel_pdaf` to perform commucator splitting. In the tutorial code we added a command-line parsing to set the variable (it is parsing for `dim_ens`). One could also read the value from a configuration file. |
| 43 | 1. Insert the call `init_parallel_pdaf` directly after `MPI_init`. |
| 44 | 1. Check whether the model uses `MPI_COMM_WORLD`. |
| 45 | * If yes, then replace `MPI_COMM_WORLD` in all places except `MPI_abort` and `MPI_finalize` by a user-defined communicator (we call it `COMM_mymodel` here), which can be initialized as `COMM_mymodel=MPI_COMM_WORLD`. |
| 46 | * If no, then take note of the name of the communicator variable (we assume it's `COMM_mymodel`). The next steps are valid if the model uses `COMM_mymodel` in a way that all processes of the program are included (thus analogous to `MPI_COMM_WORLD`). If the model is using less processes, this is a [#SpecialCase special case, which we discuss further below]. |
| 47 | 1. Adapt `init_parallel_pdaf` so that at the end of this routine you set `COMM_mymodel=COMM_model`. Potentially, also set the rank and size variables of the model, respectively, by `mype_model` and `npes_model`. |
| 48 | 1. The number of model tasks in variable `n_modeltasks` is required by `init_parallel_pdaf` to perform commucator splitting. In the tutorial code we added a command-line parsing to set the variable (it is parsing for `dim_ens`). One could also read the value from a configuration file. |