Skip to content

invalid choice: 'slurm-jobstep' (choose from 'local', 'd ryrun', 'touch') #25

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

Closed
radaniba opened this issue May 31, 2024 · 5 comments
Closed

Comments

@radaniba
Copy link

Hello everyone

I am trying to execute a Snakemake pipeline on a slurm cluster but I get this error

"error: argument --executor/-e: invalid choice: 'slurm-jobstep' (choose from 'local', 'dryrun', 'touch')"

I am using the latest version of snakemake and also using an older version (unfortunately cannot upgrade) of slurm (~19)

Locally everything seems to work Ok but when I use executer slurm in my profile this error occure in all my log files (the jobs I mean)

Any idea ?

@cmeesters
Copy link
Member

Hi,

I can only assume there is an issue with your setup. The idea is that this plugin is a dependency of the snakemake-executor-plugin-slurm and not installed by itself. So, when you work on a login- or head-node of your cluster, Snakemake essentially submits itself. Only within a job the jobstep plugin is used. So:

If these hints do not help, please post your environment (e.g. by appending a text file). You get it by invoking env. And post your command line, resp. your profile.

@radaniba
Copy link
Author

radaniba commented Jun 2, 2024

Hello @cmeesters
Yes, snakemake-executor-plugin-slurm is installed and regarding the second point the answer is no, this is a typical bioinformatics pipeline so basically calling tools with default arguments.

My profile looks like this

config.v8+.yaml

executor: slurm
jobs: 10

default-resources:
    slurm_partition: "hannibal_high_mem"
    mem_mb: 23552
    slurm_account: "root"

cluster.yaml

__default__:
  mem: 23552
  threads: 1

The way I run my workflows is like this :

snakemake --profile profile_name

Now I get this weired error

WorkflowError:
The given account root appears to be invalid. Available accounts:

Even though saactmgr is listing the account

@radaniba
Copy link
Author

radaniba commented Jun 2, 2024

apologies this last comment was fixed but my my main issue with the executor still there

main.py: error: argument --executor/-e: invalid choice: 'slurm-jobstep' (choose from 'local', 'dryrun', 'touch')

The rule looks like this

rule trim_galore:
    input:
        fastq1 = os.path.join(FASTQ_DIR,"{sample}_1.fastq.gz"),
        fastq2 = os.path.join(FASTQ_DIR,"{sample}_2.fastq.gz")
    output:
        trimmed_fastq1 = os.path.join(TRIM_OUTPUT_DIR, "{sample}_val_1.fq.gz"),
        trimmed_fastq2 = os.path.join(TRIM_OUTPUT_DIR, "{sample}_val_2.fq.gz"),
        unpaired_fastq1 = os.path.join(TRIM_OUTPUT_DIR, "{sample}_val_1_unpaired.fq.gz"),
        unpaired_fastq2 = os.path.join(TRIM_OUTPUT_DIR, "{sample}_val_2_unpaired.fq.gz")
    shell:
        """
        trim_galore --paired --retain_unpaired {input.fastq1} {input.fastq2} --output_dir {TRIM_OUTPUT_DIR}
        """
        ```

 

@radaniba
Copy link
Author

radaniba commented Jun 3, 2024

I apologize, I found my issue, I had to get this plugin setup in all nodes :) silly mistake

@radaniba radaniba closed this as completed Jun 3, 2024
@cmeesters
Copy link
Member

Glad it's working. Just 2 cents:

  • the assumption is, of course, a shared file system, such that you only need to install once.
  • 'root' is an unlikely SLURM account. Usually, SLURM derives from 'none' - but users cannot submit using this account. On systems with a default account or no accounting at all, users may omit the slurm_account
  • and a third: if you are dealing with different partitions, it's best not to run all in a high memory partition, as indicated by your example.

I really hope this helps.
Cheers
Christian

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

No branches or pull requests

2 participants