Skip to content

Commit

Permalink
Merge pull request #4504 from jedwards4b/reduce_env_batch_updates
Browse files Browse the repository at this point in the history
reduce the number of times env_batch is rewriten
  • Loading branch information
jedwards4b authored Oct 20, 2023
2 parents 741b0e6 + 5436995 commit 055f35e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CIME/case/case_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ def _submit(
batch_system = "none"
else:
batch_system = env_batch.get_batch_system_type()
unlock_file(os.path.basename(env_batch.filename), caseroot=caseroot)
case.set_value("BATCH_SYSTEM", batch_system)

if batch_system != case.get_value("BATCH_SYSTEM"):
unlock_file(os.path.basename(env_batch.filename), caseroot=caseroot)
case.set_value("BATCH_SYSTEM", batch_system)

env_batch_has_changed = False
if not external_workflow:
Expand Down

0 comments on commit 055f35e

Please sign in to comment.