Skip to content

Commit

Permalink
Set initialization condition for not one just all ranks
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Mar 12, 2024
1 parent b336f22 commit 5618425
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions micro_manager/micro_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,9 @@ def _initialize(self) -> None:
self._micro_sims_init = True
initial_micro_output = self._micro_sims[0].initialize() # Call initialize() of the first simulation
if initial_micro_output is None: # Check if the detected initialize() method returns any data
if self._rank == 0:
warn("The initialize() call of the Micro simulation has not returned any initial data."
" The initialize call is stopped.")
self._micro_sims_init = False
warn("The initialize() call of the Micro simulation has not returned any initial data."
" The initialize call is stopped.")
self._micro_sims_init = False
else:
# Save initial data from first micro simulation as we anyway have it
for name in initial_micro_output.keys():
Expand All @@ -363,7 +362,7 @@ def _initialize(self) -> None:
for name in self._adaptivity_micro_data_names:
self._data_for_adaptivity[name][i] = initial_micro_output[name]
else:
print("Micro simulation has the method initialize(), but it is not called, because adaptivity is off.")
self._logger.info("Micro simulation has the method initialize(), but it is not called, because adaptivity is off.")

self._micro_sims_have_output = False
if hasattr(micro_problem, 'output') and callable(getattr(micro_problem, 'output')):
Expand Down

0 comments on commit 5618425

Please sign in to comment.