Commit 4f8fa817 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

The cores variable does not exist anymore but is stored within the configuration dictionary.

parent af958ae5
......@@ -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
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'],
initargs=initargs) as pool:
pool.starmap(worker_analysis, enumerate(mock_table))
Supports Markdown
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