Thanks for the update.
Unfortunately, I don’t understand when this error is triggered, since you were able to use both GPUs while running via srun, but nevertheless are also hitting the error when running through sbatch or srun.
If that’s the case, I would assume that your actual script is not working correctly or, as you suggested, Lightning or any other 3rd party library might cause problems.
Were you able to run a pure PyTorch script?