some fixes (#1281)

This commit is contained in:
Awni Hannun
2024-07-23 11:49:05 -07:00
committed by GitHub
parent 6768c6a54a
commit e2aa6ec8ae
4 changed files with 14 additions and 5 deletions

View File

@@ -169,11 +169,18 @@ if (MPI_FOUND)
execute_process(
COMMAND zsh "-c" "mpirun --version"
OUTPUT_VARIABLE MPI_VERSION
COMMAND_ERROR_IS_FATAL ANY
ERROR_QUIET
)
if (${MPI_VERSION} MATCHES ".*Open MPI.*")
target_include_directories(mlx PRIVATE ${MPI_INCLUDE_PATH})
elseif (MPI_VERSION STREQUAL "")
set(MPI_FOUND FALSE)
message(
WARNING
"MPI found but mpirun is not available. Building without MPI."
)
else()
set(MPI_FOUND FALSE)
message(
WARNING
"MPI which is not OpenMPI found. Building without MPI."