title: How to get SLURM task ID in program
body: <p>I'm running <code>srun -n 100 python foo.py</code>. Inside the python script how does it find out which task number/id/rank it is? Is there an environment variable set?</p>