Skip to content

Commit

Permalink
Merge branch 'adrien-cotte-setup-env' into v3.6rc: Setup env
Browse files Browse the repository at this point in the history
  • Loading branch information
marcjoos-cea committed May 3, 2022
2 parents 7ce8274 + 4cfc609 commit 28e3ccc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions share/wi4mpi/setup-env.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 28e3ccc

Please sign in to comment.