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

improve the account remove and add support for slurm #4466

Merged
merged 2 commits into from
Jul 24, 2023
Merged
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
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
Loading