snakemake / snakemake-executor-plugin-slurm

A Snakemake executor plugin for submitting jobs to a SLURM cluster
MIT License
16 stars 18 forks source link

The account or account/partition combination is not recognized! #117

Closed Zhongzheng99 closed 2 months ago

Zhongzheng99 commented 3 months ago

I encountered a problem where I provided the correct partition and account name, but they seem to be unrecognized by the system. Here’s the command I used: snakemake --workflow-profile /home/u2204084007/RNA/cofig/profile --configfile cofig/config.yaml --profile profile

/home/u2204084007/RNA/cofig/profile/config.yaml:

default-resources: slurm_partition: "c01" slurm_account: "u2204084007"

/home/u2204084007/.config/snakemake/profile/config.yaml:

executor: slurm jobs: 100

The output indicates that the profiles are being used for setting default command line arguments:

Using profiles profile and workflow specific profile /home/u2204084007/RNA/cofig/profile for setting default command line arguments.
Building DAG of jobs...

However, there’s a warning that Snakemake is being run in a SLURM job context, which is not recommended:

You are running snakemake in a SLURM job context. This is not recommended, as it may lead to unexpected behavior. Please run Snakemake directly on the login node.
SLURM run ID: e4aa40d6-e26b-4558-a3f8-d614ef095b92

The system proceeds to list the jobs and selects 9 jobs to execute. One of the jobs, copy_input, is detailed with the specified resources, including the partition and account:

rule copy_input:
    input: rawdata/T21-1R_FRAS190282952-1a_1.clean.fq.gz
    output: fastq/raw/T21_1.L001.R1.fastq.gz
    jobid: 28
    reason: Missing output files: fastq/raw/T21_1.L001.R1.fastq.gz; Code has changed since last execution
    wildcards: sample=T21_1, lane=L001, pair=R1
    resources: mem_mb=5622, mem_mib=5362, disk_mb=5622, disk_mib=5362, tmpdir=<TBD>, slurm_partition=c01, slurm_account=u2204084007, io=1

Despite providing the correct partition (c01) and account (u2204084007), the job submission fails with a WorkflowError:

No wall time information given. This might or might not work on your cluster. If not, specify the resource runtime in your rule or as a reasonable default via --default-resources.
WorkflowError:
SLURM job submission failed. The error message was sbatch: error: invalid account or account/partition combination specified
sbatch: error: Batch job submission failed: Unspecified error

This error suggests that there is an issue with the account or partition combination, even though they appear to be correctly specified.

Zhongzheng99 commented 3 months ago

In relation to this issue, it’s important to note that I am not allowed to perform any operations on the login node. Therefore, in practice, I first log into a compute node using salloc, and then from the compute node, I attempt to run the following command:

snakemake --workflow-profile /home/u2204084007/RNA/cofig/profile --configfile cofig/config.yaml --profile profile

Regarding #113, it seems that @cmeesters mentioned potential issues with environment inheritance or that Snakemake is practically dormant. I am uncertain whether these are the primary causes of the error I am encountering.

Zhongzheng99 commented 2 months ago

Ah, this is a mistake because my account is in arrears. I will close this issue!