1# 2# stage-1 take only a few minutes; they do not run the full test suite or external packages. 3# 4# stage-2 runs on MCS systems and may take 10 to 15 minutes. They run the full test suite but with limited mixture of external packages 5# 6# stage-3 runs on MCS systems and may take an hour or more. They run the full test suite and heavily test external packages, utilize valgrind etc 7# 8# The stage-(n) tests are only started if all of the stage-(n-1) tests run without error 9# You can limit the testing by using the variable STAGE with value 1 or 2 10# 11 12stages: 13 - stage-1 14 - stage-2 15 - stage-3 16 - stage-4 17variables: 18 GIT_STRATEGY: fetch 19 GIT_CLEAN_FLAGS: -ffdxq 20 TIMEOUT: 450 21 22# 23# The most basic template that most tests will expand upon 24# 25 26.test-basic: 27 interruptible: true 28 only: 29 refs: 30# Set with CI/CD Shedules - New Schedule 31 - schedules 32 - api 33# Set with CI/CD Pipelines - Run Pipeline 34 - web 35 - merge_requests 36 dependencies: [] 37 38.test: 39 extends: .test-basic 40 except: 41 variables: 42 # Skip if the docs-only label is attached to a merge request 43 - $CI_MERGE_REQUEST_LABELS =~ /(^|,)docs-only($|,)/ 44 - $PETSC_CI_SCHEDULED =~ /yes/ 45 46check-ci-settings: 47 extends: .test-basic 48 stage: .pre 49 tags: 50 - gce-stage1 51 script: 52 - lib/petsc/bin/maint/check-ci-settings.sh 53 54# 55# This provides the basic order of operations and options template for cloud based stage 1 tests. 56# Not all test-short need to follow this template but most will. 57# 58 59.stage-1: 60 extends: .test 61 stage: stage-1 62 tags: 63 - gce-u22-stage1 64 before_script: 65 - date 66 - hostname 67 - grep PRETTY_NAME /etc/os-release 68 - nproc 69 - lscpu 70 - ccache --zero-stats 71 script: 72 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 73 - if [ ! -z ${INIT_SCRIPT+x} ]; then echo "sourcing ${INIT_SCRIPT}"; if [ -f ${HOME}/${INIT_SCRIPT} ]; then source ${HOME}/${INIT_SCRIPT}; else source ${INIT_SCRIPT}; fi; fi 74 - printf "PATH:$PATH\n" 75 - printf "PYTHONPATH:$PYTHONPATH\n" 76 - printf "CONFIG_OPTS:${CONFIG_OPTS}\n" 77 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 78 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 79 - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O3 -march=native' CXXOPTFLAGS='-O3 -march=native' FOPTFLAGS='-O3 -march=native' ${CONFIG_OPTS} 80 - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" 81 - if [ ! -z ${ENABLE_CHECK+x} ]; then make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check; fi 82 - make CFLAGS="${MAKE_TEST_CFLAGS}" CXXFLAGS="${MAKE_TEST_CXXFLAGS}" FFLAGS="${MAKE_TEST_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" allgtests-tap gmakesearch="${TEST_SEARCH}" TIMEOUT=${TIMEOUT} 83 variables: 84 PYTHON: python3 85 MAKE_CFLAGS: -Werror 86 MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant 87 MAKE_FFLAGS: -Werror 88 MAKE_TEST_CFLAGS: -Werror 89 MAKE_TEST_CXXFLAGS: -Werror 90 MAKE_TEST_FFLAGS: -Werror 91 after_script: 92 - date 93 - ccache --show-stats 94 artifacts: 95 reports: 96 junit: arch-*/tests/testresults.xml 97 name: "$CI_JOB_NAME" 98 when: always 99 paths: 100 - arch-*/lib/petsc/conf/*.log 101 - arch-*/lib/pkgconfig/petsc.pc 102 - arch-*/tests/testresults.xml 103 - arch-*/tests/test_*_tap.log 104 - arch-*/tests/test_*_err.log 105 expire_in: 4 days 106 107# 108# The following tests run on the cloud as part of stage-1. 109# 110 111ompi-cuda: 112 extends: .stage-1 113 tags: 114 - cuda-stage1 115 variables: 116 CONFIG_OPTS: --with-mpi-dir=/nfs/gce/software/custom/linux-ubuntu22.04-x86_64/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.3.0/openmpi-4.1.3-qrpnszy --with-cuda=1 --with-cuda-arch=all-major --CUDAPPFLAGS=-Wno-deprecated-gpu-targets --with-fc=0 117 TEST_SEARCH: snes_tutorials-ex19_cuda% 118 ENABLE_CHECK: 1 119 MAKE_CXXFLAGS: -Werror 120 MAKE_CUDAFLAGS: -Xcompiler -Wall -Xcompiler -Werror 121 122mpich-cxx-py3: 123 extends: .stage-1 124 variables: 125 CONFIG_OPTS: --with-clanguage=cxx --with-fc=0 CXXFLAGS=-std=c++11 --with-strict-petscerrorcode 126 TEST_SEARCH: snes_tutorials-ex48% 127 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 128 129uni-complex-float-int64: 130 extends: .stage-1 131 variables: 132 CONFIG_OPTS: --with-mpi=0 --with-scalar-type=complex --with-precision=single --with-64-bit-indices 133 TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_% 134 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 135 136c99-mlib-static-py: 137 extends: .stage-1 138 variables: 139 CONFIG_OPTS: --with-single-library=0 --with-shared-libraries=0 --with-strict-petscerrorcode CFLAGS=-std=c99 FFLAGS= CXXFLAGS= 140 ENABLE_CHECK: 1 141 TEST_SEARCH: snes_tutorials-ex19% snes_tutorials-ex5f90t% 142 MAKE_TEST_FFLAGS: -Werror -std=f2008 143 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 144 145clang-uni: 146 extends: .stage-1 147 variables: 148 CONFIG_OPTS: --with-cc=clang --with-cxx=clang++ --with-mpi=0 149 TEST_SEARCH: snes_tutorials-ex48% 150 151petsc4py-install: 152 extends: .stage-2 153 tags: 154 - gce-u22-stage1 155 variables: 156 PYTHON: python3 157 T_PREFIX: petsc-install 158 T_DESTDIR: petsc-destdir 159 T_PETSC4PY: src/binding/petsc4py 160 T_VALIDATE_CMD: lib/petsc/bin/maint/validate-petsc4py.sh 161 script: 162 - printf "PATH:$PATH\n" 163 - mkdir hide 164 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 165 - ${PYTHON} ./configure --prefix="${PWD}/${T_PREFIX}" --with-petsc4py=1 --with-debugging=0 166 - make CFLAGS=-Werror CXXFLAGS="-Werror -Wzero-as-null-pointer-constant" FFLAGS=-Werror 167 - printf "====== Test A. Install into staging directory then into prefix directory (mimics distro package recipe) =====\n" 168 - make install DESTDIR="${PWD}/${T_DESTDIR}" 169 - test "$(find ${PWD}/${T_PREFIX} -mindepth 1 | wc -l)" -eq 0 170 - test "$(find ${PWD}/${T_DESTDIR} -mindepth 1 | wc -l)" -gt 0 171 - (cd "${PWD}/${T_DESTDIR}" && find * -exec install -v -D "{}" "/{}" \; ) 172 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 173 - rm -r "${PWD}/${T_PREFIX}" "${PWD}/${T_DESTDIR}" && mkdir "${PWD}/${T_PREFIX}" 174 - printf "====== Test B. Install directly into prefix directory =====\n" 175 - make install 176 - test "$(find ${PWD}/${T_PREFIX} -mindepth 1 | wc -l)" -gt 0 177 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 178 - rm -r "${PWD}/${T_PREFIX}"/*/petsc4py* 179 - printf "====== Test C. Install manually with setuptools =====\n" 180 - export PETSC_DIR="${PWD}/${T_PREFIX}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py build) 181 - export PETSC_DIR="${PWD}/${T_PREFIX}" P="${PWD}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py install --install-lib="${P}/${T_PREFIX}/lib") 182 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 183 - rm -r "${PWD}/${T_PREFIX}"/*/petsc4py* 184 - printf "====== Test D. Install manually with setuptools with staging =====\n" 185 - export PETSC_DIR="${PWD}/${T_PREFIX}" P="${PWD}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py install --root="${P}/${T_DESTDIR}" --install-lib="${P}/${T_PREFIX}/lib") 186 - (cd "${PWD}/${T_DESTDIR}" && find * -exec install -v -D "{}" "/{}" \; ) 187 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 188 189petsc4py-pip: 190 extends: .stage-2 191 tags: 192 - gce-u22-stage1 193 variables: 194 PETSC_CONFIGURE_OPTIONS: --with-mpi=0 --with-fc=0 195 CFLAGS: -O0 196 script: 197 - python3 -m venv pip-builds 198 - source pip-builds/bin/activate 199 - python3 -m pip install --upgrade pip==23.0.1 200 - python3 -m pip install . 201 - python3 -m pip install src/binding/petsc4py 202 - python3 -m petsc4py 203 204checksource: 205 extends: .test-basic 206 stage: .pre 207 tags: 208 - gce-u22-stage1 209 script: 210 - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0 211 - vermin --version 212 - make vermin 213 - PATH=/nfs/gce/projects/petsc/soft/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin:$PATH make checkclangformat SHELL=bash 214 - make checkbadSource SHELL=bash 215 - make checkbadFileChange SHELL=bash 216 - make -f gmakefile check_output SHELL=bash 217 - make check_petsc4py_rst 218 artifacts: 219 name: "$CI_JOB_NAME" 220 when: always 221 paths: 222 - arch-*/lib/petsc/conf/*.patch 223 - arch-*/lib/petsc/conf/*.log 224 expire_in: 4 days 225 226pause-for-approval: 227 extends: .test 228 stage: .pre 229 tags: 230 - gce-stage1 231 only: 232 refs: 233 - merge_requests 234 variables: 235 - $CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" 236 - $CI_MERGE_REQUEST_EVENT_TYPE == "detached" 237 script: 238 - echo "pause-for-approval has no script to run" 239 variables: 240 GIT_STRATEGY: none 241 when: manual 242 allow_failure: false 243 244# 245# Basic template for code coverage generation. Tests should additionally inherit from the more 246# specialized OS-specific versions instead of this one. 247# 248 249.coverage-generate: 250 variables: 251 RUN_GCOV: 1 252 RUN_GCOV_OPTIONS: --decisions 253 254.coverage-disable: 255 variables: 256 RUN_GCOV: 0 257 258# 259# This provides the basic order of operations and options template for stage-2,3 tests. 260# Not all stage-2,3 need to follow this template, but most will. 261# 262.stage-23: 263 extends: 264 - .test 265 - .coverage-generate 266 script: 267 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 268 - if [ ! -z ${GCOV_MODULES+x} ]; then module --trace load ${GCOV_MODULES}; module list; fi 269 - if [ ! -z ${INIT_SCRIPT+x} ]; then echo "sourcing ${INIT_SCRIPT}"; if [ -f ${HOME}/${INIT_SCRIPT} ]; then source ${HOME}/${INIT_SCRIPT}; else source ${INIT_SCRIPT}; fi; fi 270 - if [ "${RUN_GCOV}" == 1 ]; then 271 printf "RUN_GCOV_OPTIONS:$RUN_GCOV_OPTIONS\n"; 272 gcovr --version; 273 fi 274 - if [ -d ${HOME}/petsc-hash-pkgs/ ]; then find ${HOME}/petsc-hash-pkgs/ -maxdepth 1 -mindepth 1 -type d -mtime +25 -exec rm -rf {} \; ; fi 275 - printf "PATH:$PATH\n" 276 - printf "PYTHONPATH:$PYTHONPATH\n" 277 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 278 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 279 - printf "./config/examples/${TEST_ARCH}.py\n" 280 - cat ./config/examples/${TEST_ARCH}.py 281 - ./config/examples/${TEST_ARCH}.py || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi 282 - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi 283 - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi 284 - make updatedatafiles 285 - if [ -z ${DISABLE_PETSC4PY_TESTS+x} ]; then if [ -z ${ENABLE_PETSC4PY_LDPRELOAD+x} ]; then echo "NOT using LD_PRELOAD"; make petsc4pytest; else echo "using LD_PRELOAD"; LD_PRELOAD=${PWD}/${TEST_ARCH}/lib/libpetsc.so make petsc4pytest; fi; fi 286 - if [ -z ${DISABLE_TESTS+x} ]; then make cleantest && make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" allgtests-tap TIMEOUT=${TIMEOUT} ${TEST_OPTS} || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi; fi 287 - if [ "${RUN_GCOV}" == 1 ]; then make gcov PETSC_GCOV_OPTIONS="${RUN_GCOV_OPTIONS}"; fi 288 artifacts: 289 reports: 290 junit: arch-*/tests/testresults.xml 291 name: "$CI_JOB_NAME" 292 when: always 293 paths: 294 - arch-*/lib/petsc/conf/*.log 295 - arch-*/lib/pkgconfig/petsc.pc 296 - arch-*/tests/testresults.xml 297 - arch-*/tests/test_arch-*_tap.log 298 - arch-*/tests/test_arch-*_err.log 299 - arch-*/arch-*-gcovr-report.json.tar.bz2 300 expire_in: 4 days 301 variables: 302 OPENBLAS_NUM_THREADS: 1 303 304.stage-2: 305 extends: .stage-23 306 stage: stage-2 307 308.stage-3: 309 extends: .stage-23 310 stage: stage-3 311 312# 313# The following provide templates for various OSes for pre/post info 314# 315 316.linux_test_noflags: 317 before_script: 318 - date 319 - hostname 320 - grep PRETTY_NAME /etc/os-release 321 - nproc 322 - lscpu 323 - ccache --zero-stats 324 after_script: 325 - date 326 - ccache --show-stats 327 328.linux_test_nofflags: 329 extends: .linux_test_noflags 330 variables: 331 MAKE_CFLAGS: -Werror 332 MAKE_CXXFLAGS: -Werror 333 334.linux_test: 335 extends: .linux_test_noflags 336 variables: 337 MAKE_CFLAGS: -Werror 338 MAKE_CXXFLAGS: -Werror 339 MAKE_FFLAGS: -Werror 340 341.freebsd_test: 342 extends: 343 - .coverage-disable 344 variables: 345 MAKE_CFLAGS: -Werror 346 MAKE_CXXFLAGS: -Werror 347 MAKE_FFLAGS: -Werror 348 before_script: 349 - date 350 - hostname 351 - freebsd-version 352 - echo $(sysctl -n hw.ncpu) 353 - ccache --zero-stats 354 after_script: 355 - date 356 - ccache --show-stats 357 358.osx_test: 359 variables: 360 MAKE_CFLAGS: -Werror 361 MAKE_CXXFLAGS: -Werror 362 MAKE_FFLAGS: -Werror 363 before_script: 364 - date 365 - hostname 366 - sw_vers -productVersion 367 - echo $(sysctl -n hw.ncpu) 368 - ccache --zero-stats 369 after_script: 370 - date 371 - ccache --show-stats 372 373.mswin_test: 374 extends: 375 - .coverage-disable 376 before_script: 377 - date 378 - hostname 379 - uname -a 380 - nproc 381 after_script: 382 - date 383 384# 385# The following tests run as part of stage-2. 386# 387# The tags variable used in the tests below connects the particular test with the runners 388# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd. 389# For example the test 'linux-sycl-double' any runner that has the tags 'gce-u22-stage3, linux-fast' 390# (in a blue box beneath it) 391# 392 393osx-arm: 394 extends: 395 - .stage-3 396 - .osx_test 397 - .coverage-disable 398 tags: 399 - os:macos-arm 400 variables: 401 TEST_ARCH: arch-ci-osx-arm 402 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 403 INIT_SCRIPT: .zprofile 404 405freebsd-cxx-cmplx-64idx-dbg: 406 extends: 407 - .stage-2 408 - .freebsd_test 409 tags: 410 - os:fbsd 411 variables: 412 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg 413 414freebsd-c-single-opt: 415 extends: 416 - .stage-2 417 - .freebsd_test 418 tags: 419 - os:fbsd 420 variables: 421 TEST_ARCH: arch-ci-freebsd-c-single-opt 422 423mswin-opt-impi: 424 extends: 425 - .stage-3 426 - .mswin_test 427 tags: 428 - mswin-stage3 429 variables: 430 TEST_ARCH: arch-ci-mswin-opt-impi 431 TEST_OPTS: search='ksp_ksp_tests*' 432 433linux-gcc-quad-64idx-dbg: 434 extends: 435 - .stage-2 436 - .linux_test 437 tags: 438 - gce-stage2 439 variables: 440 TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg 441 442linux-gcc-pkgs-opt: 443 extends: 444 - .stage-2 445 - .linux_test 446 tags: 447 - gce-stage2 448 variables: 449 TEST_ARCH: arch-ci-linux-gcc-pkgs-opt 450 except: 451 variables: 452 - $PETSC_CI_SCHEDULED =~ /yes/ 453 454linux-gcc-complex-opt-32bit: 455 extends: 456 - .stage-2 457 - .linux_test 458 tags: 459 - gce-stage2 460 variables: 461 TEST_ARCH: arch-ci-linux-gcc-complex-opt-32bit 462 463linux-emcc: 464 extends: 465 - .stage-2 466 - .linux_test 467 - .coverage-disable 468 tags: 469 - gce-stage2 470 variables: 471 TEST_ARCH: arch-ci-linux-emcc 472 INIT_SCRIPT: /nfs/gce/projects/petsc/soft/u22.04/emsdk/emsdk_env.sh 473 DISABLE_TESTS: 1 474 475# 476# The following tests run as part of stage-3. 477# 478 479freebsd-cxx-cmplx-pkgs-dbg: 480 extends: 481 - .stage-3 482 - .freebsd_test 483 tags: 484 - os:fbsd 485 variables: 486 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg 487 488freebsd-cxx-pkgs-opt: 489 extends: 490 - .stage-3 491 - .freebsd_test 492 tags: 493 - os:fbsd 494 variables: 495 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 496 TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt 497 498freebsd-pkgs-opt: 499 extends: 500 - .stage-3 501 - .freebsd_test 502 tags: 503 - os:fbsd 504 variables: 505 TEST_ARCH: arch-ci-freebsd-pkgs-opt 506 MAKE_CFLAGS: -DPETSC_SKIP_COMPLEX -Werror 507 508linux-hip-double: 509 extends: 510 - .stage-3 511 - .linux_test_noflags 512 - .coverage-disable 513 tags: 514 - gpu:amd, os:linux 515 variables: 516 TEST_ARCH: arch-ci-linux-hip-double 517 518linux-sycl-double: 519 extends: 520 - .stage-3 521 - .linux_test_nofflags 522 - .coverage-disable 523 tags: 524 - gce-u22-stage3, linux-fast 525 variables: 526 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/oneapi/modulefiles 527 TEST_ARCH: arch-ci-linux-sycl-double 528 LOAD_MODULES: compiler/latest mpi/latest 529 TEST_OPTS: query=requires queryval=kokkos_kernels 530 MAKE_CFLAGS: -Wno-expected-file-type -Werror 531 532linux-cuda-pkgs: 533 extends: 534 - .stage-3 535 - .linux_test 536 tags: 537 - cuda-stage3 538 variables: 539 TEST_ARCH: arch-ci-linux-cuda-pkgs 540 # run all tests that: 541 # 1. require cuda, OR 542 # 2. require device, OR 543 # 3. require hypre, OR 544 # 4. require kokkos[_kernels], AND lives in the vec subdirectory 545 # 546 # need to use the alternate OR spelling since '|' is interpreted as a pipe by the 547 # shell, and I could not manage to escape it enough times... 548 TEST_OPTS: -j3 queryval='cuda,device,hypre,kokkos*,vec*' query='requires,requires,requires,requires%OR%name' 549 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 550 551linux-cuda112-omp: 552 extends: 553 - .stage-3 554 - .linux_test 555 - .coverage-disable 556 tags: 557 - cuda-stage3 558 variables: 559 TEST_ARCH: arch-ci-linux-cuda112-omp 560 TEST_OPTS: -j4 query=requires queryval=kokkos_kernels 561 LOAD_MODULES: cuda/11.2.2 u-gcc-9/9.4.0 562 OMP_PROC_BIND: "false" 563 OMP_NUM_THREADS: 1 564 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 565 566linux-cuda-cmplx: 567 extends: 568 - .stage-3 569 - .linux_test 570 tags: 571 - cuda-stage3 572 variables: 573 TEST_ARCH: arch-ci-linux-cuda-cmplx 574 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 575 576linux-cuda-double-64idx: 577 extends: 578 - .stage-3 579 - .linux_test 580 tags: 581 - cuda12 582 variables: 583 TEST_ARCH: arch-ci-linux-cuda-double-64idx 584 TEST_OPTS: -j3 query=requires queryval=cuda 585 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 586 587linux-cuda-single-cxx: 588 extends: 589 - .stage-3 590 - .linux_test_noflags 591 - .coverage-disable 592 tags: 593 - cuda-stage3 594 variables: 595 TEST_ARCH: arch-ci-linux-cuda-single-cxx 596 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2023-02-02/share/spack/modules/linux-ubuntu22.04-ivybridge 597 LOAD_MODULES: nvhpc-22.11-gcc-11.3.0-vmvmbrx 598 TEST_OPTS: -j15 query=requires queryval=cuda 599 600linux-cuda-uni-pkgs: 601 extends: 602 - .stage-3 603 - .linux_test 604 tags: 605 - cuda-stage3 606 variables: 607 TEST_ARCH: arch-ci-linux-cuda-uni-pkgs 608 TEST_OPTS: -j20 query=requires queryval=cuda 609 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 610 611linux-clang-cuda: 612 extends: 613 - .stage-3 614 - .linux_test 615 - .coverage-disable 616 tags: 617 - cuda-stage3 618 variables: 619 TEST_ARCH: arch-ci-linux-clang-cuda 620 TEST_OPTS: -j 1 queryval='cuda*,snes*' query='requires%OR%name' 621 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2023-02-02/share/spack/modules/linux-ubuntu22.04-ivybridge 622 LOAD_MODULES: llvm-15.0.7-gcc-11.3.0-pjldtxf cuda-11.5.2-gcc-11.3.0-jkoottx gcc-11.3.0-gcc-11.3.0-pgrvke5 623 MAKE_CUDAFLAGS: -Wno-pass-failed -Werror 624 625linux-viennacl: 626 extends: 627 - .stage-3 628 - .linux_test 629 tags: 630 - cuda-stage3 631 variables: 632 TEST_ARCH: arch-ci-linux-viennacl 633 MAKE_CXXFLAGS: -Werror -Wno-ignored-attributes 634 TEST_OPTS: -j20 query=requires queryval=viennacl 635 636linux-without-fc: 637 extends: 638 - .stage-3 639 - .linux_test 640 tags: 641 - gce-u22-stage3 642 variables: 643 TEST_ARCH: arch-ci-linux-without-fc 644 645linux-cmplx-single-arm: 646 extends: 647 - .stage-3 648 - .linux_test 649 # gcovr does not work on arm/linux 650 - .coverage-disable 651 tags: 652 - arch:arm, os:linux 653 variables: 654 FLEXIBLAS: netlib 655 TEST_ARCH: arch-ci-linux-cmplx-single-arm 656 657linux-gcc-cxx-avx2: 658 extends: 659 - .stage-3 660 - .linux_test 661 tags: 662 - name:petsc-knl-01 663 variables: 664 TEST_ARCH: arch-ci-linux-gcc-cxx-avx2 665 666linux-clang-avx: 667 extends: 668 - .stage-3 669 - .linux_test 670 tags: 671 - name:petsc-knl-01 672 variables: 673 TEST_ARCH: arch-ci-linux-clang-avx 674 675linux-knl: 676 extends: 677 - .stage-3 678 - .linux_test 679 - .coverage-disable 680 tags: 681 - name:petsc-knl-01 682 variables: 683 MAKE_FFLAGS: -warn errors 684 TEST_ARCH: arch-ci-linux-knl 685 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 686 687linux-intel-mkl-single: 688 extends: 689 - .stage-3 690 - .linux_test_nofflags 691 - .coverage-disable 692 tags: 693 - name:petsc-knl-01 694 variables: 695 TEST_ARCH: arch-ci-linux-intel-mkl-single 696 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 697 698linux-cxx-cmplx-pkgs-64idx: 699 extends: 700 - .stage-3 701 - .linux_test 702 tags: 703 - gce-u22-stage3 704 variables: 705 TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx 706 PETSC_OPTIONS: -fp_trap 707 708# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings 709linux-pkgs-dbg-ftn-interfaces: 710 extends: 711 - .stage-3 712 - .linux_test 713 - .coverage-disable 714 tags: 715 - gce-u22-stage3 716 variables: 717 TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces 718 OMP_PROC_BIND: "false" 719 OMP_NUM_THREADS: 4 720 PETSC_OPTIONS: -fp_trap 721 722linux-pkgs-cxx-mlib: 723 extends: 724 - .stage-3 725 - .linux_test 726 tags: 727 - gce-u22-stage3 728 variables: 729 TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib 730 PETSC_OPTIONS: -fp_trap 731 732linux-pkgs-valgrind: 733 extends: 734 - .stage-3 735 - .linux_test 736 tags: 737 - gce-valgrind 738 variables: 739 TEST_ARCH: arch-ci-linux-pkgs-valgrind 740 TIMEOUT: 7200 741 742linux-pkgs-opt: 743 extends: 744 - .stage-3 745 - .linux_test 746 tags: 747 - gce-u22-stage3, linux-fast 748 variables: 749 TEST_ARCH: arch-ci-linux-pkgs-opt 750 LOAD_MODULES: gcc/12.1.0 751 MAKE_CXXFLAGS: -Wno-deprecated-declarations -Werror 752 753linux-pkgs-dbg: 754 extends: 755 - .stage-3 756 - .linux_test 757 tags: 758 - gce-u22-stage3, linux-gcov 759 variables: 760 TEST_ARCH: arch-ci-linux-pkgs-dbg 761 PETSC_OPTIONS: -fp_trap 762 763linux-matlab-ilp64: 764 extends: 765 - .stage-3 766 - .linux_test 767 tags: 768 - gce-u22-stage3, linux-gcov 769 variables: 770 TEST_ARCH: arch-ci-linux-matlab-ilp64 771 LOAD_MODULES: gcc/9.4.0 matlab/R2022a 772 allow_failure: true 773 774linux-pgi: 775 extends: 776 - .stage-3 777 - .linux_test_noflags 778 - .coverage-disable 779 tags: 780 - gce-u22-stage3, linux-mcpu 781 variables: 782 TEST_ARCH: arch-ci-linux-pgi 783 LOAD_MODULES: nvhpc/22.3 784 785# If the Nag license server fails then ${PETSC_DIR}/naglicenseproblem is created and the job is marked as failed but allow_failure 786linux-nagfor: 787 extends: 788 - .stage-3 789 - .linux_test_nofflags 790 tags: 791 - gce-stage2, linux-mcpu 792 variables: 793 LOAD_MODULES: nag/6.1 794 TEST_ARCH: arch-ci-linux-nagfor 795 allow_failure: 796 exit_codes: 126 797 798linux-intel-cmplx: 799 extends: 800 - .stage-3 801 - .linux_test_nofflags 802 - .coverage-disable 803 tags: 804 - gce-u22-stage3 805 variables: 806 TEST_ARCH: arch-ci-linux-intel-cmplx 807 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 808 809linux-xsdk-dbg: 810 extends: 811 - .stage-3 812 - .linux_test 813 tags: 814 - gce-u22-stage3 815 variables: 816 TEST_ARCH: arch-ci-linux-xsdk-dbg 817 LOAD_MODULES: gcc/12.1.0 818 819linux-analyzer: 820 extends: 821 - .stage-2 822 - .linux_test 823 - .coverage-disable 824 tags: 825 - gce-u22-stage2 826 script: 827 - printf "PATH:$PATH\n" 828 - printf "PYTHONPATH:$PYTHONPATH\n" 829 - python3 --version 830 - git --version 831 - mypy --version 832 - vermin --version 833 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 834 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 835 - printf "./config/examples/${TEST_ARCH}.py\n" 836 - cat ./config/examples/${TEST_ARCH}.py 837 - ./config/examples/${TEST_ARCH}.py 838 - make LINTER_OPTIONS="${LINTER_OPTIONS}" test-lint 839 - make V=3 LINTER_OPTIONS="${LINTER_OPTIONS} -- ./src" lint 840 variables: 841 TEST_ARCH: arch-ci-linux-analyzer 842 LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config-14 --libdir`/libclang.so.1 --werror 1" 843 artifacts: 844 paths: 845 - arch-*/lib/petsc/conf/*.log 846 - ./petscLintPatches/*.patch 847 expire_in: 4 days 848 except: 849 variables: 850 - $PETSC_CI_SCHEDULED =~ /yes/ 851 852linux-intel: 853 extends: 854 - .stage-3 855 - .linux_test_nofflags 856 - .coverage-disable 857 tags: 858 - gce-u22-stage3 859 variables: 860 TEST_ARCH: arch-ci-linux-intel 861 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 862 863linux-opt-arm: 864 extends: 865 - .stage-3 866 - .linux_test 867 # gcovr does not work on arm/linux 868 - .coverage-disable 869 tags: 870 - arch:arm, os:linux 871 variables: 872 TEST_ARCH: arch-ci-linux-opt-arm 873 874linux-pkgs-64idx: 875 extends: 876 - .stage-3 877 - .linux_test 878 tags: 879 - gce-u22-stage3, linux-mcpu 880 variables: 881 TEST_ARCH: arch-ci-linux-pkgs-64idx 882 LOAD_MODULES: intel-oneapi-mkl/2022.0.2 883 884linux-64idx-i8: 885 extends: 886 - .stage-3 887 - .linux_test 888 tags: 889 - gce-u22-stage3, linux-mcpu 890 variables: 891 TEST_ARCH: arch-ci-linux-64idx-i8 892 893linux-gcc-ifc-cmplx: 894 extends: 895 - .stage-3 896 - .linux_test_nofflags 897 tags: 898 - gce-u22-stage3 899 variables: 900 TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx 901 LOAD_MODULES: intel-oneapi-compilers/2022.2.1 902 903linux-opt-cxx-quad: 904 extends: 905 - .stage-3 906 - .linux_test 907 tags: 908 - gce-u22-stage3 909 variables: 910 TEST_ARCH: arch-ci-linux-opt-cxx-quad 911 912linux-ILP64: 913 extends: 914 - .stage-3 915 - .linux_test 916 tags: 917 - gce-u22-stage3 918 variables: 919 TEST_ARCH: arch-ci-linux-ILP64 920 LOAD_MODULES: gcc/8.5.0 mpich/2-1.5-gcc-8.5.0 921 MAKE_CFLAGS: -Wno-discarded-qualifiers -Werror 922 923linux-64idx-i8-uni: 924 extends: 925 - .stage-3 926 - .linux_test 927 tags: 928 - gce-u22-stage3, linux-mcpu 929 variables: 930 TEST_ARCH: arch-ci-linux-64idx-i8-uni 931 932linux-misc-32bit: 933 extends: 934 - .stage-3 935 - .linux_test 936 tags: 937 - gce-u22-stage3 938 variables: 939 TEST_ARCH: arch-ci-linux-misc-32bit 940 941mswin-intel-cxx-cmplx: 942 extends: 943 - .stage-3 944 - .mswin_test 945 tags: 946 - mswin-stage3 947 variables: 948 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 949 950mswin-uni: 951 extends: 952 - .stage-3 953 - .mswin_test 954 tags: 955 - mswin-stage3 956 variables: 957 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 958 TEST_ARCH: arch-ci-mswin-uni 959 960mswin-gnu: 961 extends: 962 - .stage-3 963 - .mswin_test 964 tags: 965 - mswin-stage3 966 variables: 967 TEST_ARCH: arch-ci-mswin-gnu 968 MAKE_CFLAGS: -Werror 969 MAKE_CXXFLAGS: -Werror 970 MAKE_FFLAGS: -Werror 971 DISABLE_TESTS: 1 972 973#mswin-intel: 974# extends: 975# - .stage-3 976# - .mswin_test 977# tags: 978# - os:win 979# variables: 980# TEST_ARCH: arch-ci-mswin-intel 981 982osx-cxx-cmplx-pkgs-dbg: 983 extends: 984 - .stage-3 985 - .osx_test 986 - .coverage-disable 987 tags: 988 - os:macos-x64 989 variables: 990 TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg 991 INIT_SCRIPT: .zprofile 992 993osx-cxx-pkgs-opt-arm: 994 extends: 995 - .stage-3 996 - .osx_test 997 - .coverage-disable 998 tags: 999 - os:macos-arm 1000 variables: 1001 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 1002 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt-arm 1003 MAKE_CXXFLAGS: -Werror -Wno-pass-failed 1004 INIT_SCRIPT: .zprofile 1005 1006osx-dbg: 1007 extends: 1008 - .stage-3 1009 - .osx_test 1010 - .coverage-disable 1011 tags: 1012 - os:macos-x64 1013 variables: 1014 TEST_ARCH: arch-ci-osx-dbg 1015 ASAN_OPTIONS: log_path=stdout 1016 INIT_SCRIPT: .zprofile 1017 1018osx-xsdk-opt: 1019 extends: 1020 - .stage-3 1021 - .osx_test 1022 - .coverage-disable 1023 tags: 1024 - os:macos-x64 1025 variables: 1026 TEST_ARCH: arch-ci-osx-xsdk-opt 1027 INIT_SCRIPT: .zprofile 1028 1029# job for analyzing the coverage results and generating the various reports 1030coverage-analyze: 1031 extends: .test 1032 stage: stage-4 1033 tags: 1034 - gce-u22-short 1035 dependencies: 1036 # stage-2 1037 - linux-gcc-quad-64idx-dbg 1038 - linux-gcc-pkgs-opt 1039 - linux-gcc-complex-opt-32bit 1040 # stage-3 1041 - linux-pkgs-dbg 1042 - linux-matlab-ilp64 1043 - linux-cuda-pkgs 1044 - linux-cxx-cmplx-pkgs-64idx 1045 - linux-cuda-cmplx 1046 - linux-cuda-double-64idx 1047 - linux-cuda-uni-pkgs 1048 - linux-viennacl 1049 - linux-without-fc 1050 - linux-gcc-cxx-avx2 1051 - linux-clang-avx 1052 - linux-pkgs-cxx-mlib 1053 - linux-pkgs-valgrind 1054 - linux-nagfor 1055 - linux-xsdk-dbg 1056 - linux-pkgs-64idx 1057 - linux-pkgs-opt 1058 - linux-64idx-i8 1059 - linux-gcc-ifc-cmplx 1060 - linux-opt-cxx-quad 1061 - linux-ILP64 1062 - linux-64idx-i8-uni 1063 variables: 1064 PYTHON: python3 1065 PETSC_ARCH: arch-ci-analyze-pipeline 1066 before_script: 1067 - date 1068 - hostname 1069 script: 1070 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 1071 - ${PYTHON} --version 1072 - gcovr --version 1073 - printf "PATH:$PATH\n" 1074 - printf "PYTHONPATH:$PYTHONPATH\n" 1075 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 1076 - ${PYTHON} ./configure --with-mpi=0 --with-cxx=0 --download-sowing --with-fortran-bindings 1077 - make mergegcov PETSC_GCOV_OPTIONS='--ci-mode --verbose' 1078 coverage: /^\s*lines:\s*\d+.\d+\%/ 1079 artifacts: 1080 name: "$CI_JOB_NAME" 1081 when: always 1082 paths: 1083 - arch-ci-analyze-pipeline/gcovr/* 1084 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1085 expire_in: 4 days 1086 reports: 1087 coverage_report: 1088 coverage_format: cobertura 1089 path: arch-ci-analyze-pipeline/gcovr/xml/*.xml 1090 1091# template for the coverage review jobs, these must be separate jobs as you cannot deploy multiple 1092# environments from one job... 1093.coverage-review: 1094 extends: .test 1095 stage: .post 1096 tags: 1097 - gce-u22-short 1098 dependencies: 1099 - coverage-analyze 1100 script: 1101 - date 1102 - hostname 1103 artifacts: 1104 name: "$CI_JOB_NAME" 1105 when: always 1106 paths: 1107 - arch-ci-analyze-pipeline/gcovr/* 1108 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1109 expire_in: 4 days 1110 1111coverage-total-review: 1112 extends: .coverage-review 1113 environment: 1114 name: coverage/all/$CI_COMMIT_REF_SLUG 1115 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html/report.html 1116 auto_stop_in: one week 1117 deployment_tier: testing 1118 1119coverage-untested-review: 1120 extends: .coverage-review 1121 environment: 1122 name: coverage/untested/$CI_COMMIT_REF_SLUG 1123 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html_untested/report_untested.html 1124 auto_stop_in: one week 1125 deployment_tier: testing 1126 1127analyze-pipeline: 1128 extends: .coverage-review 1129 script: 1130 - date 1131 - hostname 1132 # This file is created by lib/petsc/bin/maint/gcov.py. If it exists then the CI 1133 # pipeline should fail 1134 - if [ -f ./arch-ci-analyze-pipeline/gcovr/.CI_FAIL ]; then 1135 cat ./arch-ci-analyze-pipeline/gcovr/merge_gcov_errors.log; 1136 exit 1; 1137 fi 1138 allow_failure: true 1139 1140# 1141# Base job for a documentation build (runs in venv to allow installing additional packages without root) 1142# 1143.docs: 1144 stage: stage-2 1145 tags: 1146 - linux-docs 1147 before_script: 1148 - git fetch --unshallow --no-tags origin +release:remotes/origin/release +main:remotes/origin/main 1149 - module --trace load python-3.11.2-gcc-9.4.0-6p2ktlj 1150 - printf "PATH:$PATH\n" 1151 - printf "PYTHONPATH:$PYTHONPATH\n" 1152 - VENV=venv-petsc-docs && 1153 python3 -m venv $VENV && 1154 . $VENV/bin/activate && 1155 cd doc && 1156 python3 -m pip install -r requirements.txt 1157 1158# 1159# Build documentation and make available for review using GitLab pages 1160# 1161docs-review: 1162 extends: 1163 - .docs 1164 - .test-basic 1165 script: 1166 - (time make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1167 - (time make latexpdf SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1168 - cp _build/latex/manual.pdf ../public/html/manual/ 1169 environment: 1170 name: review/$CI_COMMIT_REF_NAME 1171 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html 1172 auto_stop_in: one week 1173 deployment_tier: development 1174 artifacts: 1175 paths: 1176 - public 1177 expire_in: 4 days 1178 except: 1179 variables: 1180 - $PETSC_CI_SCHEDULED =~ /yes/ 1181 1182# 1183# Deploy documentation using GitLab pages 1184# 1185pages: # this job name has special meaning to GitLab 1186 extends: .docs 1187 interruptible: true 1188 script: 1189 - mkdir -p ../public/ && cp public/* ../public/ 1190 - (git checkout origin/main && pip install -r requirements.txt && make website-deploy SPHINXOPTS="-j 1" BUILDDIR="../public/main" && make latexpdf && mkdir -p ../public/main/docs/manual && cp _build/latex/manual.pdf ../public/main/manual/) || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1191 - git clean -fdxq && rm -rf images ../arch-classic-docs 1192 - (git checkout origin/release && pip install -r requirements.txt && make website-deploy SPHINXOPTS="-j 1" BUILDDIR="../public/release" && make latexpdf && mkdir -p ../public/release/docs/manual && cp _build/latex/manual.pdf ../public/release/docs/manual/) || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1193 - rm -rf ../public/*/.doctrees 1194 only: 1195 variables: 1196 - $PETSC_CI_SCHEDULED == "yes" 1197 artifacts: 1198 paths: 1199 - public 1200 expire_in: 4 days 1201 1202# 1203# 1204# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 1205# that fail produce a warning, but do not block execution of a pipeline. 1206# 1207 1208.test-experimental: 1209 extends: .test 1210 allow_failure: true 1211 1212