Skip to content
Snippets Groups Projects
Commit 0c2ab531 authored by Pierre Augier's avatar Pierre Augier
Browse files

Fix load_params_simul with MPI

parent 3cc17153
No related branches found
No related tags found
No related merge requests found
......@@ -187,5 +187,5 @@
return params
def load_params_simul(path=None):
def load_params_simul(path=None, only_mpi_rank0=True):
"""Load the parameters and return a Parameters instance."""
......@@ -191,3 +191,3 @@
"""Load the parameters and return a Parameters instance."""
if mpi.rank > 0:
if mpi.rank > 0 and not only_mpi_rank0:
params = None
......@@ -193,5 +193,4 @@
params = None
params = mpi.comm.bcast(params, root=0)
else:
if path is None:
path = os.getcwd()
......@@ -225,8 +224,8 @@
else:
raise ValueError
if mpi.nb_proc > 1:
params = mpi.comm.bcast(params, root=0)
if mpi.nb_proc > 1 and not only_mpi_rank0:
params = mpi.comm.bcast(params, root=0)
return params
......
......@@ -64,7 +64,10 @@
"""Should be able to run a base experiment."""
with stdout_redirected():
self.sim.time_stepping.start()
load_params_simul(self.sim.output.path_run + "/params_simul.xml")
load_params_simul(
self.sim.output.path_run + "/params_simul.xml",
only_mpi_rank0=False
)
fld.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment