seq_comm_mct Module

! NOTE: If all atmospheres are identical in number of processes, ! number of threads, and grid layout, we should check that the ! user-provided number of processes and threads are consistent ! (or else, only accept one entry for these quantities when reading ! the namelist). ARE OTHER PROTECTIONS/CHECKS NEEDED???



Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: default_logunit = 6
integer, public :: logunit = default_logunit
integer, public :: loglevel = 1
integer, public :: global_mype = -1

To be initialized

! Note - NUM_COMP_INST_XXX are cpp variables set in buildlib.csm_share

integer, public, parameter :: num_inst_atm = NUM_COMP_INST_ATM
integer, public, parameter :: num_inst_lnd = NUM_COMP_INST_LND
integer, public, parameter :: num_inst_ocn = NUM_COMP_INST_OCN
integer, public, parameter :: num_inst_ice = NUM_COMP_INST_ICE
integer, public, parameter :: num_inst_glc = NUM_COMP_INST_GLC
integer, public, parameter :: num_inst_wav = NUM_COMP_INST_WAV
integer, public, parameter :: num_inst_rof = NUM_COMP_INST_ROF
integer, public, parameter :: num_inst_esp = NUM_COMP_INST_ESP
integer, public, parameter :: num_inst_total = num_inst_atm+num_inst_lnd+num_inst_ocn+num_inst_ice+num_inst_glc+num_inst_wav+num_inst_rof+num_inst_esp+1
integer, public :: num_inst_min
integer, public :: num_inst_max
integer, public :: num_inst_xao
integer, public :: num_inst_frc
integer, public :: num_inst_driver = 1

! Each component instance needs two communicators: one internal to the ! instance, and one for communicating with the coupler. ! Additionally, one communicator is needed for the coupler's ! internal communications, and one is needed for the global space. ! All instances of a component type also share a separate communicator ! All instances of a component type share a communicator with the coupler

integer, public, parameter :: num_inst_phys = num_inst_atm+num_inst_lnd+num_inst_ocn+num_inst_ice+num_inst_glc+num_inst_rof+num_inst_wav+num_inst_esp
integer, public, parameter :: num_cpl_phys = num_inst_atm+num_inst_lnd+num_inst_ocn+num_inst_ice+num_inst_glc+num_inst_rof+num_inst_wav+num_inst_esp
integer, public :: GLOID
integer, public :: CPLID
integer, public :: ALLATMID
integer, public :: ALLLNDID
integer, public :: ALLOCNID
integer, public :: ALLICEID
integer, public :: ALLGLCID
integer, public :: ALLROFID
integer, public :: ALLWAVID
integer, public :: ALLESPID
integer, public :: CPLALLATMID
integer, public :: CPLALLLNDID
integer, public :: CPLALLOCNID
integer, public :: CPLALLICEID
integer, public :: CPLALLGLCID
integer, public :: CPLALLROFID
integer, public :: CPLALLWAVID
integer, public :: CPLALLESPID
integer, public :: ATMID(num_inst_atm)
integer, public :: LNDID(num_inst_lnd)
integer, public :: OCNID(num_inst_ocn)
integer, public :: ICEID(num_inst_ice)
integer, public :: GLCID(num_inst_glc)
integer, public :: ROFID(num_inst_rof)
integer, public :: WAVID(num_inst_wav)
integer, public :: ESPID(num_inst_esp)
integer, public :: CPLATMID(num_inst_atm)
integer, public :: CPLLNDID(num_inst_lnd)
integer, public :: CPLOCNID(num_inst_ocn)
integer, public :: CPLICEID(num_inst_ice)
integer, public :: CPLGLCID(num_inst_glc)
integer, public :: CPLROFID(num_inst_rof)
integer, public :: CPLWAVID(num_inst_wav)
integer, public :: CPLESPID(num_inst_esp)
integer, public, parameter :: seq_comm_namelen = 16
character(len=seq_comm_namelen), public :: cpl_inst_tag
integer, public :: Global_Comm
character(len=32), public :: atm_layout
character(len=32), public :: lnd_layout
character(len=32), public :: ice_layout
character(len=32), public :: glc_layout
character(len=32), public :: rof_layout
character(len=32), public :: ocn_layout
character(len=32), public :: wav_layout
character(len=32), public :: esp_layout

Functions

public function seq_comm_get_ncomps()

Arguments

None

Return Value integer

public function seq_comm_getnthreads()

Arguments

None

Return Value integer

public function seq_comm_iamin(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value logical

public function seq_comm_iamroot(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value logical

public function seq_comm_mpicom(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer

public function seq_comm_iam(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer

public function seq_comm_gloiam(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer

public function seq_comm_gloroot(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer

public function seq_comm_cplpe(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer

public function seq_comm_cmppe(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer

public function seq_comm_name(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value character(len=seq_comm_namelen)

public function seq_comm_suffix(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value character(len=seq_comm_namelen)

public function seq_comm_inst(ID)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID

Return Value integer


Subroutines

public subroutine seq_comm_init(global_comm_in, driver_comm_in, nmlfile, drv_comm_id)

Initialize seq_comms elements

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: global_comm_in
integer, intent(in) :: driver_comm_in
character(len=*), intent(in) :: nmlfile
integer, intent(in), optional :: drv_comm_id

public subroutine seq_comm_clean()

Arguments

None

public subroutine seq_comm_printcomms()

Arguments

None

public subroutine seq_comm_setptrs(ID, mpicom, mpigrp, npes, nthreads, iam, iamroot, gloiam, gloroot, cplpe, cmppe, pethreads, name)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ID
integer, intent(out), optional :: mpicom
integer, intent(out), optional :: mpigrp
integer, intent(out), optional :: npes
integer, intent(out), optional :: nthreads
integer, intent(out), optional :: iam
logical, intent(out), optional :: iamroot
integer, intent(out), optional :: gloiam
integer, intent(out), optional :: gloroot
integer, intent(out), optional :: cplpe
integer, intent(out), optional :: cmppe
integer, intent(out), optional :: pethreads
character(len=seq_comm_namelen), intent(out), optional :: name

public subroutine seq_comm_setnthreads(nthreads)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nthreads