I've been doing some tests on my cluster with this Snakefile:
rule all:
input:[f"test.{id}.txt" for id in [1,2,3]]
rule test:
output: temp(touch("test.{id}.txt"))
threads: 10
shell: "sleep 5"
When not using the slurm profile, --cores behaves as I'd expect and there's one instance that gets executed for every 10 cores specified.
When you do specify --profile slurm, --cores behaves instead as if were limiting the number of jobs submitted: --cores 1 will execute 1 job with 10 cores, --cores 2 2 jobs with 10 cores each, and --cores 3 all three of them with 10 cores each.
I've always found it confusing that -j (for "jobs") and --cores are equivalent, and it would seem like my nightmares came true in this use case.
I'd appreciate any help understanding what's going on, and whether it could be with my setup or the way I'm using the profile.