From e84ba8056d97ff8dca853f46390899144207c3cd Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Thu, 13 Jun 2024 12:14:44 -0700 Subject: [PATCH] only allow openmpi (#1209) --- CMakeLists.txt | 12 ++++++++++++ tests/CMakeLists.txt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5892b4333..0a3a8b6d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,19 @@ endif() find_package(MPI) if (MPI_FOUND) + execute_process( + COMMAND zsh "-c" "mpirun --version" + OUTPUT_VARIABLE MPI_VERSION + COMMAND_ERROR_IS_FATAL ANY + ) + if (${MPI_VERSION} MATCHES ".*Open MPI.*") target_include_directories(mlx PRIVATE ${MPI_INCLUDE_PATH}) + else() + message( + WARNING + "MPI which is not OpenMPI found. Building without MPI." + ) + endif() endif() add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/mlx) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 34b69f233..9ba77474b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ FetchContent_Declare( doctest GIT_REPOSITORY "https://github.com/onqtam/doctest" - GIT_TAG "b7c21ec5ceeadb4951b00396fc1e4642dd347e5f" + GIT_TAG "ae7a13539fb71f270b87eb2e874fbac80bc8dda2" ) FetchContent_MakeAvailable(doctest)