Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexis Carlotti
HARMONI-HC
Commits
a76307cd
Commit
a76307cd
authored
Nov 12, 2019
by
Arthur Vigan
Browse files
Get number of CPU from cluster environment variable
parent
428dab60
Changes
1
Hide whitespace changes
Inline
Side-by-side
hrm-hc/MAIN_multiproc.py
View file @
a76307cd
...
...
@@ -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
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment