Skip to content

Commit

Permalink
More stuff from ACME
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfouca committed Aug 10, 2016
1 parent e61ba96 commit 38e2f8a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion utils/python/CIME/SystemTests/homme.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.build import post_build, case_build
from CIME.build import post_build

import shutil

Expand Down
2 changes: 1 addition & 1 deletion utils/python/CIME/SystemTests/system_tests_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def build_phase(self, sharedlib_only=False, model_only=False):

os.chmod(modelexe, 0755)

post_build(self._case, [])
build.post_build(self._case, [])

def run_phase(self):
self.run_indv(suffix=None)
Expand Down
15 changes: 8 additions & 7 deletions utils/python/CIME/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
logger = logging.getLogger(__name__)

def stringify_bool(val):
expect(type(val) is bool, "Wrong type")
val = False if val is None else val
expect(type(val) is bool, "Wrong type for val '%s'" % repr(val))
return "TRUE" if val else "FALSE"

###############################################################################
Expand Down Expand Up @@ -232,10 +233,10 @@ def case_build(caseroot, case, sharedlib_only=False, model_only=False):
os.environ["CAM_CONFIG_OPTS"] = cam_config_opts if cam_config_opts is not None else ""
os.environ["PIO_CONFIG_OPTS"] = pio_config_opts if pio_config_opts is not None else ""
os.environ["OCN_SUBMODEL"] = ocn_submodel if ocn_submodel is not None else ""
os.environ["PROFILE_PAPI_ENABLE"] = stringify_bool(profile_papi_enable) if profile_papi_enable is not None else ""
os.environ["CLM_USE_PETSC"] = stringify_bool(clm_use_petsc) if clm_use_petsc is not None else ""
os.environ["CISM_USE_TRILINOS"] = stringify_bool(cism_use_trilinos) if cism_use_trilinos is not None else ""
os.environ["MPASLI_USE_ALBANY"] = stringify_bool(mpasli_use_albany) if mpasli_use_albany is not None else ""
os.environ["PROFILE_PAPI_ENABLE"] = stringify_bool(profile_papi_enable)
os.environ["CLM_USE_PETSC"] = stringify_bool(clm_use_petsc)
os.environ["CISM_USE_TRILINOS"] = stringify_bool(cism_use_trilinos)
os.environ["MPASLI_USE_ALBANY"] = stringify_bool(mpasli_use_albany)

# This is a timestamp for the build , not the same as the testid,
# and this case may not be a test anyway. For a production
Expand Down Expand Up @@ -269,9 +270,9 @@ def case_build(caseroot, case, sharedlib_only=False, model_only=False):
# the future there may be others -- so USE_ALBANY will be true if
# ANY of those are true.

use_albany = mpasli_use_albany
use_albany = stringify_bool(mpasli_use_albany)
case.set_value("USE_ALBANY", use_albany)
os.environ["USE_ALBANY"] = stringify_bool(use_albany)
os.environ["USE_ALBANY"] = use_albany

# Load modules
env_module = case.get_env("mach_specific")
Expand Down

0 comments on commit 38e2f8a

Please sign in to comment.