Added proper support for slurm.