Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Open MPI dependency #24

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,31 +124,6 @@ endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcommon")

find_package(MPI REQUIRED)
if(MPI_C_FOUND AND MPI_Fortran_FOUND) #Need to be OpenMPI
if(NOT DEFINED OPENMPI_ROOT)
execute_process(COMMAND "${MPI_C_COMPILER}" --showme:version
OUTPUT_VARIABLE ERR_VAR1
OUTPUT_FILE "compiler_version"
ERROR_QUIET)
execute_process(COMMAND "grep" -i "Open MPI"
INPUT_FILE "compiler_version"
OUTPUT_VARIABLE ERR_VAR2
RESULT_VARIABLE COMMAND_RESULT1
ERROR_QUIET)
message(STATUS "res command : ${ERR_VAR2}")
if(NOT ERR_VAR2)
message(FATAL_ERROR "Be sure to have an OpenMPI librarie in your PATH or set -DOPENMPI_ROOT=...")
endif()
foreach(p ${MPI_C_INCLUDE_PATH})
get_filename_component(OPENMPI_ROOT_TEST ${p} DIRECTORY)
if(EXISTS "${OPENMPI_ROOT_TEST}/lib")
set(OPENMPI_ROOT ${OPENMPI_ROOT_TEST})
endif ()
endforeach(p)
endif()
endif()

find_package(Threads)
if(NOT CMAKE_THREAD_LIBS_INIT)
message(FATAL_ERROR "Be sure to have Pthread available on you system")
Expand All @@ -157,7 +132,6 @@ endif()
#Setting wi4mpi.cfg
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/etc/wi4mpi.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/wi4mpi.cfg)


#Source subdirectory
add_subdirectory(src)
enable_testing ()
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Interface :
### Prerequisites

* C and Fortran compiler
* [OpenMPI](https://www.open-mpi.org/)

WI4MPI has been tested on GNU/Linux only

Expand Down
6 changes: 6 additions & 0 deletions Testing/etc/mpivars.sh.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# For now, testing requires cmake -DOPENMPI_ROOT=/path/to/ompi/
if [[ ! -n "@OPENMPI_ROOT@" ]]; then
echo "Error: tests require 'cmake -DOPENMPI_ROOT=/path/to/ompi/' option!"
exit 1
fi

# Batch scheduler configuration to running tests
export WI4MPI_MPRUN=@WI4MPI_MPRUN@
export WI4MPI_PARTITION=@WI4MPI_PARTITION@
Expand Down
16 changes: 11 additions & 5 deletions docs/Users_guide
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,17 @@ WI4MPI specific variables
Possible options: INTEL(default), GNU, PGI, LLVM, ARMCLANG, FUJITSU

- OPENMPI_ROOT
If CMAKE is not able to find OPENMPI_ROOT, one must add -DOPENMPI_ROOT=/path/to/openmpi option.
```
CMake Error at CMakeLists.txt:xxx (message):
Be sure to have an OpenMPI librarie in your PATH or set -DOPENMPI_ROOT=...
```
Open MPI root dir, put in wi4mpi.cfg, could be added manually, optionnal value.
This variable is required for Testing, one must add -DOPENMPI_ROOT=/path/to/openmpi option.

- INTELMPI_ROOT
Intel MPI root dir, put in wi4mpi.cfg, could be added manually, optionnal value.

- MPC_ROOT
MPC root dir, put in wi4mpi.cfg, could be added manually, optionnal value.

- MPICH_ROOT
MPICH root dir, put in wi4mpi.cfg, could be added manually, optionnal value.

- WI4MPI_REALEASE

Expand Down
8 changes: 4 additions & 4 deletions etc/wi4mpi.cfg.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#This part is handled by cmake
WI4MPI_VERSION="@WI4MPI_VERSION@"
OPENMPI_DEFAULT_ROOT="@OPENMPI_ROOT@"
#Please provide the following variables to use the launcher
INTELMPI_DEFAULT_ROOT=""
MPC_DEFAULT_ROOT=""
MPICH_DEFAULT_ROOT=""
OPENMPI_DEFAULT_ROOT="@OPENMPI_ROOT@"
INTELMPI_DEFAULT_ROOT="@INTELMPI_ROOT@"
MPC_DEFAULT_ROOT="@MPC_ROOT@"
MPICH_DEFAULT_ROOT="@MPICH_ROOT@"