Changes between Version 2 and Version 3 of OfflineAdaptParallelization

Dec 11, 2019, 6:36:06 PM (4 years ago)



  • OfflineAdaptParallelization

    v2 v3  
    4040The 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. In the offline mode, it would be sufficient to conduct all parallel communication using only `MPI_COMM_WORLD`. However, as PDAF uses the three communicators listed above internally, they have to be initialized. In general they will be identical to `MPI_COMM_WORLD` with the exception of `COMM_couple`, which is not used in the offline mode.
     43[[BR]]'''Figure 1:''' Example of a typical configuration of the communicators for the offline coupled assimilation with parallelization. In this example we have 4 processes. The communicators COMM_model, COMM_filter, and COMM_couple need to be initialized. However, COMM_model and COMM_filter use all processes (as MPI_COMM_WORLD) and COMM_couple is a group of communicators each holding only one process. Thus the initialization of the communicators is simpler than in case of the [wiki:AdaptParallelization parallelization for the online coupling].
    4246== Initializing the communicators ==
    4751For the offline mode, the variable `n_modeltasks` should always be set to one, because no integrations are performed in the assimilation program. The routine `init_parallel_pdaf` splits the communicator `MPI_COMM_WORLD` and defines the three communicators described above. In addition, the variables `npes_world` and `mype_world` are defined. These can be used in the user-supplied routines to control, for example, which process write information to the screen. The routine defines several more variables that are declared and held in the module `mod_parallel`. It can be useful to use this module with the model code as some of these variables are required when the initialization routine of PDAF (`PDAF_init`) is called.
     53The initialization of the communicators is different for the offline and online modes. You can find a template in the tutorial implementations for the offline case, e.g. in `tutorial/offline_2D_parallel`.
    4955== Arguments of `init_parallel_pdaf` ==
    5864  * 1: Display standard information about the configuration of the processes (recommended)
    5965  * 2: Display detailed information for debugging