Skip to content

Commit

Permalink
Merge pull request #268 from jedwards4b/pbs_fixes
Browse files Browse the repository at this point in the history
This commit brings the following changes,
* Fixes required for the PBS job scheduler
* Fixes to get CIME working on Blues
* Minor change to the commit template
* Fixes to get gptl timing working on blues
* A fix to use compiler as an attribute when selecting mpilib in bless_test_results

scripts_regression_tests
Test suite: 
Test baseline: 
Test namelist changes: 
Test status: bit for bit

Fixes #265 
Fixes #266 

User interface changes?: 

Code review: jayesh
  • Loading branch information
jayeshkrishna authored Jul 19, 2016
2 parents 9a4db4d + aa193c7 commit 300cdce
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]

Fixes: [CIME Github issue #]
Fixes [CIME Github issue #]

User interface changes?:

Expand Down
1 change: 1 addition & 0 deletions cime_config/acme/machines/config_batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<arg flag="-A" name="PROJECT"/>
</submit_args>
<directives>
<directive> -V </directive>
<directive> -N {{ job_id }}</directive>
<directive default="n"> -r {{ rerunnable }} </directive>
<!-- <directive> -j oe {{ output_error_path }} </directive> -->
Expand Down
1 change: 1 addition & 0 deletions cime_config/acme/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ for mct, etc.
<MPI_PATH MPILIB="mvapich">/blues/gpfs/home/software/spack/opt/spack/linux-x86_64/gcc-5.3.0/mvapich2-2.2b-sdh7nhddicl4sh5mgxjyzxtxox3ajqey</MPI_PATH>
<MPI_LIB_NAME MPILIB="mvapich">mpi</MPI_LIB_NAME>
<ADD_SLIBS>$(shell $(NETCDF_PATH)/bin/nc-config --flibs) -llapack -lblas</ADD_SLIBS>
<GPTL_CPPDEFS> -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY</GPTL_CPPDEFS>
<PIO_FILESYSTEM_HINTS>gpfs </PIO_FILESYSTEM_HINTS>
</compiler>

Expand Down
3 changes: 2 additions & 1 deletion cime_config/acme/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,12 @@

<machine MACH="blues">
<DESC>ANL/LCRC Linux Cluster</DESC>
<NODENAME_REGEX>(blogin|^b\d)</NODENAME_REGEX>
<NODENAME_REGEX>b.*.lcrc.anl.gov</NODENAME_REGEX>
<TESTS>acme_integration</TESTS>
<COMPILERS>gnu,pgi,intel,nag</COMPILERS>
<MPILIBS>mvapich,mpich,openmpi,mpi-serial</MPILIBS>
<CESMSCRATCHROOT>/lcrc/project/$PROJECT/$USER/acme_scratch</CESMSCRATCHROOT>
<SAVE_TIMING_DIR>/lcrc/project/$PROJECT</SAVE_TIMING_DIR>
<RUNDIR>$CESMSCRATCHROOT/$CASE/run</RUNDIR>
<EXEROOT>$CESMSCRATCHROOT/$CASE/bld</EXEROOT>
<DIN_LOC_ROOT>/home/ccsm-data/inputdata</DIN_LOC_ROOT>
Expand Down
7 changes: 2 additions & 5 deletions cime_config/acme/machines/template.case.run
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ batch directives. Use case.submit from the command line to run your case.
"""

import os, sys
os.chdir( '{{ caseroot }}')

_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
7 changes: 2 additions & 5 deletions cime_config/acme/machines/template.case.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ by case.submit when on batch system. This script only exists as a way of providi
batch directives. Use case.submit from the command line to run your case.
"""
import os, sys
os.chdir( '{{ caseroot }}')

_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
6 changes: 2 additions & 4 deletions cime_config/acme/machines/template.lt_archive
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ batch directives. Use case.submit from the command line to run your case.

import sys
import os
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
os.chdir( '{{ caseroot }}' )

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
6 changes: 2 additions & 4 deletions cime_config/acme/machines/template.st_archive
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ batch directives. Use case.submit from the command line to run your case.
"""

import sys, os, time
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
os.chdir( '{{ caseroot }}')

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
7 changes: 2 additions & 5 deletions cime_config/cesm/machines/template.case.run
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ batch directives. Use case.submit from the command line to run your case.
"""

import os, sys
os.chdir( '{{ caseroot }}')

_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
7 changes: 2 additions & 5 deletions cime_config/cesm/machines/template.case.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ by case.submit when on batch system. This script only exists as a way of providi
batch directives. Use case.submit from the command line to run your case.
"""
import os, sys
os.chdir( '{{ caseroot }}')

_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
6 changes: 2 additions & 4 deletions cime_config/cesm/machines/template.lt_archive
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ batch directives. Use case.submit from the command line to run your case.

import sys
import os
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
os.chdir( '{{ caseroot }}' )

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down
7 changes: 2 additions & 5 deletions cime_config/cesm/machines/template.st_archive
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ batch directives. Use case.submit from the command line to run your case.
"""

import sys, os, time
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
os.chdir( '{{ caseroot }}')

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools")
sys.path.append(_LIBDIR)

from standard_script_setup import *
Expand Down Expand Up @@ -61,7 +59,6 @@ formatter_class=argparse.ArgumentDefaultsHelpFormatter
###############################################################################
def _main_func(description):
###############################################################################

if ("--test" in sys.argv):
test_results = doctest.testmod(verbose=True)
sys.exit(1 if test_results.failed > 0 else 0)
Expand Down
5 changes: 3 additions & 2 deletions scripts/Tools/bless_test_results
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ def bless_test_results(baseline_name, test_root, compiler, test_id=None, namelis
baseline_area = os.path.join(baseline_root, baseline_tag)

# The env_mach_specific script may need these to be defined
os.environ["COMPILER"] = _MACHINE.get_default_compiler() # this MUST match compiler that cprnc was built with
os.environ["MPILIB"] = _MACHINE.get_default_MPIlib()
compiler = _MACHINE.get_default_compiler() # this MUST match compiler that cprnc was built with
os.environ["COMPILER"] = compiler
os.environ["MPILIB"] = _MACHINE.get_default_MPIlib(attributes={"compiler":compiler})

broken_blesses = []
for test_status_file in test_status_files:
Expand Down
3 changes: 0 additions & 3 deletions utils/python/CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,6 @@ def submit_single_job(self, case, job, depid=None, no_batch=False):
if string is not None:
submitcmd += string + " "

if self.batchtype == "pbs":
submitcmd += " -F \"--caseroot %s\""%caseroot

logger.info("Submitting job script %s"%submitcmd)
output = run_cmd(submitcmd)
jobid = self.get_job_id(output)
Expand Down
4 changes: 2 additions & 2 deletions utils/python/CIME/case_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ def save_timing_setup_acme(case, lid):
return

timing_dir = case.get_value("SAVE_TIMING_DIR")
if timing_dir is None:
if timing_dir is None or timing_dir == 'UNSET':
logger.warning("ACME requires SAVE_TIMING_DIR to be set in order to save timings. Skipping save timings")
return

logger.warn("timing dir is %s"%timing_dir)
rundir = case.get_value("RUNDIR")
caseroot = case.get_value("CASEROOT")
cimeroot = case.get_value("CIMEROOT")
Expand Down

0 comments on commit 300cdce

Please sign in to comment.