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
VIGNET Pierre
cadbiom
Commits
3118a54d
Commit
3118a54d
authored
Jan 31, 2017
by
VIGNET Pierre
Browse files
Optimization of the number of processes for 8 threads per solver
parent
91e5f249
Changes
1
Hide whitespace changes
Inline
Side-by-side
script_mac.py
View file @
3118a54d
...
...
@@ -507,7 +507,12 @@ def launch_researchs(args):
d
[
'final_prop'
]
=
prop
return
d
with
ProcessPoolExecutor
(
max_workers
=
mp
.
cpu_count
())
as
e
:
# Fix number of processes
# PS: the new solver is optimized for 8 threads
nb_cpu_required
=
mp
.
cpu_count
()
/
8
nb_cpu_required
=
1
if
nb_cpu_required
==
0
else
nb_cpu_required
with
ProcessPoolExecutor
(
max_workers
=
nb_cpu_required
)
as
e
:
futures_and_output
=
{
e
.
submit
(
compute_macs
,
update_params
(
job_property
)
...
...
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