Merge branch 'metis_pic' into 'master'

always build metis with position independent code

See merge request jschoeberl/netgen!151
This commit is contained in:
Matthias Hochsteger 2019-04-17 15:40:17 +00:00
commit cf5fe41425
4 changed files with 35 additions and 0 deletions

View File

@ -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
############################################

View File

@ -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
)

6
tests/build_mpi.sh Normal file
View File

@ -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

5
tests/dockerfile_mpi Normal file
View File

@ -0,0 +1,5 @@
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
MAINTAINER Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>
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