only allow openmpi (#1209)

This commit is contained in:
Awni Hannun 2024-06-13 12:14:44 -07:00 committed by GitHub
parent f20e97b092
commit e84ba8056d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -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)

View File

@ -1,7 +1,7 @@
FetchContent_Declare(
doctest
GIT_REPOSITORY "https://github.com/onqtam/doctest"
GIT_TAG "b7c21ec5ceeadb4951b00396fc1e4642dd347e5f"
GIT_TAG "ae7a13539fb71f270b87eb2e874fbac80bc8dda2"
)
FetchContent_MakeAvailable(doctest)