Back to OASIS4 home
Routine
psmile_enddef_appl (tag, my_icomp0_coll_comps, n_active, ierror)
Subroutine "PSMILe_Enddef_appl" finishs the definition
phase for the application. The data of all components is stored in
global array "all_comp_infos".
my_icomp0_coll_comps : Index 0 of component
information of actual application in collected component information
"all_comp_infos"; i.e. the component information of actual application
is stored in all_comp_infos
(my_icomp0_coll_comps+1:my_icomp0_coll_comps+n_active)
n_active : Number of active components in actual application
(participating to the coupling)
Initialisation
ierror = 0
master_rank = 0
i_am_master = .false.
Collect some data (active components, global ids ..) of all application
processes
within the application communicator "Appl%comm"
Create communicator for roots of applications comm_appl_roots ==> i_am_master is
the root of the root processes of comm_appl_roots
the corresponding global rank of i_am_master in the comm_psmile is master_rank = psmile_rank
Broadcast master_rank to all processes in the comm_psmile
Collect the data (Number_of_comps_per_appl, root_ranks,
Number_of_Grids_Vector, psmile_ranks, all_extents, all_extent_infos)
within the roots of applications.
The data is collected on the root of communicator comm_appl_roots :
- Collect the number of components in the master process
- Collect the psmile ranks of root processes
- Collect the number of processes per component in the master process i_am_master to allocate all_comp_infos
(1:Number_of_coll_comps)
- Collect b_comps (==> comp_infos)
in all_comp_infos on the master process i_am_master using the MPI datatype
datatype_enddef_comp : only the integer or double precision will be
transfered, not the pointers.