Skip to content

Commit

Permalink
Merge branch 'jgfouca/cime/case_build_use_old' into next (PR #3043)
Browse files Browse the repository at this point in the history
Merge 2 for this PR.

[BFB]

* jgfouca/cime/case_build_use_old:
  Forgot to push these compy fixes
  • Loading branch information
jgfouca committed Nov 15, 2019
2 parents 85526c5 + c24b324 commit ac9d521
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions cime/scripts/Tools/case.build
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def parse_command_line(args, description):
parser.add_argument("--use-old", action="store_true",
help="Use old Makefile build system (not cmake)")

parser.add_argument("--use-gmake", action="store_true",
help="Use gmake backed for CMake (instead of ninja). "
"The gmake backend does not always correctly scan fortran dependencies")
parser.add_argument("--use-gmake", action="store_true",
help="Use gmake backed for CMake (instead of ninja). "
"The gmake backend does not always correctly scan fortran dependencies")

parser.add_argument("--dry-run", action="store_true",
help="Just print the cmake and ninja commands.")
Expand Down Expand Up @@ -117,6 +117,10 @@ def parse_command_line(args, description):
cleanlist = args.clean if args.clean is None or len(args.clean) else comps
buildlist = None if args.build is None or len(args.build) == 0 else args.build

if get_model() != "e3sm":
args.use_old = False
args.use_gmake = False

return args.caseroot, args.sharedlib_only, args.model_only, cleanlist, args.clean_all, buildlist, clean_depends, not args.skip_provenance_check, args.use_old, args.use_gmake, args.dry_run

###############################################################################
Expand All @@ -129,6 +133,10 @@ def _main_func(description):
with Case(caseroot, read_only=False) as case:
testname = case.get_value('TESTCASE')

if get_model() == "e3sm" and case.get_value("COMPILER") == "pgi" and not use_gmake:
logging.warning("ninja CMake backend does not work with pgi, switching to gmake backend")
use_gmake = True

if cleanlist is not None or clean_all or clean_depends is not None:
build.clean(case, cleanlist=cleanlist, clean_all=clean_all, clean_depends=clean_depends)
elif(testname is not None):
Expand Down
2 changes: 1 addition & 1 deletion cime/scripts/lib/CIME/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def __init__(self, test_names, test_data=None,
self._machobj = Machines(machine=machine_name)

if get_model() == "e3sm":
self._model_build_cost = (self._machobj.get_value("GMAKE_J") * 2) / 3 + 1
self._model_build_cost = int((self._machobj.get_value("GMAKE_J") * 2) / 3) + 1
else:
self._model_build_cost = 4

Expand Down

0 comments on commit ac9d521

Please sign in to comment.