From f80b56843f9d0de9bca534029f9dcbc1d80d923e Mon Sep 17 00:00:00 2001 From: Dongxu Yang Date: Sun, 12 Nov 2023 09:07:46 +0800 Subject: [PATCH] fix enable condition --- cpp/src/wholememory/memory_handle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/wholememory/memory_handle.cpp b/cpp/src/wholememory/memory_handle.cpp index 8d8633580..b16b30c90 100644 --- a/cpp/src/wholememory/memory_handle.cpp +++ b/cpp/src/wholememory/memory_handle.cpp @@ -1476,7 +1476,7 @@ wholememory_error_code_t create_wholememory(wholememory_handle_t* wholememory_ha whole_memory_handle->impl = new distributed_wholememory_impl( whole_memory_handle, total_size, comm, memory_type, memory_location, data_granularity); } else if (memory_type == WHOLEMEMORY_MT_CONTINUOUS) { - if (is_intranode_communicator(comm) && !SupportEGM()) { + if (is_intranode_communicator(comm) || !SupportEGM()) { if (memory_location == WHOLEMEMORY_ML_HOST) { whole_memory_handle->impl = new global_mapped_host_wholememory_impl( whole_memory_handle, total_size, comm, memory_type, memory_location, data_granularity);