Added proper support for slurm.

Hi Hilary,
hope this time things went ok. This is only, what is required to use slurm properly. When you have taken over this, I'll ask for the homeless update.
Cheerio,
Luis