Skip to content

Commit

Permalink
Merge pull request #4575 from ESMCI/jgfouca/fix_no_batch
Browse files Browse the repository at this point in the history
case.submit: Fix no-batch mode.

No output fron the batch env is provided to get_job_id when no_batch is on. Treat that case the same as if batchtype is none.

Also, update cprnc submodule.

We also never want file_util.copy_file to be verbose. It was cluttering the output coming from create_test on some platforms.

Test suite: by-hand.
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes [CIME Github issue #]

User interface changes?:

Update gh-pages html (Y/N)?:
  • Loading branch information
jgfouca authored Feb 5, 2024
2 parents 475beb2 + fabc297 commit af3d330
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,8 +1124,14 @@ def get_job_id(self, output):
jobid_pattern is not None,
"Could not find jobid_pattern in env_batch.xml",
)

# If no output was provided, skip the search. This could
# be because --no-batch was provided.
if not output:
return output
else:
return output

search_match = re.search(jobid_pattern, output)
expect(
search_match is not None,
Expand Down
2 changes: 1 addition & 1 deletion CIME/non_py/cprnc
2 changes: 2 additions & 0 deletions CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,7 @@ def safe_copy(src_path, tgt_path, preserve_meta=True):
tgt_path,
preserve_mode=preserve_meta,
preserve_times=preserve_meta,
verbose=0,
)
else:
# I am not the owner, just copy file contents
Expand All @@ -1426,6 +1427,7 @@ def safe_copy(src_path, tgt_path, preserve_meta=True):
tgt_path,
preserve_mode=preserve_meta,
preserve_times=preserve_meta,
verbose=0,
)

# If src file was executable, then the tgt file should be too
Expand Down

0 comments on commit af3d330

Please sign in to comment.