Back to OASIS4 home


Exchanges MPI between the Transformer and the Psmile for initialisation in MPI1

prismdrv_init
psmile_init_mpi1
determine PRISMdrv_root
CALL MPI_ALLREDUCE(Appl%rank, PRISMdrv_root, 1, MPI_Integer, MPI_MIN, &
MPI_COMM_WORLD, id_err)
determine PRISMdrv_root (rank_dummy = huge)
call MPI_Allreduce ( rank_dummy, PRISMdrv_root, 1, MPI_Integer, MPI_MIN,&
MPI_COMM_WORLD, ierror )
prismdrv_init_appl
psmile_init_mpi1
check version of transformer compared to psmile
CALL MPI_Allreduce (DRV_latest_protocol_version, il_protocol_version, &
         1, MPI_Integer, MPI_MIN, comm_drv_global, id_err)
check version of psmile compared to transformer
call MPI_Allreduce (PSMILe_latest_protocol_version, protocol_version, &
                          1, MPI_Integer, MPI_MIN, comm_global, ierror)
 broadcast tot number of appl and of comp
CALL MPI_Bcast( ila_buf, il_dim_buf, MPI_Integer, PRISMdrv_root, comm_drv_global, id_err )
tot number of appl and of comp recv
call MPI_Bcast( ibuf, ndibuf, MPI_Integer, PRISMdrv_root, comm_global, ierror )
broadcast number of processes per appl
CALL MPI_Bcast(iga_appli_nb_pes(0), ig_nb_appl+1, MPI_Integer, PRISMdrv_root, &
comm_drv_global, id_err)
number of processes per appl recv
call MPI_Bcast( PRISM_applProc(0), noApplication+1, MPI_Integer, PRISMdrv_root,&
comm_global,ierror )
broadcast names of appl
CALL MPI_Bcast(cga_appli_name(0), (ig_nb_appl+1)*max_name, MPI_Character, &
PRISMdrv_root, comm_drv_global, id_err )
names of appl recv
call MPI_Bcast( PRISM_applName(0), (noApplication+1)*max_name, MPI_Character, &
PRISMdrv_root, comm_global, ierror )
broadcast names of comp
      CALL MPI_Bcast(cga_appli_compname(1), (ig_nb_tot_comps)*max_name, MPI_Character, &
PRISMdrv_root, comm_drv_global, id_err )
names of comp recv
         call MPI_Bcast( PRISM_compName(1), noComponents*max_name, MPI_Character, &
                         PRISMdrv_root, comm_global, ierror )
broadcast the number of components per appl of all applications
CALL MPI_Bcast( iga_appli_nb_comps(1), ig_nb_appl, MPI_Integer, PRISMdrv_root, &
comm_drv_global, id_err )
number of components per appl of all applications recv
call MPI_Bcast( PRISM_noCompsPerAppl(1), noApplication, MPI_Integer, &
PRISMdrv_root, comm_global, ierror )
broadcast the rank sets for all the components
CALL MPI_Bcast( iga_appli_compnbranksets(1), ig_nb_tot_comps, MPI_Integer, &
PRISMdrv_root, comm_drv_global, id_err )

rank sets for all the components recv
call MPI_Bcast( PRISM_compRankSets(1), noComponents, MPI_Integer, &
              PRISMdrv_root, comm_global, ierror )

CALL MPI_Bcast( iga_appli_compranks, ig_nbtot_ranksets*3, MPI_Integer, PRISMdrv_root, &
comm_drv_global, id_err )
call MPI_Bcast( PRISM_rankSets(1,1), noRanksets*3, MPI_Integer, &
              PRISMdrv_root, comm_global, ierror )
broadcast redirect stdout info for all applications
CALL MPI_Bcast( iga_appli_redirect(1), ig_nb_appl, MPI_Integer, PRISMdrv_root, &
comm_drv_global, id_err )
redirect stdout info for all applications recv
call MPI_Bcast( appl_redirect, noApplication, MPI_Integer, PRISMdrv_root, &
comm_global, ierror )
prismdrv_def_mpi_comm (called by prismdrv_init_appl)
psmile_def_mpi_comm (called by psmile_init_mpi1)
construct communicator for driver local communication
  key   = 0 ; color = 0
  CALL MPI_Comm_Split ( comm_drv_global, color, key, comm_drv_local, id_err )
construct communicator for application local communication
         key   = 0 ; color = Appl%sequence_number
         call MPI_Comm_Split ( comm_global, color, key, Appl%comm, ierror )
communicator for communication between coupler and application
key   = 0 ; color = INDEX
    CALL MPI_Comm_Split ( comm_drv_global, color, key, comm, id_err )
communicator for communication between coupler and application
key = 0 ; color = index
            call MPI_Comm_Split ( comm_global, color, key, comm, ierror )
communicator comm_psmile containing all MPI processes connected to the psmile
key   = 0 ; color = MPI_UNDEFINED
  CALL MPI_Comm_Split ( comm_drv_global, color, key, comm_psmile, id_err )
communicator comm_psmile containing all MPI processes connected to the psmile
key   = 0 ; color = 1    
      call MPI_Comm_Split ( comm_global, color, key, comm_psmile, ierror )
prismdrv_init_appl psmile_init_mpi1
broadcast sga_run_start_date, sga_run_end_date and sga_experiment_start_date
CALL MPI_Bcast( ila_date(1), 15, MPI_Integer, PRISMdrv_root, comm_drv_global, id_err )

CALL MPI_Bcast( dla_date(1), 3, MPI_Double_Precision, PRISMdrv_root, comm_drv_global, id_err )
sga_run_start_date, sga_run_end_date and sga_experiment_start_date recv
call MPI_Bcast( idate(1), 15, MPI_Integer, PRISMdrv_root, comm_global, ierror )

call MPI_Bcast( ddate(1), 3, MPI_Double_Precision, PRISMdrv_root, comm_global, ierror )
prismdrv_init_appl prism_init
master of T receives the application name from each application process
CALL MPI_Recv (Drv_Procs(ib+1)%appli_name, max_name, MPI_Character, &
             ib, 1, comm_drv_global, il_status, id_err)
application sends its name to the driver's master
call MPI_Send (Appl%name, max_name, MPI_CHARACTER, &
         PRISMdrv_root, 1, comm_global, ierror)
master of T receives the number of components per application process
CALL MPI_Recv (Drv_Procs(ib+1)%comps_per_rank, 1, MPI_Integer, &
             ib, 1, comm_drv_global, il_status, id_err)

application sends the number of components per application process to the driver's master
call MPI_Send (PRISM_noCompsPerProc, 1, MPI_INTEGER, &
         PRISMdrv_root, 1, comm_global, ierror)
prismdrv_init_appl prism_init_comp
master of T receives the component names from each application process
CALL MPI_Recv (Drv_Procs(ib+1)%comp_name(ib_bis), max_name, MPI_Character, &
                 ib, 1, comm_drv_global, il_status, id_err)
component names are sent to the driver's master
call MPI_Send (Comps(comp_id)%comp_name, max_name, MPI_CHARACTER, &
                        PRISMdrv_root, 1, comm_global, ierror)
 master of T sends back the global component Id
CALL MPI_Send (Drv_Procs(ib+1)%global_comp_id(ib_bis), 1, &
MPI_INTEGER, ib, 2, comm_drv_global, id_err)
global component ids are received from the driver's master
         call MPI_Recv (i, 1, MPI_INTEGER, PRISMdrv_root, 2, comm_global, &
              status, ierror)
prismdrv_init_smioc_struct psmile_smioc_init
master of T sends number of unit sets, grids, transients and persistents
     
CALL MPI_Send (ila_smioc_send, 4, MPI_Integer, &
         ila_tgt_proc(ib), 1, comm_drv_trans, id_err)

  get number of unit sets, grids, transients and persistents
 CALL MPI_Recv (ila_smioc_recv, 4, MPI_Integer, &
         PRISMdrv_root, 1, comm_trans, il_status, id_err)
master of T sends the Fortran unit sets component per component
CALL MPI_Send (ila_smioc_send, iga_comp_nb_unitsets(ib_c)*3, &
             MPI_Integer, ila_tgt_proc(ib), 2, comm_drv_trans, id_err)

get the Fortran unit sets component per component
CALL MPI_Recv (ila_smioc_recv, iga_comp_nb_unitsets(1)*3, &
             MPI_Integer, PRISMdrv_root, 2, comm_trans, il_status, id_err)
master of T sends the grids details component per component
CALL MPI_Send (ila_smioc_send, 3*iga_comp_nb_grids(ib_c), &
             MPI_Integer, ila_tgt_proc(ib), 3, comm_drv_trans, id_err)

CALL MPI_Send (cla_smioc_send, max_name*iga_comp_nb_grids(ib_c), &
             MPI_Character, ila_tgt_proc(ib), 4, comm_drv_trans, id_err)
get the grids details component per component
CALL MPI_Recv (ila_smioc_recv, 5*iga_comp_nb_grids(1), &
             MPI_Integer, PRISMdrv_root, 3, comm_trans, il_status, id_err)

CALL MPI_Recv (cla_smioc_recv, max_name*iga_comp_nb_grids(1), &
             MPI_Character, PRISMdrv_root, 4, comm_trans, il_status, id_err)
master of T sends the number of times the transient variables are sent and received
CALL MPI_Send (ila_smioc_send, 3*iga_comp_nb_transi(ib_c), MPI_Integer, &
         ila_tgt_proc(ib), 6, comm_drv_trans, id_err)
get the number of times the transient variables are sent and received
CALL MPI_Recv (ila_smioc_recv, 3*iga_comp_nb_transi(1), &
         MPI_Integer, PRISMdrv_root, 6, comm_trans, il_status, id_err)
master of T sends the transient details
      CALL MPI_Send (ila_smioc_send(1), il_smioc_send_size_i, MPI_Integer, &
         ila_tgt_proc(ib), 7, comm_drv_trans, id_err)

      CALL MPI_Send (cla_smioc_send(1), il_smioc_send_size_c*max_name, &
         MPI_Character, ila_tgt_proc(ib), 8, comm_drv_trans, id_err)

      CALL MPI_Send (dla_smioc_send(1), il_smioc_send_size_d, &
         MPI_Double_Precision, ila_tgt_proc(ib), 9, comm_drv_trans, id_err)
      get the transient details
CALL MPI_Recv (ila_smioc_recv, il_smioc_recv_size_i,         &
         MPI_Integer, PRISMdrv_root, 7, comm_trans, il_status, id_err )

      CALL MPI_Recv (cla_smioc_recv, il_smioc_recv_size_c*max_name,  &
         MPI_Character, PRISMdrv_root, 8, comm_trans, il_status, id_err )

      CALL MPI_Recv (dla_smioc_recv, il_smioc_recv_size_d,                  &
         MPI_Double_Precision, PRISMdrv_root, 9, comm_trans, il_status, id_err )
CALL MPI_Send (ila_dim_size, 7, MPI_Integer, ila_tgt_proc(ib), 11, comm_drv_trans, id_err)
CALL MPI_Recv (ila_dim_size, 7, MPI_Integer, PRISMdrv_root, 11, &
         comm_trans, il_status, id_err)
CALL MPI_Send (ila_orig_comp_id(1:il_orig_index,1:3), &
             il_orig_index*3, MPI_Integer, ila_tgt_proc(ib), 12, comm_drv_trans, id_err)
CALL MPI_Recv (ila_orig_comp_id, ila_dim_size(1)*3, MPI_Integer, &
             PRISMdrv_root, 12, comm_trans, il_status, id_err)
CALL MPI_Send (ila_dest_comp_id(1:il_dest_index,1:3), &
             il_dest_index*3, MPI_Integer, ila_tgt_proc(ib), 13, comm_drv_trans, id_err)
CALL MPI_Recv (ila_dest_comp_id, ila_dim_size(2)*3, MPI_Integer, &
             PRISMdrv_root, 13, comm_trans, il_status, id_err)
CALL MPI_Send (ila_combi_loc(1:il_loc_index,1:2), il_loc_index*2, &
             MPI_Integer, ila_tgt_proc(ib), 14, comm_drv_trans, id_err)
CALL MPI_Recv (ila_combi_loc, ila_dim_size(3)*2, MPI_Integer, &
             PRISMdrv_root, 14, comm_trans, il_status, id_err)
CALL MPI_Send (ila_trans_orig_id(1:il_trans_orig_index,1:3), &
             il_trans_orig_index*3, MPI_Integer, ila_tgt_proc(ib), 15, comm_drv_trans, id_err)
CALL MPI_Recv (ila_trans_orig_id, ila_dim_size(4)*3, MPI_Integer, &
             PRISMdrv_root, 15, comm_trans, il_status, id_err)
CALL MPI_Send (ila_trans_dest_id(1:il_trans_dest_index,1:3), &
             il_trans_dest_index*3, MPI_Integer, ila_tgt_proc(ib), 16, comm_drv_trans, id_err)
CALL MPI_Recv (ila_trans_dest_id, ila_dim_size(5)*3, MPI_Integer, &
             PRISMdrv_root, 16, comm_trans, il_status, id_err)
CALL MPI_Send (ila_cpl_rst_file(1:il_cpl_rst_file_index,1:8), &
             il_cpl_rst_file_index*8, MPI_Integer, ila_tgt_proc(ib), 17, comm_drv_trans, id_err)

          CALL MPI_Send (dla_cpl_rst_file(1:il_cpl_rst_file_index,1:3), &
             il_cpl_rst_file_index*3, MPI_Double_Precision, ila_tgt_proc(ib), 18, comm_drv_trans, id_err)

          CALL MPI_Send (cla_cpl_rst_file(1:il_cpl_rst_file_index,1), &
             il_cpl_rst_file_index*max_name, MPI_Character, ila_tgt_proc(ib), 19, comm_drv_trans, id_err)
CALL MPI_Recv (ila_cpl_rst_file, ila_dim_size(6)*8, MPI_Integer, &
             PRISMdrv_root, 17, comm_trans, il_status, id_err)

          CALL MPI_Recv (dla_cpl_rst_file, ila_dim_size(6)*3, &
             MPI_Double_Precision, PRISMdrv_root, 18, comm_trans, il_status,id_err)

          CALL MPI_Recv (cla_cpl_rst_file, ila_dim_size(6)*max_name, &
             MPI_Character, PRISMdrv_root, 19, comm_trans, il_status, id_err)
CALL MPI_Send (ila_trans_interp(1:il_trans_interp_index,1:32),    &
             il_trans_interp_index*32, MPI_Integer, ila_tgt_proc(ib), 20, comm_drv_trans,  id_err)

          CALL MPI_Send (dla_trans_interp(1:il_trans_interp_index,1:4), &
             il_trans_interp_index*4, MPI_Double_Precision, ila_tgt_proc(ib), 21, comm_drv_trans, id_err)

          CALL MPI_Send (cla_trans_interp(1:il_trans_interp_index,1:2), &
             il_trans_interp_index*max_name*2, MPI_Character, ila_tgt_proc(ib), 22,  comm_drv_trans, id_err)
CALL MPI_Recv (ila_trans_interp, ila_dim_size(7)*32, MPI_Integer, &
             PRISMdrv_root, 20, comm_trans, il_status, id_err)

          CALL MPI_Recv (dla_trans_interp, ila_dim_size(7)*4,  &
             MPI_Double_Precision, PRISMdrv_root, 21, comm_trans, il_status, id_err)

          CALL MPI_Recv (cla_trans_interp, ila_dim_size(7)*max_name*2, &
             MPI_Character, PRISMdrv_root, 22, comm_trans, il_status, id_err)
master of T sends the persistent details
CALL MPI_Send (ila_smioc_send, 4*iga_comp_nb_persis(ib_c), &
             MPI_Integer, ila_tgt_proc(ib), 30, comm_drv_trans, id_err)

          CALL MPI_Send (cla_smioc_send, max_name*5*iga_comp_nb_persis(ib_c), &
             MPI_Character, ila_tgt_proc(ib), 31, comm_drv_trans, id_err)

          CALL MPI_Send (rla_smioc_send, 3*iga_comp_nb_persis(ib_c), &
             MPI_Real, ila_tgt_proc(ib), 32, comm_drv_trans, id_err)

get the persistent details
CALL MPI_Recv (ila_smioc_recv, 4*iga_comp_nb_persis(1), &
             MPI_Integer, PRISMdrv_root, 30, comm_trans, il_status, id_err)

          CALL MPI_Recv (cla_smioc_recv, max_name*5*iga_comp_nb_persis(1), &
             MPI_Character, PRISMdrv_root, 31, comm_trans, il_status, id_err)

          CALL MPI_Recv (rla_smioc_recv, 3*iga_comp_nb_persis(1), &
             MPI_Real, PRISMdrv_root, 32, comm_trans, il_status, id_err)