next up previous
Next: OASIS3-MCT Application Programming Interface Up: Interfacing a component code Previous: Interfacing a component code


Configurations of components supported

With OASIS3-MCT_3.0, coupling exchanges between components and sub-components deployed in a much larger diversity of configurations are now supported. This is illustrated on figure 2.1 and how to use the OASIS3-MCT library accordingly is detailed on figure 2.2. All OASIS3-MCT API routines are also described in details in section 2.2.

We call here an ``executable'' a compiled code forming a part of or the whole coupled system (started with the mpirun or mpiexec command). A ``component'' is the ensemble of processes, or tasks, within the coupled system calling oasis_init_comp with the same comp_name argument (see section 2.2.2). A ``sub-component'' is the subset of tasks within a component sending or receiving coupling fields on a specific grid; of course, a component may have only one sub-component that gathers all its tasks.

Practical examples of how to use the OASIS3-MCT library are also given in examples/ tutorial and examples/test_1bin_ocnice (see sections 6.3.1 and 6.3.2).

With OASIS3-MCT_3.0, it is now possible to (the text between [ and ] refers to figure 2.1) :

Figure 2.1: The different configuration of components supported by OASIS3-MCT_3.0. Two executables exe1 and exe2 are running concurrently on separate sets of MPI tasks (0-5 for exe1 and 6-37 for exe2). Executable exe1 includes only one component comp1 that has coupling fields defined on only one grid grid1 (decomposed on all its 6 tasks). Executable exe2 includes 3 components, comp2, comp3, and comp4 running concurrently respectively on tasks 6-11, 12-33 and 34-37. Component comp2 participates in the coupling with fields defined on only one coupling grid grid2 (decomposed on all its 5 tasks) while comp4 does not participate at all in the coupling. Component comp3 has 3 sub-components, respectively exchanging coupling fields defined on grid3 (tasks 12-21), grid4 (tasks 22-30) and grid5 (tasks 12-26, therefore overlaping with both grid3 and grid4); finally, comp3 has 3 tasks (31-33) not involved in the coupling. Sub-components exe2-comp3-grid3 and exe2-comp3-grid5, or sub-components exe2-comp3-grid4 and exe2-comp3-grid5 are examples of coupling between sub-components running sequentially on overlapping sets of tasks.
\includegraphics[scale=.6]{figures/coupling_layouts_a}

Figure 2.2: The sequence of OASIS3-MCT calls that have to be implemented in the codes so to allow the configuration of components described on figure 2.1. Each MPI tasks has to call oasis_init_comp once with the name of its component as $2^{nd}$ argument. As none of comp4 tasks is participating to the coupling, comp4 tasks calls oasis_init_comp with coupled=.false.” as $4^{th}$ argument and does not call any other OASIS3-MCT routine. As some of comp3 tasks are participating to the coupling, all comp3 tasks have to call oasis_init_comp, oasis_get_localcomm, oasis_create_couplcomm, oasis_enddef and oasis_terminate (these are the only routine to be called by comp3 tasks 31-33 not participating to the coupling). To initialise the coupling exchanges, the tasks of a sub-component holding a field decomposed on a specific grid have to call the oasis_def_partition to express the decomposition of the grid, oasis_def_var to declare the coupling field and oasis_enddef. Finally, the tasks of a sub-component exchanging coupling fields have to call oasis_put and oasis_get accordingly.
\includegraphics[scale=.6]{figures/coupling_layouts_b}

The sequence of OASS3-MCT API routines that have to be called in the different cases is detailed on figure 2.2. These routines are also described in detail in the next section.


next up previous
Next: OASIS3-MCT Application Programming Interface Up: Interfacing a component code Previous: Interfacing a component code
Laure Coquart 2017-11-23