This should give you the correct number: import os print os.environ['SLURM_JOB_CPUS_PER_NODE']
cheers, satra On Thu, Jul 17, 2014 at 4:56 AM, Sheila the angel <[email protected]> wrote: > Hello All, > I am new to SLURM and trying to run Multiprocessing job via python. > > import multiprocessing > print multiprocessing.cpu_count() > > The number of CPU shown by Python is always same (16) even if I reserve > only 4 CPU. > Does anyone have experience on running Multiprocessing job via python > on SLURM? > How can I run a python multiprocessing job efficiently on SLURM? > > Thanks, > > -- > Best, > Sheila > >
