From 8e159bd5c7bfba0887b2c30b27eaf203a5911c5d Mon Sep 17 00:00:00 2001 From: Theodore Kisner Date: Wed, 13 Mar 2024 22:12:41 -0700 Subject: [PATCH] Fix typo --- pshmem/test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pshmem/test.py b/pshmem/test.py index 1f278b6..1797376 100644 --- a/pshmem/test.py +++ b/pshmem/test.py @@ -467,6 +467,10 @@ def test_lock(self): def run(): + comm = None + if MPI is not None: + comm = MPI.COMM_WORLD + suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(LockTest)) suite.addTest(unittest.makeSuite(ShmemTest)) @@ -477,8 +481,8 @@ def run(): if not _ret.wasSuccessful(): ret += 1 - if self.comm is not None: - ret = self.comm.allreduce(ret, op=MPI.SUM) + if comm is not None: + ret = comm.allreduce(ret, op=MPI.SUM) if ret > 0: print(f"{ret} Processes had failures")