File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1818from yt .utilities .cython_fortran_utils import FortranFile as fpu
1919from yt .utilities .lib .cosmology_time import t_frw , tau_frw
2020from yt .utilities .on_demand_imports import _f90nml as f90nml
21- from yt .utilities .parallel_tools .parallel_analysis_interface import communication_system
2221from yt .utilities .physical_constants import kb , mp
2322
2423from .definitions import (
@@ -681,12 +680,14 @@ def _identify_base_chunk(self, dobj):
681680
682681 # In case of MPI parallelism, we need to keep the intersection
683682 # of all domains across all ranks
684- comm = communication_system .communicators [- 1 ]
685- idomains = {dom .domain_id for dom in domains }
686- idomains = comm .comm .allreduce (set (idomains ), op = lambda a , b : a & b )
683+ if self .comm .size > 1 :
684+ idomains = {dom .domain_id for dom in domains }
685+ idomains = self .comm .comm .allreduce (
686+ set (idomains ), op = lambda a , b : a & b
687+ )
687688
688- # Keep domains that every rank has
689- domains = [dom for dom in domains if dom .domain_id in idomains ]
689+ # Keep domains that every rank has
690+ domains = [dom for dom in domains if dom .domain_id in idomains ]
690691
691692 subsets = [
692693 RAMSESDomainSubset (
You can’t perform that action at this time.
0 commit comments