diff --git a/scripts/lib/CIME/SystemTests/pre.py b/scripts/lib/CIME/SystemTests/pre.py index 5e95d7bd401..e67efda721d 100644 --- a/scripts/lib/CIME/SystemTests/pre.py +++ b/scripts/lib/CIME/SystemTests/pre.py @@ -85,26 +85,40 @@ def run_phase(self): # pylint: disable=arguments-differ else: pause_comps = pause_comps.split(':') + multi_coupler = self._case.get_value("MULTI_COUPLER") + for comp in pause_comps: + if comp == "cpl": + if multi_coupler: + ninst = self._case.get_value("NINST_MAX") + else: + ninst = 1 + else: + ninst = self._case.get_value("NINST_{}".format(comp.upper())) comp_name = self._case.get_value('COMP_{}'.format(comp.upper())) - rname = '*.{}.r.*'.format(comp_name) - restart_files_1 = glob.glob(os.path.join(rundir1, rname)) - expect((len(restart_files_1) > 0), "No case1 restart files for {}".format(comp)) - restart_files_2 = glob.glob(os.path.join(rundir2, rname)) - expect((len(restart_files_2) > len(restart_files_1)), - "No pause (restart) files found in case2 for {}".format(comp)) - # Do cprnc of restart files. - rfile1 = restart_files_1[len(restart_files_1) - 1] - # rfile2 has to match rfile1 (same time string) - parts = os.path.basename(rfile1).split(".") - glob_str = "*.{}".format(".".join(parts[len(parts)-4:])) - restart_files_2 = glob.glob(os.path.join(rundir2, glob_str)) - expect((len(restart_files_2) == 1), - "Missing case2 restart file, {}", glob_str) - rfile2 = restart_files_2[0] - ok = cprnc(comp, rfile1, rfile2, self._case, rundir2)[0] - logger.warning("CPRNC result for {}: {}".format(os.path.basename(rfile1), "PASS" if (ok == should_match) else "FAIL")) - compare_ok = compare_ok and (should_match == ok) + for index in range(1,ninst+1): + if ninst == 1: + rname = '*.{}.r.*'.format(comp_name) + else: + rname = '*.{}_{:04d}.r.*'.format(comp_name, index) + + restart_files_1 = glob.glob(os.path.join(rundir1, rname)) + expect((len(restart_files_1) > 0), "No case1 restart files for {}".format(comp)) + restart_files_2 = glob.glob(os.path.join(rundir2, rname)) + expect((len(restart_files_2) > len(restart_files_1)), + "No pause (restart) files found in case2 for {}".format(comp)) + # Do cprnc of restart files. + rfile1 = restart_files_1[len(restart_files_1) - 1] + # rfile2 has to match rfile1 (same time string) + parts = os.path.basename(rfile1).split(".") + glob_str = "*.{}".format(".".join(parts[len(parts)-4:])) + restart_files_2 = glob.glob(os.path.join(rundir2, glob_str)) + expect((len(restart_files_2) == 1), + "Missing case2 restart file, {}", glob_str) + rfile2 = restart_files_2[0] + ok = cprnc(comp, rfile1, rfile2, self._case, rundir2)[0] + logger.warning("CPRNC result for {}: {}".format(os.path.basename(rfile1), "PASS" if (ok == should_match) else "FAIL")) + compare_ok = compare_ok and (should_match == ok) expect(compare_ok, "Not all restart files {}".format("matched" if should_match else "failed to match")) diff --git a/scripts/lib/CIME/case_setup.py b/scripts/lib/CIME/case_setup.py index cee6b22f5c0..28c6042f8d6 100644 --- a/scripts/lib/CIME/case_setup.py +++ b/scripts/lib/CIME/case_setup.py @@ -45,7 +45,7 @@ def _build_usernl_files(case, model, comp): ninst = case.get_value("NINST_{}".format(model)) nlfile = "user_nl_{}".format(comp) model_nl = os.path.join(model_dir, nlfile) - if ninst > 1: + if ninst > 1 and not comp.endswith("esp"): for inst_counter in xrange(1, ninst+1): inst_nlfile = "{}_{:04d}".format(nlfile, inst_counter) if not os.path.exists(inst_nlfile): diff --git a/src/components/data_comps/desp/desp_comp_mod.F90 b/src/components/data_comps/desp/desp_comp_mod.F90 index a8bce0571ee..a064e0b464d 100644 --- a/src/components/data_comps/desp/desp_comp_mod.F90 +++ b/src/components/data_comps/desp/desp_comp_mod.F90 @@ -18,6 +18,8 @@ module desp_comp_mod use seq_timemgr_mod, only: seq_timemgr_EClockGetData use seq_timemgr_mod, only: seq_timemgr_RestartAlarmIsOn use seq_comm_mct, only: seq_comm_inst, seq_comm_name, seq_comm_suffix + use seq_comm_mct, only: num_inst_cpl + implicit none private @@ -99,8 +101,6 @@ module desp_comp_mod subroutine desp_comp_init(EClock, espid, mpicom_in, phase, read_restart, & esp_present, esp_prognostic) - use pio, only: iosystem_desc_t - use shr_pio_mod, only: shr_pio_getiosys, shr_pio_getiotype ! !INPUT/OUTPUT PARAMETERS: @@ -120,8 +120,6 @@ subroutine desp_comp_init(EClock, espid, mpicom_in, phase, read_restart, & integer(IN) :: shrloglev ! original log level integer(IN) :: nunit ! unit number - type(iosystem_desc_t), pointer :: iosystem - character(len=CL) :: fileName ! generic file name character(len=CL) :: rest_file ! restart filename @@ -223,8 +221,7 @@ subroutine desp_comp_init(EClock, espid, mpicom_in, phase, read_restart, & ! Initialize PIO !------------------------------------------------------------------------ - iosystem => shr_pio_getiosys(trim(inst_name)) - call shr_strdata_pioinit(SDESP, iosystem, shr_pio_getiotype(trim(inst_name))) + call shr_strdata_pioinit(SDESP, COMPID) !------------------------------------------------------------------------ ! Validate mode @@ -353,7 +350,7 @@ subroutine desp_comp_run(EClock, case_name, pause_sig, atm_resume, & character(len=CL), intent(inout) :: ice_resume(num_inst_ice) character(len=CL), intent(inout) :: glc_resume(num_inst_glc) character(len=CL), intent(inout) :: wav_resume(num_inst_wav) - character(len=CL), intent(inout) :: cpl_resume + character(len=CL), intent(inout) :: cpl_resume(num_inst_cpl) !--- local --- integer(IN) :: CurrentYMD ! model date @@ -393,7 +390,7 @@ subroutine desp_comp_run(EClock, case_name, pause_sig, atm_resume, & ice_resume(:) = ' ' glc_resume(:) = ' ' wav_resume(:) = ' ' - cpl_resume = ' ' + cpl_resume(:) = ' ' !-------------------------------------------------------------------------- ! Reset shr logging to my log file @@ -477,8 +474,8 @@ subroutine desp_comp_run(EClock, case_name, pause_sig, atm_resume, & varname = 'T' case('drv') call get_restart_filenames(ind, cpl_resume, errcode) - allocate(rfilenames(1)) - rfilenames(1) = cpl_resume + allocate(rfilenames(size(cpl_resume))) + rfilenames = cpl_resume varname = 'x2oacc_ox_Foxx_swnet' case default call shr_sys_abort(subname//'Unrecognized ind') @@ -613,7 +610,7 @@ end subroutine desp_comp_final subroutine get_restart_filenames_a(comp_ind, filenames, retcode) use seq_comm_mct, only: ATMID, LNDID, OCNID, ICEID, GLCID, ROFID - use seq_comm_mct, only: WAVID, CPLID, seq_comm_suffix + use seq_comm_mct, only: WAVID, CPLID, seq_comm_suffix, cpl_inst_tag, num_inst_cpl use shr_file_mod, only: shr_file_getUnit, shr_file_freeUnit ! Dummy arguments @@ -660,7 +657,11 @@ subroutine get_restart_filenames_a(comp_ind, filenames, retcode) rpointer_name = rpprefix//comp_names(comp_ind) do ind = 1, num_inst - rpointer_name = rpprefix//comp_names(comp_ind)//trim(seq_comm_suffix(ids(ind))) + if (num_inst_cpl > 1) then + rpointer_name = rpprefix//comp_names(comp_ind)//trim(cpl_inst_tag) + else + rpointer_name = rpprefix//comp_names(comp_ind)//trim(seq_comm_suffix(ids(ind))) + endif if (my_task == master_task) then inquire(file=rpointer_name, EXIST=file_exists) ! POP decided to not follow the convention diff --git a/src/drivers/mct/main/cime_comp_mod.F90 b/src/drivers/mct/main/cime_comp_mod.F90 index ceb91abf51a..503b5b7869c 100644 --- a/src/drivers/mct/main/cime_comp_mod.F90 +++ b/src/drivers/mct/main/cime_comp_mod.F90 @@ -72,7 +72,7 @@ module cime_comp_mod use seq_comm_mct, only: seq_comm_iamin, seq_comm_name, seq_comm_namelen use seq_comm_mct, only: seq_comm_init, seq_comm_setnthreads, seq_comm_getnthreads use seq_comm_mct, only: seq_comm_getinfo => seq_comm_setptrs - use seq_comm_mct, only: seq_comm_petlist + use seq_comm_mct, only: seq_comm_petlist, cpl_inst_tag ! clock & alarm routines and variables use seq_timemgr_mod, only: seq_timemgr_type @@ -534,8 +534,6 @@ module cime_comp_mod logical :: iamin_CPLALLROFID ! pe associated with CPLALLROFID logical :: iamin_CPLALLWAVID ! pe associated with CPLALLWAVID - ! suffix for log and timing files if multi coupler driver - character(len=seq_comm_namelen) :: cpl_inst_tag !---------------------------------------------------------------------------- ! complist: list of comps on this pe @@ -589,7 +587,7 @@ module cime_comp_mod subroutine cime_pre_init1() use shr_pio_mod, only : shr_pio_init1, shr_pio_init2 - + use seq_comm_mct, only: num_inst_cpl !---------------------------------------------------------- !| Initialize MCT and MPI communicators and IO !---------------------------------------------------------- @@ -598,7 +596,7 @@ subroutine cime_pre_init1() logical :: comp_iamin(num_inst_total) character(len=seq_comm_namelen) :: comp_name(num_inst_total) integer :: i, it - integer :: num_inst_cpl, cpl_id + integer :: cpl_id integer :: cpl_comm call mpi_init(ierr) @@ -4068,7 +4066,7 @@ subroutine cime_comp_barriers(mpicom, timer) end subroutine cime_comp_barriers subroutine cime_cpl_init(comm_in, comm_out, num_inst_cpl, id) - + use seq_comm_mct, only : cpl_inst_iamin !----------------------------------------------------------------------- ! ! Initialize multiple coupler instances, if requested diff --git a/src/drivers/mct/shr/seq_comm_mct.F90 b/src/drivers/mct/shr/seq_comm_mct.F90 index b440e1b4556..656956b8305 100644 --- a/src/drivers/mct/shr/seq_comm_mct.F90 +++ b/src/drivers/mct/shr/seq_comm_mct.F90 @@ -85,7 +85,8 @@ module seq_comm_mct num_inst_wav + & num_inst_rof + & num_inst_esp + 1 - + integer, public :: num_inst_cpl = 1 + integer, public :: cpl_inst_iamin = 1 integer, public :: num_inst_min, num_inst_max integer, public :: num_inst_xao ! for xao flux integer, public :: num_inst_frc ! for fractions @@ -150,6 +151,10 @@ module seq_comm_mct integer, parameter, public :: seq_comm_namelen=16 + ! suffix for log and timing files if multi coupler driver + character(len=seq_comm_namelen), public :: cpl_inst_tag + + type seq_comm_type character(len=seq_comm_namelen) :: name ! my name character(len=seq_comm_namelen) :: suffix ! recommended suffix @@ -182,7 +187,7 @@ module seq_comm_mct character(*), parameter :: F12 = "(a,a,'(',i3,' ',a,')',a,2i6,6x,' (',a,i6,')',' (',a,i3,')','(',a,2i6,')')" character(*), parameter :: F13 = "(a,a,'(',i3,' ',a,')',a,2i6,6x,' (',a,i6,')',' (',a,i3,')')" character(*), parameter :: F14 = "(a,a,'(',i3,' ',a,')',a, 6x,' (',a,i6,')',' (',a,i3,')')" - integer :: Global_Comm + integer :: Coupler_Comm character(len=32), public :: & @@ -263,7 +268,9 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) call shr_sys_abort() endif seq_comm_mct_initialized = .true. - Global_Comm = Comm_in + + call mpi_comm_dup(Comm_in, Coupler_Comm, ierr) + call shr_mpi_chkerr(ierr,subname//' mpi_comm_dup') !! Initialize seq_comms elements @@ -289,9 +296,9 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) ! Initialize MPI ! Note that if no MPI, will call MCTs fake version - call mpi_comm_rank(GLOBAL_COMM, mype , ierr) + call mpi_comm_rank(Coupler_Comm, mype , ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_rank comm_world') - call mpi_comm_size(GLOBAL_COMM, numpes, ierr) + call mpi_comm_size(Coupler_Comm, numpes, ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_size comm_world') ! Initialize gloiam on all IDs @@ -719,15 +726,15 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) cstr = cpl_pestride end if - call shr_mpi_bcast(atm_nthreads,GLOBAL_COMM,'atm_nthreads') - call shr_mpi_bcast(lnd_nthreads,GLOBAL_COMM,'lnd_nthreads') - call shr_mpi_bcast(ocn_nthreads,GLOBAL_COMM,'ocn_nthreads') - call shr_mpi_bcast(ice_nthreads,GLOBAL_COMM,'ice_nthreads') - call shr_mpi_bcast(glc_nthreads,GLOBAL_COMM,'glc_nthreads') - call shr_mpi_bcast(wav_nthreads,GLOBAL_COMM,'wav_nthreads') - call shr_mpi_bcast(rof_nthreads,GLOBAL_COMM,'rof_nthreads') - call shr_mpi_bcast(esp_nthreads,GLOBAL_COMM,'esp_nthreads') - call shr_mpi_bcast(cpl_nthreads,GLOBAL_COMM,'cpl_nthreads') + call shr_mpi_bcast(atm_nthreads,Coupler_Comm,'atm_nthreads') + call shr_mpi_bcast(lnd_nthreads,Coupler_Comm,'lnd_nthreads') + call shr_mpi_bcast(ocn_nthreads,Coupler_Comm,'ocn_nthreads') + call shr_mpi_bcast(ice_nthreads,Coupler_Comm,'ice_nthreads') + call shr_mpi_bcast(glc_nthreads,Coupler_Comm,'glc_nthreads') + call shr_mpi_bcast(wav_nthreads,Coupler_Comm,'wav_nthreads') + call shr_mpi_bcast(rof_nthreads,Coupler_Comm,'rof_nthreads') + call shr_mpi_bcast(esp_nthreads,Coupler_Comm,'esp_nthreads') + call shr_mpi_bcast(cpl_nthreads,Coupler_Comm,'cpl_nthreads') ! Create MPI communicator groups @@ -736,7 +743,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = numpes-1 pelist(3,1) = 1 end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) call seq_comm_setcomm(GLOID, pelist,iname='GLOBAL') if (mype == 0) then @@ -744,7 +751,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = cmax pelist(3,1) = cstr end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) call seq_comm_setcomm(CPLID,pelist,cpl_nthreads,'CPL') do n = 1, num_inst_atm @@ -753,7 +760,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = amax(n) pelist(3,1) = astr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(ATMID(n), pelist, atm_nthreads, 'ATM', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, ATMID(n), CPLATMID(n), 'CPLATM', inst=Cpl_comm_id) @@ -771,7 +778,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = lmax(n) pelist(3,1) = lstr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(LNDID(n), pelist, lnd_nthreads, 'LND', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, LNDID(n), CPLLNDID(n), 'CPLLND', inst=Cpl_comm_id) @@ -789,7 +796,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = omax(n) pelist(3,1) = ostr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(OCNID(n), pelist, ocn_nthreads, 'OCN', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, OCNID(n), CPLOCNID(n), 'CPLOCN', inst=Cpl_comm_id) @@ -807,7 +814,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = imax(n) pelist(3,1) = istr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(ICEID(n), pelist, ice_nthreads, 'ICE', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, ICEID(n), CPLICEID(n), 'CPLICE', inst=Cpl_comm_id) @@ -825,7 +832,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = gmax(n) pelist(3,1) = gstr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(GLCID(n), pelist, glc_nthreads, 'GLC', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, GLCID(n), CPLGLCID(n), 'CPLGLC', inst=Cpl_comm_id) @@ -843,7 +850,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = rmax(n) pelist(3,1) = rstr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(ROFID(n), pelist, rof_nthreads, 'ROF', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, ROFID(n), CPLROFID(n), 'CPLROF', inst=Cpl_comm_id) @@ -861,7 +868,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = wmax(n) pelist(3,1) = wstr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) if (present(Cpl_comm_id)) then call seq_comm_setcomm(WAVID(n), pelist, wav_nthreads, 'WAV', inst=Cpl_comm_id) call seq_comm_joincomm(CPLID, WAVID(n), CPLWAVID(n), 'CPLWAV', inst=Cpl_comm_id) @@ -879,7 +886,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) pelist(2,1) = emax(n) pelist(3,1) = estr(n) end if - call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(pelist, size(pelist), MPI_INTEGER, 0, Coupler_Comm, ierr) call seq_comm_setcomm(ESPID(n), pelist, esp_nthreads, 'ESP', n, num_inst_esp) end do call seq_comm_jcommarr(ESPID,ALLESPID,'ALLESPID',1,1) @@ -900,7 +907,7 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) do n = 1,ncomps gloroot = -999 if (seq_comms(n)%iamroot) gloroot = seq_comms(n)%gloiam - call shr_mpi_max(gloroot,seq_comms(n)%gloroot,GLOBAL_COMM, & + call shr_mpi_max(gloroot,seq_comms(n)%gloroot,Coupler_Comm, & trim(subname)//' gloroot',all=.true.) enddo @@ -938,12 +945,12 @@ subroutine seq_comm_init(Comm_in, nmlfile, Cpl_comm_id) call shr_sys_abort() endif - call mct_world_init(ncomps, GLOBAL_COMM, comms, comps) + call mct_world_init(ncomps, Coupler_Comm, comms, comps) deallocate(comps,comms) ! ESMF logging (only has effect if ESMF libraries are used) - call mpi_bcast(esmf_logging, len(esmf_logging), MPI_CHARACTER, 0, GLOBAL_COMM, ierr) + call mpi_bcast(esmf_logging, len(esmf_logging), MPI_CHARACTER, 0, Coupler_Comm, ierr) select case(esmf_logging) case ("ESMF_LOGKIND_SINGLE") @@ -1018,11 +1025,11 @@ subroutine seq_comm_setcomm(ID,pelist,nthreads,iname,inst,tinst) call shr_sys_abort() endif - call mpi_comm_group(GLOBAL_COMM, mpigrp_world, ierr) + call mpi_comm_group(Coupler_Comm, mpigrp_world, ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_group mpigrp_world') call mpi_group_range_incl(mpigrp_world, 1, pelist, mpigrp,ierr) call shr_mpi_chkerr(ierr,subname//' mpi_group_range_incl mpigrp') - call mpi_comm_create(GLOBAL_COMM, mpigrp, mpicom, ierr) + call mpi_comm_create(Coupler_Comm, mpigrp, mpicom, ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_create mpigrp') ntasks = ((pelist(2,1) - pelist(1,1)) / pelist(3,1)) + 1 @@ -1146,7 +1153,7 @@ subroutine seq_comm_joincomm(ID1,ID2,ID,iname,inst,tinst) call mpi_group_union(seq_comms(ID1)%mpigrp,seq_comms(ID2)%mpigrp,mpigrp,ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_union mpigrp') - call mpi_comm_create(GLOBAL_COMM, mpigrp, mpicom, ierr) + call mpi_comm_create(Coupler_Comm, mpigrp, mpicom, ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_create mpigrp') seq_comms(ID)%set = .true. @@ -1272,7 +1279,7 @@ subroutine seq_comm_jcommarr(IDs,ID,iname,inst,tinst) call mpi_group_union(mpigrpp,seq_comms(IDs(n))%mpigrp,mpigrp,ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_union mpigrp') enddo - call mpi_comm_create(GLOBAL_COMM, mpigrp, mpicom, ierr) + call mpi_comm_create(Coupler_Comm, mpigrp, mpicom, ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_create mpigrp') seq_comms(ID)%set = .true. @@ -1352,13 +1359,13 @@ subroutine seq_comm_printcomms() character(*),parameter :: subName = '(seq_comm_printcomms) ' integer :: n,mype,npes,ierr - call mpi_comm_size(GLOBAL_COMM, npes , ierr) + call mpi_comm_size(Coupler_Comm, npes , ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_size comm_world') - call mpi_comm_rank(GLOBAL_COMM, mype , ierr) + call mpi_comm_rank(Coupler_Comm, mype , ierr) call shr_mpi_chkerr(ierr,subname//' mpi_comm_rank comm_world') call shr_sys_flush(logunit) - call mpi_barrier(GLOBAL_COMM,ierr) + call mpi_barrier(Coupler_Comm,ierr) if (mype == 0) then do n = 1,ncomps write(logunit,'(a,4i6,2x,3a)') trim(subName),n, &