diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b192568..0b6fbd36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -87,6 +87,16 @@ build_ubuntu: - docker commit `cat netgen_${CI_BUILD_REF_NAME}_${UBUNTU_VERSION}.id` netgen_${CI_BUILD_REF_NAME}_installed:${UBUNTU_VERSION} - rm netgen_${CI_BUILD_REF_NAME}_${UBUNTU_VERSION}.id +build_ubuntu_mpi: + <<: *ubuntu + stage: build + script: + - docker build -t netgen_mpi_${CI_BUILD_REF_NAME}:${UBUNTU_VERSION} -f tests/dockerfile_mpi . + - rm -f netgen_mpi_${CI_BUILD_REF_NAME}_$UBUNTU_VERSION.id_mpi + - docker run --cidfile netgen_mpi_${CI_BUILD_REF_NAME}_${UBUNTU_VERSION}.id -e CCACHE_DIR=/ccache -v /mnt/ccache:/ccache netgen_mpi_${CI_BUILD_REF_NAME}:${UBUNTU_VERSION} bash /root/src/netgen/tests/build_mpi.sh + - docker commit `cat netgen_mpi_${CI_BUILD_REF_NAME}_${UBUNTU_VERSION}.id` netgen_mpi_${CI_BUILD_REF_NAME}_installed:${UBUNTU_VERSION} + - rm netgen_mpi_${CI_BUILD_REF_NAME}_${UBUNTU_VERSION}.id + test_ubuntu: <<: *ubuntu stage: test @@ -98,6 +108,17 @@ test_ubuntu: netgen_${CI_BUILD_REF_NAME}_installed:${UBUNTU_VERSION} bash -c 'cd /root/build/netgen && make test_netgen ARGS="-V"' +test_ubuntu_mpi: + <<: *ubuntu + stage: test + script: + - >- + docker run + -e NETGENDIR=/opt/netgen/bin + -e PYTHONPATH=/opt/netgen/lib/python3/dist-packages + netgen_mpi_${CI_BUILD_REF_NAME}_installed:${UBUNTU_VERSION} + bash -c 'cd /root/build/netgen && make test_netgen ARGS="-V"' + # cpp guideline checks test_guidelines: <<: *ubuntu @@ -125,6 +146,7 @@ cleanup_ubuntu: when: always allow_failure: true + ############################################ # MacOSX ############################################ diff --git a/cmake/external_projects/metis.cmake b/cmake/external_projects/metis.cmake index 0e5f4711..0ca86058 100644 --- a/cmake/external_projects/metis.cmake +++ b/cmake/external_projects/metis.cmake @@ -9,6 +9,8 @@ ExternalProject_Add(project_metis CMAKE_ARGS -DGKLIB_PATH=${METIS_SRC_DIR}/GKlib -DCMAKE_INSTALL_PREFIX=${METIS_DIR} + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} UPDATE_COMMAND "" # Disable update BUILD_IN_SOURCE 1 ) diff --git a/tests/build_mpi.sh b/tests/build_mpi.sh new file mode 100644 index 00000000..464bb395 --- /dev/null +++ b/tests/build_mpi.sh @@ -0,0 +1,6 @@ +cd +mkdir -p build/netgen +cd build/netgen +cmake ../../src/netgen -DUSE_CCACHE=ON -DUSE_MPI=ON +make -j12 +make install diff --git a/tests/dockerfile_mpi b/tests/dockerfile_mpi new file mode 100644 index 00000000..ddb7e51b --- /dev/null +++ b/tests/dockerfile_mpi @@ -0,0 +1,5 @@ +FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive +MAINTAINER Matthias Hochsteger +RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk clang-tidy python3-distutils clang libopenmpi-dev openmpi-bin gfortran +ADD . /root/src/netgen