Skip to content

Commit

Permalink
port to vista tacc system
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 2, 2024
1 parent 452642c commit e89176e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
8 changes: 5 additions & 3 deletions config/cesm/machines/config_batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -707,17 +707,19 @@
</batch_system>

<batch_system MACH="vista" type="slurm" >
<batch_submit>ssh vista.tacc.utexas.edu cd $CASEROOT ; sbatch</batch_submit>
<batch_submit>ssh login1.vista.tacc.utexas.edu sbatch </batch_submit>
<jobid_pattern>Submitted batch job (\d+)$</jobid_pattern>
<submit_args>
<arg flag="--time" name="$JOB_WALLCLOCK_TIME"/>
<arg flag="-p" name="$JOB_QUEUE"/>
<arg flag="--account" name="$PROJECT"/>
</submit_args>
<queues>
<queue walltimemax="2:00:00" nodemin="1" nodemax="30">gh-dev</queue>
<queue walltimemax="2:00:00" nodemin="1" nodemax="250" default="true">gh-dev-64k</queue>
<queue walltimemax="2:00:00" nodemin="1" nodemax="32" default="true">gg</queue>
<queue walltimemax="2:00:00" nodemin="1" nodemax="29">gg-4k</queue>
</queues>
</batch_system>

<batch_system MACH="zeus" type="lsf">
<batch_env>-env</batch_env>
<submit_args>
Expand Down
4 changes: 2 additions & 2 deletions config/cesm/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,8 @@ using a fortran linker.
</FFLAGS>
<SUPPORTS_CXX>TRUE</SUPPORTS_CXX>
<SLIBS>
<append> -L$ENV{NETCDF_PATH}/lib -lnetcdff -lnetcdf </append>
<append MPILIB="openmpi"> -L$ENV{PNETCDF_PATH}/lib -lpnetcdf</append>
<append> -Wl,-rpath,$(NETCDF_PATH)/lib -L$ENV{NETCDF_PATH}/lib -lnetcdff -lnetcdf </append>
<append MPILIB="openmpi"> -Wl,-rpath,$(PNETCDF_PATH)/lib -L$ENV{PNETCDF_PATH}/lib -lpnetcdf</append>
</SLIBS>
</compiler>

Expand Down
6 changes: 3 additions & 3 deletions config/cesm/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2905,12 +2905,12 @@ This allows using a different mpirun command to launch unit tests
<GMAKE_J>4</GMAKE_J>
<BATCH_SYSTEM>slurm</BATCH_SYSTEM>
<SUPPORTED_BY></SUPPORTED_BY>
<MAX_TASKS_PER_NODE>72</MAX_TASKS_PER_NODE>
<MAX_MPITASKS_PER_NODE>72</MAX_MPITASKS_PER_NODE>
<MAX_TASKS_PER_NODE>144</MAX_TASKS_PER_NODE>
<MAX_MPITASKS_PER_NODE>144</MAX_MPITASKS_PER_NODE>
<mpirun mpilib="openmpi">
<executable>mpirun</executable>
<arguments>
<arg name="num_tasks"> -np $TOTALPES</arg>
<arg name="num_tasks"> -np {{ total_tasks }}</arg>
</arguments>
</mpirun>
<module_system type="module">
Expand Down
9 changes: 5 additions & 4 deletions scripts/lib/CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def _submit_single_job(self, case, job, dep_jobs=None, allow_fail=False,
if batch_system is None or batch_system == "none" or no_batch:
logger.info("Starting job script {}".format(job))
function_name = job.replace(".", "_")
job_name = "."+job
job_name = os.path.join(self._caseroot,job)
if not dry_run:
args = self._build_run_args(job, True, skip_pnl=skip_pnl, set_continue_run=resubmit_immediate,
submit_resubmits=not resubmit_immediate)
Expand Down Expand Up @@ -688,16 +688,17 @@ def _submit_single_job(self, case, job, dep_jobs=None, allow_fail=False,
if batch_system == 'lsf' and batch_env_flag == 'none':
sequence = (run_args, batchsubmit, submitargs, batchredirect, get_batch_script_for_job(job))
elif batch_env_flag:
sequence = (batchsubmit, submitargs, run_args, batchredirect, get_batch_script_for_job(job))
sequence = (batchsubmit, submitargs, run_args, batchredirect, os.path.join(self._caseroot,get_batch_script_for_job(job)))
else:
sequence = (batchsubmit, submitargs, batchredirect, get_batch_script_for_job(job), run_args)
sequence = (batchsubmit, submitargs, batchredirect, os.path.join(self._caseroot,get_batch_script_for_job(job)), run_args)

submitcmd = " ".join(s.strip() for s in sequence if s is not None)
if dry_run:
return submitcmd
else:
logger.info("Submitting job script {}".format(submitcmd))
output = run_cmd_no_fail(submitcmd, combine_output=True)
# output = run_cmd_no_fail(submitcmd, combine_output=True)
s, output, e = run_cmd(submitcmd, combine_output=True)
jobid = self.get_job_id(output)
logger.info("Submitted job id is {}".format(jobid))
return jobid
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/CIME/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _save_build_provenance_cesm(case, lid): # pylint: disable=unused-argument
manic = os.path.join("manage_externals","checkout_externals")
manic_full_path = os.path.join(srcroot, manic)
out = None
if os.path.exists(manic_full_path):
if shutil.which('svn') and os.path.exists(manic_full_path):
args = " --status --verbose --no-logging"
stat, out, err = run_cmd(manic_full_path + args, from_dir=srcroot)
errmsg = """Error gathering provenance information from manage_externals.
Expand Down
10 changes: 5 additions & 5 deletions scripts/tests/scripts_regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,21 +303,21 @@ def test_a_createnewcase(self):
self.assertTrue(os.path.exists(os.path.join(testdir, "case.setup")))

run_cmd_assert_result(self, "./case.setup", from_dir=testdir)
run_cmd_assert_result(self, "./case.build --skip-provenance-check", from_dir=testdir)
run_cmd_assert_result(self, "./case.build", from_dir=testdir)

with Case(testdir, read_only=False) as case:
ntasks = case.get_value("NTASKS_ATM")
case.set_value("NTASKS_ATM", ntasks+1)
# this should fail with a locked file issue
run_cmd_assert_result(self, "./case.build --skip-provenance-check",
run_cmd_assert_result(self, "./case.build",
from_dir=testdir, expected_stat=1)

run_cmd_assert_result(self, "./case.setup --reset", from_dir=testdir)
run_cmd_assert_result(self, "./case.build --skip-provenance-check", from_dir=testdir)
run_cmd_assert_result(self, "./case.build", from_dir=testdir)
with Case(testdir, read_only=False) as case:
case.set_value("CHARGE_ACCOUNT", "fred")
# this should not fail with a locked file issue
run_cmd_assert_result(self, "./case.build --skip-provenance-check",from_dir=testdir, expected_stat=0)
run_cmd_assert_result(self, "./case.build",from_dir=testdir, expected_stat=0)

run_cmd_assert_result(self, "./case.st_archive --test-all", from_dir=testdir)

Expand Down Expand Up @@ -488,7 +488,7 @@ def test_f_createnewcase_with_user_compset(self):

run_cmd_assert_result(self, "%s/create_newcase %s"%(SCRIPT_DIR, args), from_dir=SCRIPT_DIR)
run_cmd_assert_result(self, "./case.setup", from_dir=testdir)
run_cmd_assert_result(self, "./case.build --skip-provenance-check", from_dir=testdir)
run_cmd_assert_result(self, "./case.build", from_dir=testdir)

cls._do_teardown.append(testdir)

Expand Down

0 comments on commit e89176e

Please sign in to comment.