From d26b61dfbd78816e79df119075e7214ff050227c Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Sat, 4 May 2024 22:34:36 -0500 Subject: [PATCH] updated merge --- libs/core/openshmem_base/src/openshmem_environment.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/core/openshmem_base/src/openshmem_environment.cpp b/libs/core/openshmem_base/src/openshmem_environment.cpp index 273b9757220..fadfaeb429c 100644 --- a/libs/core/openshmem_base/src/openshmem_environment.cpp +++ b/libs/core/openshmem_base/src/openshmem_environment.cpp @@ -163,6 +163,11 @@ namespace hpx::util { // page_count = num_localities * number of threads // const std::size_t page_count = size(); + if(page_count < 1) { + HPX_THROW_EXCEPTION(error::invalid_status, + "hpx::util::openshmem_environment::init", + "OPENSHMEM not ready error"); + } // symmetric allocation for number of pages total + number of signals // @@ -420,7 +425,7 @@ namespace hpx::util { int openshmem_environment::size() { - int res(-1); + int res(0); if (enabled()) { scoped_lock l; res = static_cast(shmem_n_pes());