Commit d3a53cfc authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

new pipeline

parent 0ab6dd00
stages:
- build
- test
- benchmark
- experiments
- deploy
cache:
paths:
- build/mpp/LIB_PS
- build/mpp/googletest
- sprng5
variables:
OS: "ubuntu"
OS_VERSION: "18.04"
REGISTRY: "ci.cluster.math.kit.edu"
IMAGE_NAME_MLMC: "mlmc-${CI_COMMIT_SHORT_SHA}-${OS}${OS_VERSION}"
before_script:
- module add foss
- module add OpenMPI/3.1.1-GCC-7.3.0-2.30
- module add Anaconda3
- if [ -z "$(ls sprng5/)" ]; then
- tar xjf sprng5.tar.bz2
- cd sprng5
- ./configure --with-mpi=yes --with-fortran=no
- make -j20
- cd ..
- else
- echo "Using sprng5 from cache"
- fi
build-mlmc:
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- cd mpp
- git fetch --all
- git checkout $UPSTREAM_COMMIT
- cd ..
- mkdir -p build
- cd build
- cmake .. -DBUILD_MLMC_TESTS=OFF
- make -j20
artifacts:
paths:
- build/mpp/src
- build/mlmc/src
expire_in: '1d'
test-mlmc:
- sed s/REGISTRY/${REGISTRY}/g docker/mlmc.baseimage >
docker/mlmc_registry.baseimage
- sed s/UBUNTUVERSION/${OS_VERSION}/g docker/mlmc_registry.baseimage >
docker/${IMAGE_NAME_MLMC}.baseimage
- docker build
--build-arg UPSTREAM_COMMIT=${UPSTREAM_COMMIT}
--no-cache -t ${REGISTRY}/${IMAGE_NAME_MLMC}
-f docker/${IMAGE_NAME_MLMC}.baseimage .
dependencies: [ ]
tags: [ shell ]
unit-test-mlmc:
stage: test
variables:
GIT_STRATEGY: none
image: ${REGISTRY}/${IMAGE_NAME_MLMC}
script:
- cd build
- cmake .. -DBUILD_MLMC_TESTS=ON
- make -j20
- cd tests
- cd /mpp/build/tests
- mpirun -n 4 TestMainProgramElliptic
- mpirun -n 4 TestMainProgramTransport
- mpirun -n 4 TestMultilevelPlotter
# - mpirun -n 4 TestMainProgramTransport
# - mpirun -n 4 TestMultilevelPlotter
dependencies: [ "build-mlmc" ]
tags: [ docker ]
benchmark-elliptic-mlmc:
stage: benchmark
elliptic-exercises-mlmc:
stage: exercises
variables:
BENCHMARK: ''
GIT_STRATEGY: none
RUN_EXPERIMENTS: ''
image: ${REGISTRY}/${IMAGE_NAME_MLMC}
timeout: '1h'
only:
variables:
- $BENCHMARK == 'all'
- $BENCHMARK == 'elliptic'
variables: [ $RUN_EXPERIMENTS == 'all', $RUN_EXPERIMENTS == 'elliptic' ]
script:
- jupyter nbconvert --ExecutePreprocessor.timeout=600 --execute --to html notebooks/Elliptic\ Experiments.ipynb
- cd /mpp/notebooks
- ls -al
- jupyter nbconvert --ExecutePreprocessor.timeout=2400
--execute --to html Elliptic\ Experiments.ipynb
dependencies: [ "build-mlmc" ]
tags: [ docker ]
artifacts:
paths:
- notebooks/Elliptic\ Experiments.html
paths: [ notebooks/Elliptic\ Experiments.html ]
benchmark-transport-mlmc:
stage: benchmark
deploy-mlmc:
stage: deploy
variables:
BENCHMARK: ''
only:
variables:
- $BENCHMARK == 'all'
- $BENCHMARK == 'transport'
GIT_STRATEGY: none
script:
- jupyter nbconvert --ExecutePreprocessor.timeout=600 --execute --to html notebooks/Transport\ Experiments.ipynb
artifacts:
paths:
- notebooks/Transport\ Experiments.html
\ No newline at end of file
- docker tag ${REGISTRY}/${IMAGE_NAME_MLMC}
${REGISTRY}/mlmc-${CI_COMMIT_TAG}-${OS}${OS_VERSION}
- docker push ${REGISTRY}/mlmc-${CI_COMMIT_TAG}-${OS}${OS_VERSION}
only: [ tags ]
dependencies: [ "unit-test-mlmc" ]
tags: [ shell ]
clean-mlmc:
stage: .post
when: always
allow_failure: true
variables:
GIT_STRATEGY: none
script:
- docker rmi ${REGISTRY}/${IMAGE_NAME_MLMC}
dependencies: [ "build-mlmc" ]
tags: [ shell ]
FROM REGISTRY/mpp_dev_ubuntu:UBUNTUVERSION
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ARG USER=mpi
ARG UPSTREAM_COMMIT=""
ENV USER ${USER}
ARG WORKDIR=/mpp
ENV WORKDIR ${WORKDIR}
WORKDIR ${WORKDIR}
USER ${USER}
COPY --chown=${USER}:${USER} . ${WORKDIR}
RUN cd mpp && \
tar xjf sprng5.tar.bz2 && \ # Todo: rmv or cache
cd sprng5 && \ # Todo: rmv or cache
./configure --with-mpi=yes --with-fortran=no && \ # Todo: rmv or cache
make -j20 && \ # Todo: rmv or cache
cd .. && \ # Todo: rmv or cache
git fetch --all && \
git checkout $UPSTREAM_COMMIT && \
cd .. && \
mkdir -p build && \
cd build && \
cmake .. && \
make -j
# Default to a login shell
CMD ["bash", "-l"]
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