Skip to content

Commit

Permalink
better fix for nck test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jul 17, 2016
1 parent 1abee3e commit e681111
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 20 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
../apply_to_multiinstance
../../default_io
4 changes: 3 additions & 1 deletion utils/python/CIME/SystemTests/nck.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def build(self, sharedlib_only=False, model_only=False):
self._case.set_value("NTASKS_%s"%comp, ntasks/2)
self._case.set_value("ROOTPE_%s"%comp, rootpe/2)
else:
self._case.set_value("NINST_%s"%comp, 1)
self._case.set_value("NTASKS_%s"%comp, 2)
self._case.flush()

case_setup(self._case, test_mode=True, reset=True)
Expand Down Expand Up @@ -108,6 +108,8 @@ def run(self):
"%s/%s.exe" % (exeroot, cime_model))
shutil.copy("LockedFiles/env_build.NCK2.xml", "env_build.xml")
shutil.copy("env_build.xml", "LockedFiles/env_build.xml")
shutil.copy("LockedFiles/env_mach_pes.NCK2.xml", "env_mach_pes.xml")
shutil.copy("env_mach_pes.xml", "LockedFiles/env_mach_pes.xml")

logger.info("default: doing a %s %s with NINST2" % (stop_n, stop_option))
success = SystemTestsCommon._run(self, "multiinst")
Expand Down
6 changes: 3 additions & 3 deletions utils/python/CIME/user_mod_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def apply_user_mods(caseroot, user_mods_path, ninst=None):
'''
Recursivlely apply user_mods to caseroot - this includes updating user_nl_xxx,
Recursivlely apply user_mods to caseroot - this includes updating user_nl_xxx,
updating SourceMods and creating case_shel_commands and xmlchange_cmds files
'''
include_dirs = build_include_dirs_list(user_mods_path)
Expand All @@ -23,7 +23,7 @@ def apply_user_mods(caseroot, user_mods_path, ninst=None):
case_user_nl = user_nl.replace(include_dir, caseroot)
comp = case_user_nl.split('_')[-1]
if ninst is not None and comp in ninst.keys():
for comp_inst in xrange(1, ninst[comp]):
for comp_inst in xrange(1, ninst[comp]+1):
case_user_nl_inst = case_user_nl + "_%4.4d"%comp_inst
logger.info("Pre-pending file %s"%case_user_nl_inst)
if os.path.isfile(case_user_nl):
Expand Down Expand Up @@ -70,7 +70,7 @@ def apply_user_mods(caseroot, user_mods_path, ninst=None):
with open(case_shell_commands, "a") as fd:
fd.write(new_shell_commands)

shell_command_files = [os.path.join(caseroot,"shell_commands"),
shell_command_files = [os.path.join(caseroot,"shell_commands"),
os.path.join(caseroot,"xmlchange_cmnds")]
for shell_command_file in shell_command_files:
if os.path.isfile(shell_command_file):
Expand Down

0 comments on commit e681111

Please sign in to comment.