Skip to content

Commit

Permalink
jenkins_generic_job add better support for changing scratch root
Browse files Browse the repository at this point in the history
Needed to change exeroot on titan due to low quota.

[BFB]
  • Loading branch information
jgfouca committed Apr 24, 2017
1 parent 007af33 commit 5189111
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions cime/scripts/lib/jenkins_generic_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,27 @@ def jenkins_generic_job(generate_baselines, submit_to_cdash, no_batch,
# Set up create_test command and run it
#

baseline_args = ""
test_id = "%s_%s" % (test_id_root, CIME.utils.get_timestamp())
create_test_args = [test_suite, "--test-root %s" % test_root, "-t %s" % test_id, "--machine %s" % machine.get_machine_name(), "--compiler %s" % compiler]
if (generate_baselines):
baseline_args = "-g -b %s" % baseline_name
create_test_args.append("-g -b %s" % baseline_name)
elif (baseline_compare):
baseline_args = "-c -b %s" % baseline_name
create_test_args.append("-c -b %s" % baseline_name)

batch_args = "--no-batch" if no_batch else ""
pjob_arg = "" if parallel_jobs is None else "-j %d" % parallel_jobs
walltime_arg = "" if walltime is None else " --walltime %s" % walltime
if scratch_root != machine.get_value("CIME_OUTPUT_ROOT"):
create_test_args.append("--output-root=%s" % scratch_root)

test_id = "%s_%s" % (test_id_root, CIME.utils.get_timestamp())
create_test_cmd = "./create_test %s --test-root %s -t %s --machine %s --compiler %s %s %s %s %s" % \
(test_suite, test_root, test_id, machine.get_machine_name(), compiler, baseline_args, batch_args, pjob_arg, walltime_arg)
if no_batch:
create_test_args.append("--no-batch")

if parallel_jobs is not None:
create_test_args.append("-j %d" % parallel_jobs)

if walltime is not None:
create_test_args.append(" --walltime %s" % walltime)


create_test_cmd = "./create_test %s" % " ".join(create_test_args)

if (not CIME.wait_for_tests.SIGNAL_RECEIVED):
create_test_stat = CIME.utils.run_cmd(create_test_cmd, from_dir=CIME.utils.get_scripts_root(),
Expand Down

0 comments on commit 5189111

Please sign in to comment.