Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cigale
CIGALE
Commits
4f8fa817
Commit
4f8fa817
authored
Feb 05, 2016
by
Médéric Boquien
Browse files
The cores variable does not exist anymore but is stored within the configuration dictionary.
parent
af958ae5
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/pdf_analysis/__init__.py
View file @
4f8fa817
...
...
@@ -241,12 +241,13 @@ class PdfAnalysis(AnalysisModule):
analysed_averages
,
analysed_std
,
best_fluxes
,
best_parameters
,
best_chi2
,
best_chi2_red
,
save
,
lim_flag
,
n_obs
)
if
cores
==
1
:
# Do not create a new process
if
conf
[
'
cores
'
]
==
1
:
# Do not create a new process
init_worker_analysis
(
*
initargs
)
for
idx
,
mock
in
enumerate
(
mock_table
):
worker_analysis
(
idx
,
mock
)
else
:
# Analyse observations in parallel
with
mp
.
Pool
(
processes
=
cores
,
initializer
=
init_worker_analysis
,
with
mp
.
Pool
(
processes
=
conf
[
'cores'
],
initializer
=
init_worker_analysis
,
initargs
=
initargs
)
as
pool
:
pool
.
starmap
(
worker_analysis
,
enumerate
(
mock_table
))
...
...
Write
Preview
Supports
Markdown
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