SLURM Runtime Error due to "ntasks" variable

Once logged in to the machine, you wouldn’t run your script with srun. Just a regular python script run.

I added some docs here to make it clearer: Document SLURM interactive mode by awaelchli · Pull Request #16955 · Lightning-AI/lightning · GitHub

Hope this helps