Skip to content

Fix --mail-type args to use comma-separated values instead of repeated flags#4969

Merged
jgfouca merged 3 commits intomasterfrom
copilot/fix-mail-type-args-perlmutter
Apr 23, 2026
Merged

Fix --mail-type args to use comma-separated values instead of repeated flags#4969
jgfouca merged 3 commits intomasterfrom
copilot/fix-mail-type-args-perlmutter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

Description

On SLURM systems (e.g. Perlmutter), multiple mail types were being submitted as repeated flags (--mail-type end --mail-type fail) instead of a single comma-separated argument (--mail-type end,fail). This caused SLURM to silently drop the notification on job completion.

Root cause: The else branch in _submit_single_job was joining mail_type_args using the flag itself as separator, duplicating it:

# Before (broken): produces "--mail-type end --mail-type fail"
submitargs += " {} {}".format(
    mail_type_flag,
    " {} ".format(mail_type_flag).join(mail_type_args),
)

# After (fixed): produces "--mail-type end,fail"
submitargs += " {} {}".format(
    mail_type_flag,
    ",".join(mail_type_args),
)

The -m (PBS) path, which concatenates without any separator, is unchanged.

Fixes #4968

Checklist

  • My code follows the style guidelines of this project (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that exercise my feature/fix and existing tests continue to pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding additions and changes to the documentation

Copilot AI changed the title [WIP] Fix mail-type args not being set correctly on Perlmutter Fix --mail-type args to use comma-separated values instead of repeated flags Apr 22, 2026
Copilot AI requested a review from jgfouca April 22, 2026 18:39
@jgfouca jgfouca marked this pull request as ready for review April 22, 2026 19:00
@billsacks billsacks removed their request for review April 22, 2026 23:27
@billsacks
Copy link
Copy Markdown
Member

I don't feel a need to review this given others' reviews, so removing myself as reviewer.

Copy link
Copy Markdown
Collaborator

@jasonb5 jasonb5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jgfouca jgfouca merged commit 30d4efd into master Apr 23, 2026
9 checks passed
@jgfouca jgfouca deleted the copilot/fix-mail-type-args-perlmutter branch April 23, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mail-type args not being set correctly on Perlmutter

6 participants