diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f73b5ad321c2ee8a762613053e0e6c0a09d77f33..e01e26e32b69683fa226bb64ddc2b5e840a9fa28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ --- stages: + - docker - pre - build - test @@ -7,20 +8,10 @@ stages: - analyze - deploy -# git config --global ahev been added to get around the issue related in -# https://github.com/actions/checkout/issues/760 for github -# Does not seem to be fixed for gitlab-runner yet -before_script: - - git config --global --add safe.directory $CI_PROJECT_DIR - - git config --global --add safe.directory $CI_PROJECT_DIR/cmake_modules/morse_cmake - - git config --global --add safe.directory $CI_PROJECT_DIR/coreblas/hmat-oss - - git config --global --add safe.directory $CI_PROJECT_DIR/hqr - - git config --global --add safe.directory $CI_PROJECT_DIR/testing/test_fembem - - git submodule update --init --recursive - include: - - .gitlab/preliminary.yml - .gitlab/common.yml + - .gitlab/preliminary.yml + - .gitlab/docker.yml - .gitlab/build.yml - .gitlab/test_starpu.yml - .gitlab/test_starpu_simgrid.yml diff --git a/.gitlab/Dockerfile b/.gitlab/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..1cf0f9e9f9911c9290914a5aa8a92835a1321f2c --- /dev/null +++ b/.gitlab/Dockerfile @@ -0,0 +1,83 @@ +# +# @file Dockerfile +# +# @copyright 2024-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, +# Univ. Bordeaux. All rights reserved. +# +# @version 1.3.0 +# @author Florent Pruvost +# @date 2024-11-22 +# +# This docker image is used to test the package during gitlab-ci pipelines. +# It should be stored in the gitlab's project container registry: +# https://gitlab.inria.fr/solverstack/chameleon/container_registry +# +FROM registry.gitlab.inria.fr/solverstack/docker/analysis + +USER root + +# Chameleon dependencies: cpu kernels +RUN apt-get -y upgrade --no-install-recommends \ + libblas-dev \ + liblapack-dev \ + liblapacke-dev +RUN update-alternatives --set libblas.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/blas/libblas.so +RUN update-alternatives --set libblas.so.3-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 +RUN update-alternatives --set liblapack.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/lapack/liblapack.so +RUN update-alternatives --set liblapack.so.3-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 + +# Starpu dependencies +RUN apt-get -y upgrade --no-install-recommends \ + autoconf \ + automake \ + libtool-bin \ + libfxt-dev \ + libhwloc-dev \ + libopenmpi-dev \ + libsimgrid-dev + +RUN apt-get autoremove -y +RUN apt-get autoclean -y +RUN apt-get purge -y + +RUN update-ca-certificates + +# Install PARSEC +RUN git clone https://bitbucket.org/mfaverge/parsec.git && \ + cd parsec && \ + git checkout mymaster && \ + git checkout 6022a61dc96c25f11dd2aeabff2a5b3d7bce867d && \ + git submodule update && \ + cmake -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DPARSEC_GPU_WITH_CUDA=OFF -DPARSEC_DIST_WITH_MPI=OFF && \ + cmake --build build -j5 && \ + cmake --install build && \ + cd .. && \ + rm parsec/ -rf + +# Install QUARK +RUN git clone https://github.com/ecrc/quark && \ + cd quark/ && \ + git checkout db4aef9a66a00487d849cf8591927dcebe18ef2f && \ + sed -i -e "s#prefix=.*#prefix=/usr#g" make.inc && \ + sed -i -e "s#CFLAGS=.*#CFLAGS= -g -O2 -DADD_ -fPIC#g" make.inc && \ + make && \ + make install && \ + cd .. && \ + rm quark/ -rf + +# Install StarPU +RUN wget https://files.inria.fr/starpu/starpu-1.4.7/starpu-1.4.7.tar.gz > /dev/null 2>&1 && \ + tar xzf starpu-1.4.7.tar.gz && \ + cd starpu-1.4.7/ && \ + ./configure --prefix=/home/gitlab/install/starpu --enable-debug --disable-build-doc --with-fxt --disable-simgrid && \ + make -j5 install + +# Install StarPU with Simgrid +RUN cd starpu-1.4.7/ && \ + ./configure --prefix=/home/gitlab/install/starpu-simgrid --enable-debug --disable-build-doc --with-fxt --enable-simgrid && \ + make -j5 install && \ + cd ../ && \ + rm starpu-1.4.7/ -rf && \ + rm starpu-1.4.7.tar.gz + +USER gitlab diff --git a/.gitlab/common.yml b/.gitlab/common.yml index fd00a2649d9cf269fc7870f27ac79dc5c848e235..9e679f1c4e1b4eabe97865e7d1ff3a9fbaa57244 100644 --- a/.gitlab/common.yml +++ b/.gitlab/common.yml @@ -3,13 +3,16 @@ # --- default: - image: registry.gitlab.inria.fr/solverstack/docker/distrib - tags: ['ci.inria.fr', 'linux', 'large'] + image: $CI_REGISTRY_IMAGE + tags: ['ci.inria.fr', 'linux', 'large'] # gitlab instance runner (i.e. docker on linux) + interruptible: true + +variables: + GIT_SUBMODULE_STRATEGY: recursive # push event: executed only if the source branch name is master or starts with ci- # schedule event: not executed .only-master: - interruptible: true rules: - if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /^ci-.*$/) && $CI_PIPELINE_SOURCE != "schedule" @@ -17,14 +20,12 @@ default: # merge request event: executed if the source branch name does not start with notest- # schedule event: not executed .only-master-mr: - interruptible: true rules: - if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /^ci-.*$/) && $CI_PIPELINE_SOURCE != "schedule" - if: ($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/) # merge request event: executed if the source branch name does not start with notest- .only-mr: - interruptible: true rules: - if: ($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/) @@ -34,7 +35,7 @@ default: - bash .gitlab/test.sh | tee ${LOGNAME}.log artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - expire_in: 180 minutes + expire_in: 1 week untracked: true reports: junit: ${LOGNAME}-junit.xml diff --git a/.gitlab/coverage.yml b/.gitlab/coverage.yml index 5f9db28dde0f2fdeb490c172ded7229b175c451e..cbe0a2aca08937a32668022ecbeadb170354d3aa 100644 --- a/.gitlab/coverage.yml +++ b/.gitlab/coverage.yml @@ -12,7 +12,7 @@ coverage: /^\s*lines......:\s*\d+.\d+\%/ artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - expire_in: 180 minutes + expire_in: 1 week paths: - chameleon-*.lcov - chameleon.lcov @@ -32,7 +32,6 @@ coverage_master: coverage_mr: extends: .coverage - interruptible: true rules: - if: ($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/) needs: [test_openmp_mr,test_parsec_mr,test_quark_mr,test_starpu_mr,test_starpu_simgrid_simu_all] diff --git a/.gitlab/docker.yml b/.gitlab/docker.yml new file mode 100644 index 0000000000000000000000000000000000000000..c47d8fc25713261922209b573a09daba1649a316 --- /dev/null +++ b/.gitlab/docker.yml @@ -0,0 +1,10 @@ +--- +docker: + stage: docker + image: docker + when: manual + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + script: + - docker build -f .gitlab/Dockerfile -t $CI_REGISTRY_IMAGE $PWD + - docker push $CI_REGISTRY_IMAGE diff --git a/.gitlab/preliminary.yml b/.gitlab/preliminary.yml index 5377e9ea1dcf1a3469f10b60a6d31f1283b983ef..8d6a909755522eaaac4ed8dfa1b0d98e57fd1591 100644 --- a/.gitlab/preliminary.yml +++ b/.gitlab/preliminary.yml @@ -4,7 +4,6 @@ --- preliminary_checks: stage: pre - interruptible: true rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" parallel: diff --git a/.gitlab/sonarqube.yml b/.gitlab/sonarqube.yml index 88ef0b06883dd2df45b59b068a19b3a942f3e50f..e9d4d1ab108d5a261ad3645012cb904d9798a9b6 100644 --- a/.gitlab/sonarqube.yml +++ b/.gitlab/sonarqube.yml @@ -1,7 +1,6 @@ --- .sonarqube: stage: analyze - tags: ["docker", "large"] variables: GIT_DEPTH: "0" VERSION: sonarqube @@ -14,7 +13,7 @@ - ./tools/analysis.sh artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - expire_in: 180 minutes + expire_in: 1 week when: always paths: - filelist.txt @@ -31,7 +30,6 @@ sonarqube_master: sonarqube_mr: extends: .sonarqube - interruptible: true rules: - if: ($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/) when: manual diff --git a/.gitlab/test_openmp.yml b/.gitlab/test_openmp.yml index cfbb14f3cde0d5a7dffd93417df7b709ca8abaa9..923e7ebb378818a00a6fdf7f4ca1fdde61560db1 100644 --- a/.gitlab/test_openmp.yml +++ b/.gitlab/test_openmp.yml @@ -2,7 +2,6 @@ .test_openmp: extends: .test_script_linux needs: [build_openmp] - interruptible: true variables: SYSTEM: linux VERSION: openmp diff --git a/.gitlab/test_parsec.yml b/.gitlab/test_parsec.yml index 52764d27b18f585eae8584a4a39da80b864b5042..b131e8b6924e3fcf92c71d5275fd907c233df255 100644 --- a/.gitlab/test_parsec.yml +++ b/.gitlab/test_parsec.yml @@ -2,7 +2,6 @@ .test_parsec: extends: .test_script_linux needs: [build_parsec] - interruptible: true variables: SYSTEM: linux VERSION: parsec diff --git a/.gitlab/test_quark.yml b/.gitlab/test_quark.yml index d1ede5b5853e264d0afea65ae4a50ed76c7d743e..0bd998d9b9850dbe80fea058d16a731cd5ccd7b3 100644 --- a/.gitlab/test_quark.yml +++ b/.gitlab/test_quark.yml @@ -2,7 +2,6 @@ .test_quark: extends: .test_script_linux needs: [build_quark] - interruptible: true variables: SYSTEM: linux VERSION: quark diff --git a/.gitlab/test_starpu.yml b/.gitlab/test_starpu.yml index bbb562a6389c95c409c7e50ece69d63d57548679..efc3bd783aa0b64355500d6bb8a5fa4b233f5e59 100644 --- a/.gitlab/test_starpu.yml +++ b/.gitlab/test_starpu.yml @@ -2,7 +2,6 @@ .test_starpu: extends: .test_script_linux needs: [build_starpu] - interruptible: true variables: SYSTEM: linux VERSION: starpu @@ -43,7 +42,7 @@ test_starpu_macosx: - bash .gitlab/test.sh | tee ${LOGNAME}.log artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - expire_in: 180 minutes + expire_in: 1 week paths: - ${LOGNAME}.log reports: @@ -69,7 +68,7 @@ test_starpu_macosx: - bash -lc .gitlab/test.sh | tee "$env:LOGNAME.log" artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - expire_in: 180 minutes + expire_in: 1 week paths: - ${LOGNAME}.log reports: diff --git a/tools/analysis.sh b/tools/analysis.sh index 999f6a0d340f160e9cbd060329bee144014d9d6e..a656a4c9706262ae5cedf74810c2b2cc2020bb99 100755 --- a/tools/analysis.sh +++ b/tools/analysis.sh @@ -68,6 +68,7 @@ sonar.scm.exclusions.disabled=true sonar.sources=build-openmp/runtime/openmp, build-parsec/runtime/parsec, build-quark/runtime/quark, build-starpu, compute, control, coreblas, example, include, runtime, testing sonar.inclusions=`cat filelist.txt | sed ':a;N;$!ba;s/\n/, /g'` +sonar.coverage.exclusions=build-starpu/gpucublas/**/*,build-starpu/gpuhipblas/**/* sonar.sourceEncoding=UTF-8 sonar.cxx.file.suffixes=.h,.c sonar.cxx.errorRecoveryEnabled=true