From e3b574d8d750a442a1f5ec8e08e7dd0e862c7c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=B0=E4=BE=AF?= Date: Wed, 16 Nov 2022 16:37:23 +0800 Subject: [PATCH 1/4] edit .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e0d1d4e65..a60cd35c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /build* *.pyc +.vscode/ +.idea/ From 9286c1cc519e1795a7cf660846fac54f5a862032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=B0=E4=BE=AF?= Date: Wed, 16 Nov 2022 16:42:28 +0800 Subject: [PATCH 2/4] make compatible with c++14 and add gatherv.h to HDRS --- CMakeLists.txt | 3 ++- gloo/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0db65e69..f1a698465 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ set(USE_RCCL_DEFAULT OFF) set(USE_LIBUV_DEFAULT OFF) set(USE_TCP_OPENSSL_LINK_DEFAULT OFF) set(USE_TCP_OPENSSL_LOAD_DEFAULT OFF) +set(CMAKE_CXX_STANDARD 14) # Options option(USE_REDIS "Support using Redis for rendezvous" ${USE_REDIS_DEFAULT}) @@ -117,7 +118,7 @@ include_directories(${PROJECT_BINARY_DIR}) # Compiler flags if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC") endif() # Recurse into main project directory diff --git a/gloo/CMakeLists.txt b/gloo/CMakeLists.txt index d5e6a1a55..1092eef9d 100644 --- a/gloo/CMakeLists.txt +++ b/gloo/CMakeLists.txt @@ -43,6 +43,7 @@ list(APPEND GLOO_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/broadcast_one_to_all.h" "${CMAKE_CURRENT_SOURCE_DIR}/context.h" "${CMAKE_CURRENT_SOURCE_DIR}/gather.h" + "${CMAKE_CURRENT_SOURCE_DIR}/gatherv.h" "${CMAKE_CURRENT_SOURCE_DIR}/math.h" "${CMAKE_CURRENT_SOURCE_DIR}/pairwise_exchange.h" "${CMAKE_CURRENT_SOURCE_DIR}/reduce.h" From 4749d2604030d2f37ae8e639226ad581ed6be73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=B0=E4=BE=AF?= Date: Wed, 16 Nov 2022 20:06:26 +0800 Subject: [PATCH 3/4] bug fix --- gloo/gatherv.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gloo/gatherv.cc b/gloo/gatherv.cc index 64767e5c3..67e3ea225 100644 --- a/gloo/gatherv.cc +++ b/gloo/gatherv.cc @@ -104,9 +104,7 @@ void gatherv(GathervOptions& opts) { out->waitRecv(opts.timeout); } } else { - size_t sendLength = opts.elementSize * opts.elementsPerRank[context->rank]; - GLOO_ENFORCE_GE(in->size, sendLength); - in->send(opts.root, slot, 0, sendLength); + in->send(opts.root, slot, 0, in->size); in->waitSend(opts.timeout); } } From ffcacfadd04d4cb2f83f4142274be1e850c0a411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=B0=E4=BE=AF?= Date: Fri, 25 Nov 2022 14:41:10 +0800 Subject: [PATCH 4/4] reverse edit --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1a698465..b0db65e69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,6 @@ set(USE_RCCL_DEFAULT OFF) set(USE_LIBUV_DEFAULT OFF) set(USE_TCP_OPENSSL_LINK_DEFAULT OFF) set(USE_TCP_OPENSSL_LOAD_DEFAULT OFF) -set(CMAKE_CXX_STANDARD 14) # Options option(USE_REDIS "Support using Redis for rendezvous" ${USE_REDIS_DEFAULT}) @@ -118,7 +117,7 @@ include_directories(${PROJECT_BINARY_DIR}) # Compiler flags if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") endif() # Recurse into main project directory