Well what I'm actually trying to do is determine how many processors are available, which isn't always the same as the number that are present on the system (e.g. salloc -n 4). So the nproc solution itself is kind of flawed -- I need to do something with the slurm commands, I suppose.