From 7e7ed47ca1c92879931fbb78768909ecd5083242 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Fri, 19 Apr 2024 15:34:14 +0100 Subject: [PATCH] Ooops wrong comm --- pyop2/compilation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyop2/compilation.py b/pyop2/compilation.py index 0b9e16358..51791ca24 100644 --- a/pyop2/compilation.py +++ b/pyop2/compilation.py @@ -249,7 +249,7 @@ def sniff_compiler_version(self, cpp=False): # MPI ranks is expensive exe = self.cxx if cpp else self.cc version = None - if mpi.COMM_WORLD.rank == 0: + if self.comm.rank == 0: # `-dumpversion` is not sufficient to get the whole version string (for some compilers), # but other compilers do not implement `-dumpfullversion`! for dumpstring in ["-dumpfullversion", "-dumpversion"]: @@ -265,7 +265,7 @@ def sniff_compiler_version(self, cpp=False): break except (subprocess.CalledProcessError, UnicodeDecodeError, InvalidVersion): continue - self.version = mpi.COMM_WORLD.bcast(version, 0) + self.version = self.comm.bcast(version, 0) @property def bugfix_cflags(self):