Commit 34cd69de authored by Victor Yu's avatar Victor Yu

Update GitLab CI

* Intel MKL is currently needed for both CI jobs.
* MPI is currently not needed.
* Add Davidson as the first test.
parent d086308a
variables:
INSTALL_DIR: "/home/gitlab-runner/ci_tmp_rci"
### GNU compilers + OpenMPI + Netlib BLAS, LAPACK, ScaLAPACK ###
gnu:
script:
- module use /home/wy29/opt/modulefiles
- module purge
- module load gcc-7.1
- module load cmake-3.0.2
- module load openmpi-3.0.0
- module load gcc-7.1
- module load intel-mkl-2018.2
- cat ./toolchains/gnu.cmake
- rm -rf build $INSTALL_DIR/gnu
- mkdir build $INSTALL_DIR/gnu
- rm -rf build
- mkdir build
- cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/gnu.cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR/gnu ..
- make -j8
- make install
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/gnu.cmake ..
- make -j2
- ctest --output-on-failure
### Intel compilers + MPI + MKL ###
intel:
......@@ -23,12 +21,11 @@ intel:
- module load gcc-7.1
- module load cmake-3.0.2
- module load intel-compilers-18.0
- module load intel-mpi-2018.2
- module load intel-mkl-2018.2
- cat ./toolchains/intel.cmake
- rm -rf build $INSTALL_DIR/intel
- mkdir build $INSTALL_DIR/intel
- rm -rf build
- mkdir build
- cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/intel.cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR/intel ..
- make -j8
- make install
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/intel.cmake ..
- make -j2
- ctest --output-on-failure
......@@ -2,7 +2,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)
### Project ###
PROJECT(elsi_rci LANGUAGES Fortran)
PROJECT(elsi_rci VERSION 0.1.0 LANGUAGES Fortran)
### CMake modules ###
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
......
......@@ -16,3 +16,16 @@ ADD_EXECUTABLE(elsi_rci_test ${ftest_rci_src})
TARGET_LINK_LIBRARIES(elsi_rci_test PRIVATE elsi_rci)
TARGET_LINK_LIBRARIES(elsi_rci_test PRIVATE ${LIBS})
SET_TARGET_PROPERTIES(elsi_rci_test PROPERTIES LINKER_LANGUAGE Fortran)
SET(h_real "${PROJECT_SOURCE_DIR}/test/matrices/H_real.csc")
SET(s_real "${PROJECT_SOURCE_DIR}/test/matrices/S_real.csc")
MACRO(test_fortran arg1 arg2 arg3 arg4 arg5 arg6 arg7)
ADD_TEST(test_fortran_${arg1}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/elsi_rci_test
${arg2} ${arg3} ${arg4} ${arg5} ${arg6} ${arg7})
SET_TESTS_PROPERTIES(test_fortran_${arg1}
PROPERTIES PASS_REGULAR_EXPRESSION "Passed")
ENDMACRO()
test_fortran(01_davidson e 0 r 1 ${h_real} ${s_real})
### Generic GNU ###
SET(CMAKE_Fortran_COMPILER "mpif90" CACHE STRING "MPI Fortran compiler")
SET(CMAKE_Fortran_FLAGS "-O3 -mavx" CACHE STRING "Fortran flags")
SET(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "Fortran compiler")
SET(CMAKE_Fortran_FLAGS "-O3" CACHE STRING "Fortran flags")
SET(LIB_PATHS "/home/wy29/opt/lapack-3.8.0" CACHE STRING "External library paths")
SET(LIBS "liblapack.a;librefblas.a" CACHE STRING "External libraries")
SET(LIB_PATHS "$ENV{MKLROOT}/lib/intel64" CACHE STRING "External library paths")
SET(LIBS "mkl_intel_lp64 mkl_sequential mkl_core" CACHE STRING "External libraries")
### Generic Intel ###
SET(CMAKE_Fortran_COMPILER "ifort" CACHE STRING "MPI Fortran compiler")
SET(CMAKE_Fortran_COMPILER "ifort" CACHE STRING "Fortran compiler")
SET(CMAKE_Fortran_FLAGS "-g -heap-arrays -O3 -xAVX -fp-model precise" CACHE STRING "Fortran flags")
SET(LIB_PATHS "/opt/intel/mkl/lib/intel64" CACHE STRING "External library paths")
SET(LIB_PATHS "$ENV{MKLROOT}/lib/intel64" CACHE STRING "External library paths")
SET(LIBS "mkl_intel_lp64 mkl_sequential mkl_core" CACHE STRING "External libraries")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment