Commit a76307cd authored by Arthur Vigan's avatar Arthur Vigan
Browse files

Get number of CPU from cluster environment variable

parent 428dab60
......@@ -760,7 +760,8 @@ if __name__ == '__main__':
MAXFTDSP = np.max(FT_dsp)
RENORM_FT_DSP = FT_dsp/MAXFTDSP*SUMDSP
ncpu = 4 # int(os.environ.get('PBS_NUM_PPN', mp.cpu_count()))
# get number of CPU from cluster environment variable
ncpu = int(os.environ.get('PBS_NUM_PPN', mp.cpu_count()))
log.info('Using {} CPU to compute images'.format(ncpu))
pool = mp.Pool(processes=ncpu)
tasks = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment