diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3de2bb9225a9d4101fd8a4923765f356989a4706..1947eec9dac91e325c60c25db4bfc74c3e87a4ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: build-intel: stage: build script: - - module load intel impi mkl cmake anaconda/3/2019.03 + - module load intel impi mkl cmake anaconda/3/2019.03 mpi4py - mkdir build_intel/ - cd build_intel/ - python -m venv sisso @@ -17,13 +17,15 @@ build-intel: - cmake -C ../cmake/toolchains/intel_py.cmake ../ - make - make install + - cd ../ + - pytest tests tags: - docker build-gnu: stage: build script: - - module load gcc impi mkl cmake anaconda/3/2019.03 + - module load gcc impi mkl cmake anaconda/3/2019.03 mpi4py - mkdir build_gcc/ - cd build_gcc/ - python -m venv sisso @@ -33,5 +35,7 @@ build-gnu: - cmake -C ../cmake/toolchains/gnu_py.cmake ../ - make - make install + - cd ../ + - pytest tests tags: - docker diff --git a/CMakeLists.txt b/CMakeLists.txt index fd76c559dfd473ed0ecc4f7f7db6c2547ac6bc46..8927881880812b34005277509749f650ede710b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,9 +280,12 @@ get_filename_component(LAPACK_DIR ${LAPACK_LIBRARY} DIRECTORY) find_package(MPI REQUIRED) include_directories(${MPI_CXX_INCLUDE_DIRS}) set(MPI_LIBRARIES, ${MPI_CXX_LIBRARIES}) +list(GET MPI_CXX_LIBRARIES 0 MPI_LIBRARY) +get_filename_component(MPI_DIR ${MPI_LIBRARY} DIRECTORY) + # Set CMAKE_INSTALL_RPATH -set(CMAKE_INSTALL_RPATH ${Boost_LIBARY_DIRS};${LAPACK_DIR}) +set(CMAKE_INSTALL_RPATH ${Boost_LIBARY_DIRS};${LAPACK_DIR};${PYTHON_LIBDIR};${MPI_DIR}) include_directories(${CMAKE_CURRENT_LIST_DIR}/src) add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src)