diff --git a/CMakeLists.txt b/CMakeLists.txt index ce60e01..88cae25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,6 +132,9 @@ endif() #Setting wi4mpi.cfg CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/etc/wi4mpi.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/wi4mpi.cfg) +#Copy share +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/share DESTINATION .) + #Source subdirectory add_subdirectory(src) enable_testing () diff --git a/README.md b/README.md index 2c705dc..b3f0e0b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ Advanced options: The -F FROM option is optionnal. If not provided, the interface mode is choosen. ``` +``` +$ source share/wi4mpi/setup-env.sh +``` + ``` $ mpirun -np 4 -F openmpi -T intelmpi ./mpi_hello.exe You are using Wi4MPI-%version with the mode preload From OMPI To INTEL diff --git a/share/wi4mpi/setup-env.sh b/share/wi4mpi/setup-env.sh new file mode 100644 index 0000000..2bae36f --- /dev/null +++ b/share/wi4mpi/setup-env.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +export WI4MPI_ROOT=$(readlink -f ${SCRIPT_DIR}/../../) + +source ${WI4MPI_ROOT}/etc/wi4mpi.cfg +export WI4MPI_VERSION # obtained by wi4mpi.cfg + +export PATH=${WI4MPI_ROOT}/bin:$PATH