Skip to content

Commit 90ef250

Browse files
authored
[rabit] Drop support for MPI backend. (#9525)
- Add checks in cmake. - Remove mpi related code.
1 parent c3574d9 commit 90ef250

File tree

4 files changed

+21
-179
lines changed

4 files changed

+21
-179
lines changed

CMakeLists.txt

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ option(USE_OPENMP "Build with OpenMP support." ON)
4747
option(BUILD_STATIC_LIB "Build static library" OFF)
4848
option(BUILD_DEPRECATED_CLI "Build the deprecated command line interface" OFF)
4949
option(FORCE_SHARED_CRT "Build with dynamic CRT on Windows (/MD)" OFF)
50-
option(RABIT_BUILD_MPI "Build MPI" OFF)
5150
## Bindings
5251
option(JVM_BINDINGS "Build JVM bindings" OFF)
5352
option(R_LIB "Build shared library for R package" OFF)
@@ -106,12 +105,6 @@ if (R_LIB AND GOOGLE_TEST)
106105
message(WARNING "Some C++ unittests will fail with `R_LIB` enabled,
107106
as R package redirects some functions to R runtime implementation.")
108107
endif (R_LIB AND GOOGLE_TEST)
109-
if (USE_AVX)
110-
message(SEND_ERROR "The option 'USE_AVX' is deprecated as experimental AVX features have been removed from XGBoost.")
111-
endif (USE_AVX)
112-
if (PLUGIN_LZ4)
113-
message(SEND_ERROR "The option 'PLUGIN_LZ4' is removed from XGBoost.")
114-
endif (PLUGIN_LZ4)
115108
if (PLUGIN_RMM AND NOT (USE_CUDA))
116109
message(SEND_ERROR "`PLUGIN_RMM` must be enabled with `USE_CUDA` flag.")
117110
endif (PLUGIN_RMM AND NOT (USE_CUDA))
@@ -144,6 +137,26 @@ if (PLUGIN_FEDERATED)
144137
endif ()
145138
endif ()
146139

140+
#-- Removed options
141+
if (USE_AVX)
142+
message(SEND_ERROR "The option `USE_AVX` is deprecated as experimental AVX features have been removed from XGBoost.")
143+
endif (USE_AVX)
144+
if (PLUGIN_LZ4)
145+
message(SEND_ERROR "The option `PLUGIN_LZ4` is removed from XGBoost.")
146+
endif (PLUGIN_LZ4)
147+
if (RABIT_BUILD_MPI)
148+
message(SEND_ERROR "The option `RABIT_BUILD_MPI` has been removed from XGBoost.")
149+
endif (RABIT_BUILD_MPI)
150+
if (USE_S3)
151+
message(SEND_ERROR "The option `USE_S3` has been removed from XGBoost")
152+
endif (USE_S3)
153+
if (USE_AZURE)
154+
message(SEND_ERROR "The option `USE_AZURE` has been removed from XGBoost")
155+
endif (USE_AZURE)
156+
if (USE_HDFS)
157+
message(SEND_ERROR "The option `USE_HDFS` has been removed from XGBoost")
158+
endif (USE_HDFS)
159+
147160
#-- Sanitizer
148161
if (USE_SANITIZER)
149162
include(cmake/Sanitizer.cmake)
@@ -222,9 +235,6 @@ endif (MSVC)
222235

223236
# rabit
224237
add_subdirectory(rabit)
225-
if (RABIT_BUILD_MPI)
226-
find_package(MPI REQUIRED)
227-
endif (RABIT_BUILD_MPI)
228238

229239
# core xgboost
230240
add_subdirectory(${xgboost_SOURCE_DIR}/src)

cmake/Utils.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,6 @@ macro(xgboost_target_link_libraries target)
295295
target_link_libraries(${target} PRIVATE CUDA::nvToolsExt)
296296
endif (USE_NVTX)
297297

298-
if (RABIT_BUILD_MPI)
299-
target_link_libraries(${target} PRIVATE MPI::MPI_CXX)
300-
endif (RABIT_BUILD_MPI)
301-
302298
if (MINGW)
303299
target_link_libraries(${target} PRIVATE wsock32 ws2_32)
304300
endif (MINGW)

rabit/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ set(RABIT_SOURCES
66
${CMAKE_CURRENT_LIST_DIR}/src/allreduce_base.cc
77
${CMAKE_CURRENT_LIST_DIR}/src/rabit_c_api.cc)
88

9-
if (RABIT_BUILD_MPI)
10-
list(APPEND RABIT_SOURCES ${CMAKE_CURRENT_LIST_DIR}/src/engine_mpi.cc)
11-
elseif (RABIT_MOCK)
9+
if (RABIT_MOCK)
1210
list(APPEND RABIT_SOURCES ${CMAKE_CURRENT_LIST_DIR}/src/engine_mock.cc)
1311
else ()
1412
list(APPEND RABIT_SOURCES ${CMAKE_CURRENT_LIST_DIR}/src/engine.cc)

rabit/src/engine_mpi.cc

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)