Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,24 @@ def buildnml(case, caseroot, component):
if component != "drv":
raise AttributeError

# Do a check here of ESMF VERSION, requires 8.1.0 or newer (8.2.0 or newer for esmf_aware_threading)
esmf_aware_threading = case.get_value("ESMF_AWARE_THREADING")
esmfmkfile = os.getenv("ESMFMKFILE")
expect(esmfmkfile and os.path.isfile(esmfmkfile),"ESMFMKFILE not found {}".format(esmfmkfile))
with open(esmfmkfile, 'r') as f:
major = None
minor = None
for line in f.readlines():
if 'ESMF_VERSION' in line:
major = line[-2] if 'MAJOR' in line else major
minor = line[-2] if 'MINOR' in line else minor
logger.debug("ESMF version major {} minor {}".format(major,minor))
expect(int(major) >=8,"ESMF version should be 8.1 or newer")
if esmf_aware_threading:
expect(int(minor) >= 2, "ESMF version should be 8.2.0 or newer when using ESMF_AWARE_THREADING")
else:
expect(int(minor) >= 1, "ESMF version should be 8.1.0 or newer")

confdir = os.path.join(case.get_value("CASEBUILD"), "cplconf")
if not os.path.isdir(confdir):
os.makedirs(confdir)
Expand Down
8 changes: 0 additions & 8 deletions drivers/cime/esm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -981,14 +981,6 @@ subroutine esm_init_pelayout(driver, maxthreads, rc)
call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/MaxCount", value=nthrds, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

! call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/MinStackSize", value='40MiB', rc=rc)
! if (chkerr(rc,__LINE__,u_FILE_u)) return

if (nthrds == 1) then
call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/OpenMpHandling", value='none', rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
endif

call NUOPC_CompAttributeGet(driver, name=trim(namestr)//'_rootpe', value=cvalue, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
read(cvalue,*) rootpe
Expand Down