From c036e66a68e3f7c4f1a6ef4ab27d8d91507ed73b Mon Sep 17 00:00:00 2001 From: Yao Lu Date: Thu, 4 Aug 2022 14:31:44 +0800 Subject: [PATCH] fix splitcomm --- Project.toml | 2 +- src/mpi.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index ba66ea8..bfa2556 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GCMAES" uuid = "4aa9d100-eb0f-11e8-15f1-25748831eb3b" authors = ["Yao Lu "] -version = "0.1.28" +version = "0.1.29" [deps] BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0" diff --git a/src/mpi.jl b/src/mpi.jl index 870fef3..4770066 100644 --- a/src/mpi.jl +++ b/src/mpi.jl @@ -113,7 +113,7 @@ end function splitcomm(comm, n) wsize, rank = worldsize(comm), myrank(comm) - if wsize > n + if wsize >= n glbl = MPI.Comm_split(comm, rank % n, rank) lcl = MPI.Comm_split(comm, rank รท n, rank) else