Skip to content

problem with jobname renaming in slurm config #816

@LeoWelter

Description

@LeoWelter

I have the following definition in my profile. Yet the parenthesis in the job names are not replaced.

executor {
            name = 'slurm'
            queueSize = 70
            submitRateLimit = '10 sec'
            jobName = {
                n = "${task.name}" -> n.replaceAll('[():\\\s]', '_')
            }
        }

therefore I get these kind of errors:


Caused by:
  Failed to submit process to grid scheduler for execution


Command executed:

  sbatch .command.run

Command exit status:
  1

Command output:
  sbatch: error: Illegal character in job name at position 27. Valid characters are lowercase a to z, uppercase A to Z, numbers 0 to 9, period (.), underscore (_), forward slash (/) and hyphen (-).
  sbatch: error: Batch job submission failed: Unspecified error

If I look at the .command.run file, the job name is set to:
#SBATCH -J nf-NFCORE_MAG_MAG_MEGAHIT_(sample1)

I tried the java regex on https://regex101.com/ where it replaces the parenthesis correctly.

Any help to get this working is appreciated

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