Skip to content

Commit

Permalink
Merge pull request #4466 from jedwards4b/refine_account_remove
Browse files Browse the repository at this point in the history
improve the account remove and add support for slurm
  • Loading branch information
jedwards4b authored Jul 24, 2023
2 parents 883edea + fcdf8df commit a8e8e79
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,11 +969,14 @@ def _submit_single_job(

if not project:
# If there is no project then we need to remove the project flag
# slurm defines --account only on machines that require it, so this strip isn't required
if batch_system == "pbs" or batch_system == "cobalt":
if (
batch_system == "pbs" or batch_system == "cobalt"
) and " -A " in submitargs:
submitargs = submitargs.replace("-A", "")
elif batch_system == "lsf":
elif batch_system == "lsf" and " -P " in submitargs:
submitargs = submitargs.replace("-P", "")
elif batch_system == "slurm" and " --account " in submitargs:
submitargs = submitargs.replace("--account", "")

if dep_jobs is not None and len(dep_jobs) > 0:
logger.debug("dependencies: {}".format(dep_jobs))
Expand Down

0 comments on commit a8e8e79

Please sign in to comment.