Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_test: Immediately submit to queue once build is done. #68

Merged
merged 1 commit into from
Feb 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts-python/create_test
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@ def create_test(testargs, compiler, machine_name, no_run, no_build, no_batch, te
baseline_name, namelists_only, project, test_id, parallel_jobs,
xml_machine, xml_compiler, xml_category, xml_testlist):
###############################################################################
if(testargs and machine_name is None and compiler is None):
if (testargs and machine_name is None and compiler is None):
for test in testargs:
testsplit = CIME.utils.parse_test_name(test)
if(testsplit[4] is not None):
if(machine_name is None):
if (testsplit[4] is not None):
if (machine_name is None):
machine_name = testsplit[4]
else:
expect(machine_name == testsplit[4], "abiguity in machine, please use the --machine option")
if(testsplit[5] is not None):
if(compiler is None):
if (testsplit[5] is not None):
if (compiler is None):
compiler = testsplit[5]
else:
expect(compiler == testsplit[5], "abiguity in compiler, please use the --compiler option")
Expand Down
8 changes: 7 additions & 1 deletion utils/python/CIME/system_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from CIME.XML.testlist import Testlist
import CIME.test_utils


INITIAL_PHASE = "INIT"
CREATE_NEWCASE_PHASE = "CREATE_NEWCASE"
XML_PHASE = "XML"
Expand Down Expand Up @@ -550,6 +549,13 @@ def _consumer(self, test, test_phase, phase_method):
status_str += " Case dir: %s\n" % self._get_test_dir(test)
sys.stdout.write(status_str)

# On batch systems, we want to immediately submit to the queue, because
# it's very cheap to submit and will get us a better spot in line
if (not self._no_run and not self._no_batch and test_phase == BUILD_PHASE):
sys.stdout.write("Starting %s for test %s with %d procs\n" % (RUN_PHASE, test, 1))
self._update_test_status(test, RUN_PHASE, TEST_PENDING_STATUS)
self._consumer(test, RUN_PHASE, self._run_phase)

###########################################################################
def _producer(self):
###########################################################################
Expand Down