Back to OASIS4 home

Some personal notes on the driver of OASIS4 in a coupled configuration (ie the driver reads scc and smioc files, and not the application as in the case of the mode stand alone)

In MPI1 : there is only one communicator MPI_COMM_WORLD for oasis4 and the different applications when there are launched. It will be necessary to redefined a local comm to each appl, to oasis4, ...
In MPI2 : oasis4 and each application has its MPI_COMM_WORLD but it is done in a such way that oasis4 launches each executable one after the other, creating every time a new global comm with everyboby.

For example, for sga_smioc_comp, as the application and the driver have different executables, the memory are not shared. This is the reason why the transformer has to send the data to the Psmile.
This is also the case for global variables inside the Driver (or inside an application). These variables once they are initialised, will be known by the routines calling the modules in which they are defined, but they have to be sent by the Driver's master to all the proc of the transformer.


In prismdrv_init, the all the procs of the driver finds PRISMdrv_root (which can be different from 0) among the procsses of the driver ; it is the min among the ranks of the driver. It is also in this routine that the standard output is redirected.
In prismdrv_set_scc_info, the master process PRISMdrv_root collects the xml infos in the scc file and send the some informations needed to allocate the structures to the other processes of the driver.
The smioc are read twice by PRISMdrv_root because of user def

In prismtrs_loop, the different processors of the Transformer receive informations of the processes of the models to perform the interpolation(s).

The epio is a local variable, defined on each proc of the Transformer.

It is the source, defined by its global rank, that asks for transformer_id, for epio_handle ..., that send epios, that send epiot, that send the neighbours. Each source proc sends its different epio.
On the othe side, when a proc target wants an interpolated field, it sends the epio it wants to receive mp%recv_infos_coupler(index)%epio_id coming from the transformer rank mp%recv_infos_coupler(index)%trs_rank. If there is more than one field (clones fields) there are all asked at the same time => to be seen later more complex.
in driver.0 : Number of proc to proc exchanges of transients is the number of epio that will be treated.