Skip to content

Pass JobSpec.name to the scheduler in batch submit templates #572

Closed

Description

@hat-im

Pass JobSpec.name to the scheduler in the slurm, pbs, pbs_classic, lsf and cobalt submit templates, as the nqsv template already does.

These templates read job.name, but Job has no name attribute (name is on JobSpec), so their name section is always empty and no --job-name, -N, -J or --jobname line is written.

To reproduce, render the slurm submit script for Job(JobSpec(executable="/bin/date", name="step-a")): no #SBATCH --job-name line appears.

Proposed change:

  • read job.spec.name in those five templates;
  • check the name in test_submit_script_generation.

Agree on one behaviour: JobSpec.name falls back to the executable when no name is set, so unnamed jobs would get the executable path as their job name, where today they get none. Keep that fallback, or emit no name when none was set?

A branch with the change and the test is ready.

Activity

  1. changed the title [-]Batch templates read `job.name`, so no job name reaches the scheduler[/-] [+]Pass JobSpec.name to the scheduler in batch submit templates[/+] on Nov 16, 2026
  2. hategan commented on Nov 16, 2026

    @hategan
    Collaborator

    Hi @hat-im and thank you for finding this issue.

    If you have a branch, can you please open a PR?

    Thanks!

  3. hat-im commented on Nov 16, 2026

    @hat-im
    ContributorAuthor

    Hello, @hategan, I've opened a PR for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions