You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compatibility with snakemake version 8.0 and higher #117
Snakemake was recently updated to version 8.0 with quite extensive changes to its API. I was wondering if there were any plans to update this repository so that it is compatible with the latest version of snakemake?
I attempted to use a profile generated from the latest version of this repo with snakemake 8.0 and received the following error:
Hi @TBradley27, I'm just catching up on this, so while the answer is yes to updating the repo, I need to look into some of the details first. Have you tried changing the option names --cluster-cancel, --cluster-status in your config file to --cluster-generic-cancel-cmd, --cluster-generic-status-cmd and so on? These options become available after installing snakemake-executor-plugin-cluster-generic and snakemake-executor-plugin-slurm. Here I don't know if the specific plugins are meant to invoke specific option names (e.g., --cluster-slurm-status), but that doesn't seem to be the case at present?
I've come across this same issue when new users have attempted to run our snakemake workflows in our recommended run mode with this profile.
I've done some experimentation based on your comment on this issue, and have found I need to make the following changes to force snakemake to run, alongside installation of the slurm and generic executor modules.
cluster: "slurm-submit.py" changed to cluster-generic-submit-cmd: "slurm-submit.py"
cluster-cancel: "scancel" changed to cluster-generic-cancel-cmd: "scancel"
cluster-status: "slurm-status.py" changed to cluster-generic-status-cmd: "slurm-status.py"
cluster-sidecar: "slurm-sidecar.py" changed to cluster-generic-sidecar-cmd; "slurm-sidecar.py"
Unfortunately the logging and job ID functionality that this profile used to provide still don't work with this fix, but it does at least mean it can run! The default sbatch settings also aren't working as before.
I generated a profile using cookiecutter, then edited it according to @TMAdams suggestion, and now snakemake is able to perform a dry-run.
However, the log annotates all the rules as "localrule". So I suppose they will not be executed via slurm, but on the submit node, which is wrong.
I generated a profile using cookiecutter, then edited it according to @TMAdams suggestion, and now snakemake is able to perform a dry-run. However, the log annotates all the rules as "localrule". So I suppose they will not be executed via slurm, but on the submit node, which is wrong.
I've not experimented directly, but looking at my config compared to yours, the only difference I can see is that yours doesn't appear to have a slurm-sidecar listed? I also specify my profile with the --profile option and reserve --configfile for the config.yaml that controls parameters for the workflow, though it may be the way our different workflows are set up meaning that.
Mine are also marked as "localrule" but run through the scheduler as expected, see an example from a dry-run below:
I didn't include slurm-sidecar when generating the profile, because I did not understand the documentation and I was not sure it would work. But maybe this is the default for some good reason.
I will try to actually run the pipeline with a very reduced set of inputs, to see if the rules are correctly submitted to compute nodes. In any case, the "localrule" annotation is at best misleading.
This seems to work (i.e., jobs are submitted to slurm when not performing a dry run), but the job names (as displayed by the squeue command) do not seem to comply with the pattern specified in CookieCutter.py.
unfortunately I still haven't had time to dig into the details of Snakemake version 8 changes, but it does seem that the role of the profile reduces to that of the config.yaml file only (I may still be wrong). I have discussed the future of the profile (and profiles in general) with the main developers and I added a short note to the README of this repo. Until I get a better understanding of what part the profile plays in the future, support for version 8 has currently been put on hold.
Activity
percyfal commentedon Jan 8, 2024
Hi @TBradley27, I'm just catching up on this, so while the answer is yes to updating the repo, I need to look into some of the details first. Have you tried changing the option names
--cluster-cancel,--cluster-statusin your config file to--cluster-generic-cancel-cmd,--cluster-generic-status-cmdand so on? These options become available after installingsnakemake-executor-plugin-cluster-genericandsnakemake-executor-plugin-slurm. Here I don't know if the specific plugins are meant to invoke specific option names (e.g.,--cluster-slurm-status), but that doesn't seem to be the case at present?TMAdams commentedon Jan 23, 2024
Hi @percyfal,
I've come across this same issue when new users have attempted to run our snakemake workflows in our recommended run mode with this profile.
I've done some experimentation based on your comment on this issue, and have found I need to make the following changes to force snakemake to run, alongside installation of the slurm and generic executor modules.
Unfortunately the logging and job ID functionality that this profile used to provide still don't work with this fix, but it does at least mean it can run! The default sbatch settings also aren't working as before.
blaiseli commentedon Feb 12, 2024
I generated a profile using cookiecutter, then edited it according to @TMAdams suggestion, and now snakemake is able to perform a dry-run.
However, the log annotates all the rules as "localrule". So I suppose they will not be executed via slurm, but on the submit node, which is wrong.
My snakemake command is the following:
Here is
${profile}/config.yamlWhat am I missing ?
I tried using
--drmaa, as suggested in the documentation (https://snakemake.readthedocs.io/en/v8.4.8/tutorial/additional_features.html#cluster-execution), but I get asnakemake: error: unrecognized arguments: --drmaa.TMAdams commentedon Feb 12, 2024
I've not experimented directly, but looking at my config compared to yours, the only difference I can see is that yours doesn't appear to have a slurm-sidecar listed? I also specify my profile with the --profile option and reserve --configfile for the config.yaml that controls parameters for the workflow, though it may be the way our different workflows are set up meaning that.
Mine are also marked as "localrule" but run through the scheduler as expected, see an example from a dry-run below:
blaiseli commentedon Feb 12, 2024
Thanks for your quick answer.
I made a type when posting my command. This should be:
I didn't include slurm-sidecar when generating the profile, because I did not understand the documentation and I was not sure it would work. But maybe this is the default for some good reason.
I will try to actually run the pipeline with a very reduced set of inputs, to see if the rules are correctly submitted to compute nodes. In any case, the "localrule" annotation is at best misleading.
blaiseli commentedon Feb 12, 2024
This seems to work (i.e., jobs are submitted to slurm when not performing a dry run), but the job names (as displayed by the
squeuecommand) do not seem to comply with the pattern specified inCookieCutter.py.In my case:
I obtain stuff like "c31263ea-65ba-4" in the NAME column of squeue output.
Using sidecar didn't help with this.
TMAdams commentedon Feb 12, 2024
Yeah I've observed the same behaviour with job names. Haven't been able to fix it or to get the logging back to how it was, but at least it runs!
blaiseli commentedon Feb 12, 2024
Where should this job naming issue be reported ? Here, or to the main snakemake repo ?
blaiseli commentedon Feb 12, 2024
I think I found how to display a better job name in squeue, based on this line of code:
https://github.com/snakemake/snakemake-executor-plugin-slurm/blob/5dfd514b3c246acbeab9257ae029c039105672a0/snakemake_executor_plugin_slurm/__init__.py#L77
The job name is stored as comment in sbatch, so to display it in squeue, you need to pass "%k" to the -o option.
blaiseli commentedon Feb 16, 2024
@TMAdams In the following issue, someone suggests a hack to set job names: snakemake/snakemake-executor-plugin-slurm#18 (comment)
percyfal commentedon Apr 25, 2024
Hi @TBradley27 ,
unfortunately I still haven't had time to dig into the details of Snakemake version 8 changes, but it does seem that the role of the profile reduces to that of the config.yaml file only (I may still be wrong). I have discussed the future of the profile (and profiles in general) with the main developers and I added a short note to the README of this repo. Until I get a better understanding of what part the profile plays in the future, support for version 8 has currently been put on hold.