diff --git a/scripts/Tools/check_input_data b/scripts/Tools/check_input_data
index 96a2dac0c5c..7795c063cac 100755
--- a/scripts/Tools/check_input_data
+++ b/scripts/Tools/check_input_data
@@ -41,8 +41,10 @@ formatter_class=argparse.ArgumentDefaultsHelpFormatter
parser.add_argument("--svn-loc", default=SVN_LOCS[get_model()],
help="The input data repository from which to download data.")
- parser.add_argument("-i", "--input-data-root", default=MACHINE.get_value("DIN_LOC_ROOT"),
- help="The root directory where input data goes")
+ parser.add_argument("-i", "--input-data-root", default=None,
+ help="The root directory where input data goes. "
+ "Default value will come from DIN_LOC_ROOT from case which itself "
+ "defaults to '%s'" % MACHINE.get_value("DIN_LOC_ROOT"))
parser.add_argument("--data-list-dir", default="Buildconf",
help="Where to find list of input files")
diff --git a/scripts/create_test b/scripts/create_test
index 1066e58ae7e..42a8c1760ed 100755
--- a/scripts/create_test
+++ b/scripts/create_test
@@ -222,6 +222,9 @@ OR
parser.add_argument("--force-threads", type=int, default=None,
help="For all tests to run with this number of threads")
+ parser.add_argument("-i", "--input-dir",
+ help="Use a non-default location for input files")
+
args = parser.parse_args(args[1:])
CIME.utils.handle_standard_logging_options(args)
@@ -343,11 +346,14 @@ OR
elif args.generate:
baseline_gen_name = baseline_name
+ if args.input_dir is not None:
+ args.input_dir = os.path.abspath(args.input_dir)
+
return test_names, test_extra_data, args.compiler, mach_obj.get_machine_name(), args.no_run, args.no_build, args.no_setup, args.no_batch,\
args.test_root, args.baseline_root, args.clean, baseline_cmp_name, baseline_gen_name, \
args.namelists_only, args.project, args.test_id, args.parallel_jobs, args.walltime, \
args.single_submit, args.proc_pool, args.use_existing, args.save_timing, args.queue, \
- args.allow_baseline_overwrite, args.output_root, args.wait, args.force_procs, args.force_threads, args.mpilib
+ args.allow_baseline_overwrite, args.output_root, args.wait, args.force_procs, args.force_threads, args.mpilib, args.input_dir
###############################################################################
def single_submit_impl(machine_name, test_id, proc_pool, project, args, job_cost_map, wall_time, test_root):
@@ -453,7 +459,7 @@ def single_submit_impl(machine_name, test_id, proc_pool, project, args, job_cost
def create_test(test_names, test_data, compiler, machine_name, no_run, no_build, no_setup, no_batch, test_root,
baseline_root, clean, baseline_cmp_name, baseline_gen_name, namelists_only, project, test_id, parallel_jobs,
walltime, single_submit, proc_pool, use_existing, save_timing, queue, allow_baseline_overwrite, output_root, wait,
- force_procs, force_threads, mpilib):
+ force_procs, force_threads, mpilib, input_dir):
###############################################################################
impl = TestScheduler(test_names, test_data=test_data,
no_run=no_run, no_build=no_build, no_setup=no_setup, no_batch=no_batch,
@@ -465,7 +471,8 @@ def create_test(test_names, test_data, compiler, machine_name, no_run, no_build,
project=project, parallel_jobs=parallel_jobs, walltime=walltime,
proc_pool=proc_pool, use_existing=use_existing, save_timing=save_timing,
queue=queue, allow_baseline_overwrite=allow_baseline_overwrite,
- output_root=output_root, force_procs=force_procs, force_threads=force_threads, mpilib=mpilib)
+ output_root=output_root, force_procs=force_procs, force_threads=force_threads,
+ mpilib=mpilib, input_dir=input_dir)
success = impl.run_tests(wait=wait)
@@ -506,13 +513,13 @@ def _main_func(description):
test_names, test_data, compiler, machine_name, no_run, no_build, no_setup, no_batch, \
test_root, baseline_root, clean, baseline_cmp_name, baseline_gen_name, namelists_only, \
project, test_id, parallel_jobs, walltime, single_submit, proc_pool, use_existing, \
- save_timing, queue, allow_baseline_overwrite, output_root, wait, force_procs, force_threads, mpilib \
+ save_timing, queue, allow_baseline_overwrite, output_root, wait, force_procs, force_threads, mpilib, input_dir \
= parse_command_line(sys.argv, description)
sys.exit(create_test(test_names, test_data, compiler, machine_name, no_run, no_build, no_setup, no_batch, test_root,
baseline_root, clean, baseline_cmp_name, baseline_gen_name, namelists_only,
project, test_id, parallel_jobs, walltime, single_submit, proc_pool, use_existing, save_timing,
- queue, allow_baseline_overwrite, output_root, wait, force_procs, force_threads, mpilib))
+ queue, allow_baseline_overwrite, output_root, wait, force_procs, force_threads, mpilib, input_dir))
###############################################################################
diff --git a/scripts/lib/CIME/XML/grids.py b/scripts/lib/CIME/XML/grids.py
index 6aa070c7855..351b40d254e 100644
--- a/scripts/lib/CIME/XML/grids.py
+++ b/scripts/lib/CIME/XML/grids.py
@@ -416,7 +416,7 @@ def print_values(self, long_output=None):
self._print_values_v2(long_output=long_output)
def _print_values_v2(self, long_output=None):
-
+
logger.info("%5s-------------------------------------------------------------" %(""))
logger.info("%10s default component grids:\n" %(""))
logger.info(" component compset value " )
@@ -430,7 +430,7 @@ def _print_values_v2(self, long_output=None):
value = grid_node.text
logger.info(" %6s %15s %10s" %(name, compset, value))
logger.info("%5s-------------------------------------------------------------" %(""))
-
+
domains = {}
if long_output is not None:
domain_nodes = self.get_nodes(nodename="domain")
@@ -438,8 +438,6 @@ def _print_values_v2(self, long_output=None):
name = domain_node.get("name")
if name == 'null':
continue
- nx = self.get_node("nx", root=domain_node).text
- ny = self.get_node("ny", root=domain_node).text
desc = self.get_node("desc", root=domain_node).text
#support = self.get_optional_node("support", root=domain_node).text
files = ""
@@ -478,7 +476,7 @@ def _print_values_v2(self, long_output=None):
gridnames = []
for grid_node in grid_nodes:
gridnames.append(grid_node.text)
- grids += grid_node.get("name") + ":" + grid_node.text + " "
+ grids += grid_node.get("name") + ":" + grid_node.text + " "
logger.info(" non-default grids are: %s" %grids)
mask_nodes = self.get_nodes("mask", root=model_grid_node)
for mask_node in mask_nodes:
diff --git a/scripts/lib/CIME/test_scheduler.py b/scripts/lib/CIME/test_scheduler.py
index d105ee0e44c..edd84713dc4 100644
--- a/scripts/lib/CIME/test_scheduler.py
+++ b/scripts/lib/CIME/test_scheduler.py
@@ -87,16 +87,18 @@ def __init__(self, test_names, test_data=None,
walltime=None, proc_pool=None,
use_existing=False, save_timing=False, queue=None,
allow_baseline_overwrite=False, output_root=None,
- force_procs=None, force_threads=None, mpilib=None):
- ###########################################################################
- self._cime_root = CIME.utils.get_cime_root()
- self._cime_model = get_model()
- self._save_timing = save_timing
- self._queue = queue
- self._test_data = {} if test_data is None else test_data # Format: {test_name -> {data_name -> data}}
- self._mpilib = mpilib # allow override of default mpilib
- self._allow_baseline_overwrite = allow_baseline_overwrite
+ force_procs=None, force_threads=None, mpilib=None, input_dir=None):
+ ###########################################################################
+ self._cime_root = CIME.utils.get_cime_root()
+ self._cime_model = get_model()
+ self._save_timing = save_timing
+ self._queue = queue
+ self._test_data = {} if test_data is None else test_data # Format: {test_name -> {data_name -> data}}
+ self._mpilib = mpilib # allow override of default mpilib
self._completed_tests = 0
+ self._input_dir = input_dir
+
+ self._allow_baseline_overwrite = allow_baseline_overwrite
self._machobj = Machines(machine=machine_name)
@@ -531,6 +533,9 @@ def _xml_phase(self, test):
case.set_value("TEST", True)
case.set_value("SAVE_TIMING", self._save_timing)
+ if self._input_dir is not None:
+ case.set_value("DIN_LOC_ROOT", self._input_dir)
+
return True
###########################################################################
diff --git a/src/drivers/mct/cime_config/config_component.xml b/src/drivers/mct/cime_config/config_component.xml
index 1e98ad348b6..d48ac2cebd9 100644
--- a/src/drivers/mct/cime_config/config_component.xml
+++ b/src/drivers/mct/cime_config/config_component.xml
@@ -935,6 +935,23 @@
this to work.
+
+ char
+ ESMF_LOGKIND_SINGLE,ESMF_LOGKIND_MULTI,ESMF_LOGKIND_NONE
+ ESMF_LOGKIND_NONE
+ run_cesm
+ env_run.xml
+
+ Determines what ESMF log files (if any) are generated when
+ USE_ESMF_LIB is TRUE.
+ ESMF_LOGKIND_SINGLE: Use a single log file, combining messages from
+ all of the PETs. Not supported on some platforms.
+ ESMF_LOGKIND_MULTI: Use multiple log files -- one per PET.
+ ESMF_LOGKIND_NONE: Do not issue messages to a log file.
+ By default, no ESMF log files are generated.
+
+
+
logical
TRUE,FALSE
diff --git a/src/drivers/mct/cime_config/namelist_definition_drv.xml b/src/drivers/mct/cime_config/namelist_definition_drv.xml
index 844bcc65512..bffe785aef2 100644
--- a/src/drivers/mct/cime_config/namelist_definition_drv.xml
+++ b/src/drivers/mct/cime_config/namelist_definition_drv.xml
@@ -2602,6 +2602,24 @@
+
+ char
+ ccsm_pes
+ ccsm_pes
+
+ Determines what ESMF log files (if any) are generated when
+ USE_ESMF_LIB is TRUE.
+ ESMF_LOGKIND_SINGLE: Use a single log file, combining messages from
+ all of the PETs. Not supported on some platforms.
+ ESMF_LOGKIND_MULTI: Use multiple log files — one per PET.
+ ESMF_LOGKIND_NONE: Do not issue messages to a log file.
+ By default, no ESMF log files are generated.
+
+
+ $ESMF_LOGFILE_KIND
+
+
+
diff --git a/src/drivers/mct/main/cesm_driver.F90 b/src/drivers/mct/main/cesm_driver.F90
index c846dea2887..7c22d4aa53c 100644
--- a/src/drivers/mct/main/cesm_driver.F90
+++ b/src/drivers/mct/main/cesm_driver.F90
@@ -20,8 +20,9 @@ program cesm_driver
!----------------------------------------------------------------------------
! share code & libs
!----------------------------------------------------------------------------
- use perf_mod
- use ESMF
+ use perf_mod, only : t_startf, t_adj_detailf, t_stopf
+ use ESMF, only : ESMF_Initialize, ESMF_Finalize
+ use seq_comm_mct, only : esmf_logfile_kind
use cesm_comp_mod, only : cesm_pre_init1
use cesm_comp_mod, only : cesm_pre_init2
use cesm_comp_mod, only : cesm_init
@@ -40,7 +41,7 @@ program cesm_driver
! because it is needed for the time manager, even if the ESMF_INTERFACE
! is not used.
!--------------------------------------------------------------------------
- call ESMF_Initialize()
+ call ESMF_Initialize(logkindflag=esmf_logfile_kind)
!--------------------------------------------------------------------------
! Read in the configuration information and initialize the time manager.
diff --git a/src/drivers/mct/shr/seq_comm_mct.F90 b/src/drivers/mct/shr/seq_comm_mct.F90
index 44dbd98f2ed..5062704cded 100644
--- a/src/drivers/mct/shr/seq_comm_mct.F90
+++ b/src/drivers/mct/shr/seq_comm_mct.F90
@@ -20,11 +20,13 @@ module seq_comm_mct
use shr_sys_mod , only : shr_sys_abort, shr_sys_flush
use shr_mpi_mod , only : shr_mpi_chkerr, shr_mpi_bcast, shr_mpi_max
use shr_file_mod, only : shr_file_getUnit, shr_file_freeUnit
+ use esmf , only : ESMF_LogKind_Flag, ESMF_LOGKIND_NONE
+ use esmf , only : ESMF_LOGKIND_SINGLE, ESMF_LOGKIND_MULTI
implicit none
private
-#include
+#include
save
!--------------------------------------------------------------------------
@@ -145,7 +147,10 @@ module seq_comm_mct
integer, public :: CPLWAVID(num_inst_wav)
integer, public :: CPLESPID(num_inst_esp)
+ type(ESMF_LogKind_Flag), public :: esmf_logfile_kind
+
integer, parameter, public :: seq_comm_namelen=16
+
type seq_comm_type
character(len=seq_comm_namelen) :: name ! my name
character(len=seq_comm_namelen) :: suffix ! recommended suffix
@@ -182,19 +187,19 @@ module seq_comm_mct
character(len=32), public :: &
atm_layout, lnd_layout, ice_layout, glc_layout, rof_layout, &
ocn_layout, wav_layout, esp_layout
-
+
logical :: seq_comm_mct_initialized = .false. ! whether this module has been initialized
!=======================================================================
contains
!======================================================================
- integer function seq_comm_get_ncomps()
+ integer function seq_comm_get_ncomps()
seq_comm_get_ncomps = ncomps
end function seq_comm_get_ncomps
-
+
subroutine seq_comm_init(Comm_in, nmlfile)
-
+
!----------------------------------------------------------
!
! Arguments
@@ -236,6 +241,8 @@ subroutine seq_comm_init(Comm_in, nmlfile)
ocn_ntasks, ocn_rootpe, ocn_pestride, ocn_nthreads, &
esp_ntasks, esp_rootpe, esp_pestride, esp_nthreads, &
cpl_ntasks, cpl_rootpe, cpl_pestride, cpl_nthreads
+ character(len=24) :: esmf_logging
+
namelist /ccsm_pes/ &
atm_ntasks, atm_rootpe, atm_pestride, atm_nthreads, atm_layout, &
lnd_ntasks, lnd_rootpe, lnd_pestride, lnd_nthreads, lnd_layout, &
@@ -245,7 +252,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
rof_ntasks, rof_rootpe, rof_pestride, rof_nthreads, rof_layout, &
ocn_ntasks, ocn_rootpe, ocn_pestride, ocn_nthreads, ocn_layout, &
esp_ntasks, esp_rootpe, esp_pestride, esp_nthreads, esp_layout, &
- cpl_ntasks, cpl_rootpe, cpl_pestride, cpl_nthreads
+ cpl_ntasks, cpl_rootpe, cpl_pestride, cpl_nthreads, esmf_logging
!----------------------------------------------------------
! make sure this is first pass and set comms unset
@@ -264,7 +271,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
seq_comms(n)%inst = 0
seq_comms(n)%set = .false.
seq_comms(n)%petlist_allocated = .false.
- seq_comms(n)%mpicom = MPI_COMM_NULL ! do some initialization here
+ seq_comms(n)%mpicom = MPI_COMM_NULL ! do some initialization here
seq_comms(n)%iam = -1
seq_comms(n)%iamroot = .false.
seq_comms(n)%npes = -1
@@ -288,7 +295,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
! Initialize gloiam on all IDs
global_mype = mype
-
+
do n = 1,ncomps
seq_comms(n)%gloiam = mype
enddo
@@ -352,6 +359,8 @@ subroutine seq_comm_init(Comm_in, nmlfile)
cpl_pestride = 1
cpl_nthreads = 1
+ esmf_logging = "ESMF_LOGKIND_NONE"
+
! Read namelist if it exists
nu = shr_file_getUnit()
@@ -369,7 +378,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end if
!--- compute some other num_inst values
-
+
num_inst_xao = max(num_inst_atm,num_inst_ocn)
num_inst_frc = num_inst_ice
@@ -457,21 +466,21 @@ subroutine seq_comm_init(Comm_in, nmlfile)
count = count + 1
CPLATMID(n) = count
end do
-
+
do n = 1, num_inst_lnd
count = count + 1
LNDID(n) = count
count = count + 1
CPLLNDID(n) = count
end do
-
+
do n = 1, num_inst_ocn
count = count + 1
OCNID(n) = count
count = count + 1
CPLOCNID(n) = count
end do
-
+
do n = 1, num_inst_ice
count = count + 1
ICEID(n) = count
@@ -526,7 +535,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
if (rof_rootpe < 0) error_state = .true.
if (esp_rootpe < 0) error_state = .true.
if (cpl_rootpe < 0) error_state = .true.
-
+
if (error_state) then
write(logunit,*) trim(subname),' ERROR: rootpes must be >= 0'
call shr_sys_abort(trim(subname)//' ERROR: rootpes >= 0')
@@ -577,7 +586,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end do
!! Ocean instance tasks
-
+
if (trim(ocn_layout) == trim(layout_concurrent)) then
ocn_inst_tasks = ocn_ntasks / num_inst_ocn
droot = (ocn_inst_tasks * ocn_pestride)
@@ -597,7 +606,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end do
!! Sea ice instance tasks
-
+
if (trim(ice_layout) == trim(layout_concurrent)) then
ice_inst_tasks = ice_ntasks / num_inst_ice
droot = (ice_inst_tasks * ice_pestride)
@@ -617,7 +626,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end do
!! Glacier instance tasks
-
+
if (trim(glc_layout) == trim(layout_concurrent)) then
glc_inst_tasks = glc_ntasks / num_inst_glc
droot = (glc_inst_tasks * glc_pestride)
@@ -637,7 +646,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end do
!! Runoff instance tasks
-
+
if (trim(rof_layout) == trim(layout_concurrent)) then
rof_inst_tasks = rof_ntasks / num_inst_rof
droot = (rof_inst_tasks * rof_pestride)
@@ -657,7 +666,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end do
!! Wave instance tasks
-
+
if (trim(wav_layout) == trim(layout_concurrent)) then
wav_inst_tasks = wav_ntasks / num_inst_wav
droot = (wav_inst_tasks * wav_pestride)
@@ -677,7 +686,7 @@ subroutine seq_comm_init(Comm_in, nmlfile)
end do
!! External System Processing instance tasks
-
+
if (trim(esp_layout) == trim(layout_concurrent)) then
esp_inst_tasks = esp_ntasks / num_inst_esp
droot = (esp_inst_tasks * esp_pestride)
@@ -890,6 +899,23 @@ subroutine seq_comm_init(Comm_in, nmlfile)
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)
+
+ select case(esmf_logging)
+ case ("ESMF_LOGKIND_SINGLE")
+ esmf_logfile_kind = ESMF_LOGKIND_SINGLE
+ case ("ESMF_LOGKIND_MULTI")
+ esmf_logfile_kind = ESMF_LOGKIND_MULTI
+ case ("ESMF_LOGKIND_NONE")
+ esmf_logfile_kind = ESMF_LOGKIND_NONE
+ case default
+ if (mype == 0) then
+ write(logunit,*) trim(subname),' ERROR: Invalid value for esmf_logging, ',esmf_logging
+ endif
+ call shr_sys_abort(trim(subname)//' ERROR: Invalid value for esmf_logging '//esmf_logging)
+ end select
+
call seq_comm_printcomms()
end subroutine seq_comm_init
@@ -904,10 +930,10 @@ subroutine seq_comm_clean()
! seq_comm_init.
integer :: id
-
+
character(*), parameter :: subName = '(seq_comm_clean) '
!----------------------------------------------------------
-
+
if (.not. seq_comm_mct_initialized) then
write(logunit,*) trim(subname),' ERROR seq_comm_init has not been called '
call shr_sys_abort()
@@ -919,11 +945,11 @@ subroutine seq_comm_clean()
deallocate(seq_comms(id)%petlist)
end if
end do
-
+
call mct_world_clean()
end subroutine seq_comm_clean
-
+
!---------------------------------------------------------
subroutine seq_comm_setcomm(ID,pelist,nthreads,iname,inst,tinst)
@@ -947,7 +973,7 @@ subroutine seq_comm_setcomm(ID,pelist,nthreads,iname,inst,tinst)
if (ID < 1 .or. ID > ncomps) then
write(logunit,*) subname,' ID out of range, abort ',ID
call shr_sys_abort()
- endif
+ endif
call mpi_comm_group(GLOBAL_COMM, mpigrp_world, ierr)
call shr_mpi_chkerr(ierr,subname//' mpi_comm_group mpigrp_world')
@@ -1057,11 +1083,11 @@ subroutine seq_comm_joincomm(ID1,ID2,ID,iname,inst,tinst)
if (ID1 < 1 .or. ID1 > ncomps) then
write(logunit,*) subname,' ID1 out of range, abort ',ID1
call shr_sys_abort()
- endif
+ endif
if (ID2 < 1 .or. ID2 > ncomps) then
write(logunit,*) subname,' ID2 out of range, abort ',ID2
call shr_sys_abort()
- endif
+ endif
if (ID < 1 .or. ID > ncomps) then
write(logunit,*) subname,' ID out of range, abort ',ID
call shr_sys_abort()
@@ -1211,7 +1237,7 @@ subroutine seq_comm_jcommarr(IDs,ID,iname,inst,tinst)
if (IDs(n) < 1 .or. IDs(n) > ncomps) then
write(logunit,*) subname,' IDs out of range, abort ',n,IDs(n)
call shr_sys_abort()
- endif
+ endif
if (.not. seq_comms(IDs(n))%set) then
write(logunit,*) subname,' IDs not set ',n,IDs(n)
call shr_sys_abort()
@@ -1267,7 +1293,7 @@ subroutine seq_comm_jcommarr(IDs,ID,iname,inst,tinst)
seq_comms(ID)%mpicom = mpicom
seq_comms(ID)%mpigrp = mpigrp
-
+
seq_comms(ID)%nthreads = 1
do n = 1,nids
seq_comms(ID)%nthreads = max(seq_comms(ID)%nthreads,seq_comms(IDs(n))%nthreads)
@@ -1355,7 +1381,7 @@ subroutine seq_comm_setptrs(ID,mpicom,mpigrp,npes,nthreads,iam,iamroot,gloiam,gl
if ((ID == 0) .or. (ID > ncomps)) then
write(logunit,*) subname,' ID out of range, return ',ID
return
- endif
+ endif
if (present(mpicom)) then
if (ID > 0) then
diff --git a/src/share/esmf_wrf_timemgr/ESMF_Stubs.F90 b/src/share/esmf_wrf_timemgr/ESMF_Stubs.F90
index 5deced65f09..9267c8fa80b 100644
--- a/src/share/esmf_wrf_timemgr/ESMF_Stubs.F90
+++ b/src/share/esmf_wrf_timemgr/ESMF_Stubs.F90
@@ -11,39 +11,47 @@ MODULE ESMF_Stubs
! Bogus typedefs
TYPE ESMF_Grid
INTEGER :: dummy
- END TYPE
+ END TYPE ESMF_Grid
TYPE ESMF_GridComp
INTEGER :: dummy
- END TYPE
+ END TYPE ESMF_GridComp
TYPE ESMF_State
INTEGER :: dummy
- END TYPE
+ END TYPE ESMF_State
TYPE ESMF_VM
INTEGER :: dummy
- END TYPE
+ END TYPE ESMF_VM
TYPE ESMF_END_FLAG
INTEGER :: dummy
- END TYPE
- TYPE(ESMF_END_FLAG), PARAMETER :: &
- ESMF_END_ABORT = ESMF_END_FLAG(1), &
- ESMF_END_NORMAL = ESMF_END_FLAG(2), &
+ END TYPE ESMF_END_FLAG
+ TYPE(ESMF_END_FLAG), PARAMETER :: &
+ ESMF_END_ABORT = ESMF_END_FLAG(1), &
+ ESMF_END_NORMAL = ESMF_END_FLAG(2), &
ESMF_END_KEEPMPI = ESMF_END_FLAG(3)
TYPE ESMF_MsgType
INTEGER :: mtype
- END TYPE
- TYPE(ESMF_MsgType), PARAMETER :: &
- ESMF_LOG_INFO = ESMF_MsgType(1), &
- ESMF_LOG_WARNING = ESMF_MsgType(2), &
+ END TYPE ESMF_MsgType
+ TYPE(ESMF_MsgType), PARAMETER :: &
+ ESMF_LOG_INFO = ESMF_MsgType(1), &
+ ESMF_LOG_WARNING = ESMF_MsgType(2), &
ESMF_LOG_ERROR = ESMF_MsgType(3)
TYPE ESMF_LOG
INTEGER :: dummy
- END TYPE
+ END TYPE ESMF_LOG
+
+ TYPE ESMF_LogKind_Flag
+ INTEGER :: dummy
+ END TYPE ESMF_LogKind_Flag
+ TYPE(ESMF_LogKind_Flag), PARAMETER :: &
+ ESMF_LOGKIND_NONE = ESMF_LogKind_Flag(1), &
+ ESMF_LOGKIND_SINGLE = ESMF_LogKind_Flag(2), &
+ ESMF_LOGKIND_MULTI = ESMF_LogKind_Flag(3)
LOGICAL, private, save :: initialized = .false.
@@ -52,17 +60,20 @@ MODULE ESMF_Stubs
PUBLIC ESMF_LogWrite, ESMF_LOG, ESMF_MsgType, ESMF_END_FLAG
PUBLIC ESMF_LOG_INFO, ESMF_LOG_WARNING, ESMF_LOG_ERROR
PUBLIC ESMF_END_ABORT, ESMF_END_NORMAL, ESMF_END_KEEPMPI
+ PUBLIC ESMF_LogKind_Flag
+ PUBLIC ESMF_LOGKIND_NONE, ESMF_LOGKIND_SINGLE, ESMF_LOGKIND_MULTI
CONTAINS
! NOOP
- SUBROUTINE ESMF_Initialize( vm, defaultCalendar, rc )
+ SUBROUTINE ESMF_Initialize( vm, defaultCalendar, logkindflag, rc )
USE ESMF_BaseMod
USE ESMF_CalendarMod
! USE ESMF_TimeMod, only: defaultCal
TYPE(ESMF_VM), INTENT(IN ), OPTIONAL :: vm
TYPE(ESMF_CalKind_Flag), INTENT(IN ), OPTIONAL :: defaultCalendar
+ TYPE(ESMF_LogKind_Flag), INTENT(IN ), OPTIONAL :: logkindflag
INTEGER, INTENT( OUT), OPTIONAL :: rc
TYPE(ESMF_CalKind_Flag) :: defaultCalType
diff --git a/src/share/unit_test_stubs/pio/pio.F90.in b/src/share/unit_test_stubs/pio/pio.F90.in
index 22313cef88d..9aafa3550dc 100644
--- a/src/share/unit_test_stubs/pio/pio.F90.in
+++ b/src/share/unit_test_stubs/pio/pio.F90.in
@@ -23,7 +23,7 @@ module pio
#ifndef NO_MPIMOD
use mpi, only : MPI_OFFSET_KIND ! _EXTERNAL
#endif
-
+ use iso_c_binding
implicit none
private
@@ -43,7 +43,17 @@ module pio
type, public :: var_desc_t
end type var_desc_t
+ type, bind(c), public :: PIO_rearr_comm_fc_opt_t
+ logical(c_bool) :: enable_hs ! Enable handshake?
+ logical(c_bool) :: enable_isend ! Enable isends?
+ integer(c_int) :: max_pend_req ! Maximum pending requests
+ end type PIO_rearr_comm_fc_opt_t
+
type, public :: PIO_rearr_opt_t
+ integer(c_int) :: comm_type
+ integer(c_int) :: fcd ! Flow control direction
+ type(PIO_rearr_comm_fc_opt_t) :: comm_fc_opts_comp2io
+ type(PIO_rearr_comm_fc_opt_t) :: comm_fc_opts_io2comp
end type PIO_rearr_opt_t
integer, parameter, private :: &
@@ -70,6 +80,15 @@ module pio
integer, parameter, public :: pio_rearr_box = 1
integer, parameter, public :: PIO_WRITE = 0
+ integer, parameter, public :: pio_rearr_comm_p2p = 0
+ integer, parameter, public :: pio_rearr_comm_coll = 1
+ integer,parameter,public :: PIO_rearr_comm_fc_2d_enable = 0
+ integer,parameter,public :: PIO_rearr_comm_fc_1d_comp2io = 1
+ integer,parameter,public :: PIO_rearr_comm_fc_1d_io2comp = 2
+ integer,parameter,public :: PIO_rearr_comm_fc_2d_disable = 3
+ integer, public, parameter :: PIO_REARR_COMM_UNLIMITED_PEND_REQ = -1
+
+
public :: PIO_def_dim
public :: PIO_enddef
public :: PIO_FILE_IS_OPEN
@@ -344,16 +363,18 @@ contains
ierr = 0
end function get_var_vdesc_{DIMS}d_{TYPE}
- subroutine init_intracom(comp_rank, comp_comm, num_iotasks, num_aggregator, stride, rearr, iosystem,base)
+ subroutine init_intracom(comp_rank, comp_comm, num_iotasks, num_aggregator, stride, rearr, iosystem,base, rearr_opts)
+
integer(i4), intent(in) :: comp_rank
integer(i4), intent(in) :: comp_comm
integer(i4), intent(in) :: num_iotasks
integer(i4), intent(in) :: num_aggregator
integer(i4), intent(in) :: stride
integer(i4), intent(in) :: rearr
- type (iosystem_desc_t), intent(inout) :: iosystem ! io descriptor to initalize
-
+ type (iosystem_desc_t), intent(out) :: iosystem ! io descriptor to initalize
integer(i4), intent(in),optional :: base
+ type (pio_rearr_opt_t), intent(in), optional :: rearr_opts
+
end subroutine init_intracom
subroutine init_intercom(component_count, peer_comm, comp_comms, io_comm, iosystem)
@@ -362,7 +383,7 @@ contains
integer, intent(in) :: comp_comms(component_count) ! The compute communicator
integer, intent(in) :: io_comm ! The io communicator
- type (iosystem_desc_t), intent(inout) :: iosystem(component_count) ! io descriptor to initalize
+ type (iosystem_desc_t), intent(out) :: iosystem(component_count) ! io descriptor to initalize
end subroutine init_intercom
subroutine PIO_initdecomp_bc(iosystem,basepiotype,dims,compstart,compcount,iodesc,iostart,iocount)