Describe the bug
Slurm is commonly configured to forward all environment variables. When defining env SNAKEMAKE_PROFILE then Slurm will by default forward this through sbatch. This causes the inner snakemake inside the job script to have args.profile set to a non-None value and subsequently snakemake existing with
Error: you need to specify the maximum number of jobs to be queued or executed at the same time with --jobs or -j.