1 Configurations of components supported
Since OASIS3-MCT_3.0 release, coupling exchanges between components and
sub-components deployed in a much larger diversity of configurations
than before
are 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 sections
2.2, 2.3 and 2.4.
We call here an “executable” a compiled code
forming a part of or the whole coupled system. 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.
In examples/tutoria_communication and examples/regrid_environment one finds practical examples of how to use the OASIS3-MCT library
(see sections 6.3.1 and 6.3.3).
With OASIS3-MCT, it is currently possible to (the text between [ and ] refers to figure 2.1) :
Figure 2.1:
The different configuration of components supported by
OASIS3-MCT. 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 of 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 of 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-componentsexe2-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.
|
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 argument. As none of comp4 tasks is
participating to the coupling, comp4 tasks calls oasis_init_comp with coupled=.false.” as argument
and does not call any other OASIS3-MCT routine. As some of comp3
tasks are participating in 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.
|
- to implement coupling exchanges between two components or
sub-components running concurrently on separate sets of tasks within two different executables [A, D, E, J];
- to implement coupling exchanges between two components or
sub-components running concurrently on separate sets of tasks within one same executable [B, F, I];
- to implement coupling exchanges within one executable between
two concurrent sub-components [C]
- to implement coupling exchanges within one executable between
two sub-components running sequentially on overlapping sets of tasks (i.e. a task can be coupled to itself calling both the “put” and the “get” of the exchange) [G, H]
- to have some tasks of a component not participating to the coupling exchanges [tasks 31-33 of exe2-comp3]
- to have all processes of a component not participating to the coupling exchanges [exe2-comp4, tasks 34-37]
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.