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 393.disable-osx-m1: 394 extends: 395 - .stage-3 396 - .osx_test 397 - .coverage-disable 398 tags: 399 - os:macos-m1 400 variables: 401 TEST_ARCH: arch-ci-osx-m1 402 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 403 INIT_SCRIPT: /Volumes/Scratch/svcpetsc/soft/py3venv/cython3setup.sh 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 INIT_SCRIPT: /home/users/balay/bin/instinct-mod-init.sh 518 519linux-sycl-double: 520 extends: 521 - .stage-3 522 - .linux_test_nofflags 523 - .coverage-disable 524 tags: 525 - gce-u22-stage3, linux-fast 526 variables: 527 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/oneapi/modulefiles 528 TEST_ARCH: arch-ci-linux-sycl-double 529 LOAD_MODULES: compiler/latest mpi/latest 530 TEST_OPTS: query=requires queryval=kokkos_kernels 531 MAKE_CFLAGS: -Wno-expected-file-type -Werror 532 533linux-cuda-pkgs: 534 extends: 535 - .stage-3 536 - .linux_test 537 tags: 538 - cuda-stage3 539 variables: 540 TEST_ARCH: arch-ci-linux-cuda-pkgs 541 # run all tests that: 542 # 1. require cuda, OR 543 # 2. require device, OR 544 # 3. require hypre, OR 545 # 4. require kokkos[_kernels], AND lives in the vec subdirectory 546 # 547 # need to use the alternate OR spelling since '|' is interpreted as a pipe by the 548 # shell, and I could not manage to escape it enough times... 549 TEST_OPTS: -j3 queryval='cuda,device,hypre,kokkos*,vec*' query='requires,requires,requires,requires%OR%name' 550 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 551 552linux-cuda112-omp: 553 extends: 554 - .stage-3 555 - .linux_test 556 - .coverage-disable 557 tags: 558 - cuda-stage3 559 variables: 560 TEST_ARCH: arch-ci-linux-cuda112-omp 561 TEST_OPTS: -j4 query=requires queryval=kokkos_kernels 562 LOAD_MODULES: cuda/11.2.2 u-gcc-9/9.4.0 563 OMP_PROC_BIND: "false" 564 OMP_NUM_THREADS: 1 565 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 566 567linux-cuda-cmplx: 568 extends: 569 - .stage-3 570 - .linux_test 571 tags: 572 - cuda-stage3 573 variables: 574 TEST_ARCH: arch-ci-linux-cuda-cmplx 575 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 576 577linux-cuda-double-64idx: 578 extends: 579 - .stage-3 580 - .linux_test 581 tags: 582 - cuda12 583 variables: 584 TEST_ARCH: arch-ci-linux-cuda-double-64idx 585 TEST_OPTS: -j3 query=requires queryval=cuda 586 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 587 588linux-cuda-single-cxx: 589 extends: 590 - .stage-3 591 - .linux_test_noflags 592 - .coverage-disable 593 tags: 594 - cuda-stage3 595 variables: 596 TEST_ARCH: arch-ci-linux-cuda-single-cxx 597 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2023-02-02/share/spack/modules/linux-ubuntu22.04-ivybridge 598 LOAD_MODULES: nvhpc-22.11-gcc-11.3.0-vmvmbrx 599 TEST_OPTS: -j15 query=requires queryval=cuda 600 601linux-cuda-uni-pkgs: 602 extends: 603 - .stage-3 604 - .linux_test 605 tags: 606 - cuda-stage3 607 variables: 608 TEST_ARCH: arch-ci-linux-cuda-uni-pkgs 609 TEST_OPTS: -j20 query=requires queryval=cuda 610 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 611 612linux-clang-cuda: 613 extends: 614 - .stage-3 615 - .linux_test 616 - .coverage-disable 617 tags: 618 - cuda-stage3 619 variables: 620 TEST_ARCH: arch-ci-linux-clang-cuda 621 TEST_OPTS: -j 1 queryval='cuda*,snes*' query='requires%OR%name' 622 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2023-02-02/share/spack/modules/linux-ubuntu22.04-ivybridge 623 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 624 MAKE_CUDAFLAGS: -Wno-pass-failed -Werror 625 626linux-viennacl: 627 extends: 628 - .stage-3 629 - .linux_test 630 tags: 631 - cuda-stage3 632 variables: 633 TEST_ARCH: arch-ci-linux-viennacl 634 MAKE_CXXFLAGS: -Werror -Wno-ignored-attributes 635 TEST_OPTS: -j20 query=requires queryval=viennacl 636 637linux-without-fc: 638 extends: 639 - .stage-3 640 - .linux_test 641 tags: 642 - gce-u22-stage3 643 variables: 644 TEST_ARCH: arch-ci-linux-without-fc 645 646.disable-linux-cmplx-single: 647 extends: 648 - .stage-3 649 - .linux_test 650 # gcovr is not on si 651 - .coverage-disable 652 tags: 653 - name:si 654 variables: 655 FLEXIBLAS: netlib 656 TEST_ARCH: arch-ci-linux-cmplx-single 657 658linux-gcc-cxx-avx2: 659 extends: 660 - .stage-3 661 - .linux_test 662 tags: 663 - name:petsc-knl-01 664 variables: 665 TEST_ARCH: arch-ci-linux-gcc-cxx-avx2 666 667linux-clang-avx: 668 extends: 669 - .stage-3 670 - .linux_test 671 tags: 672 - name:petsc-knl-01 673 variables: 674 TEST_ARCH: arch-ci-linux-clang-avx 675 676linux-knl: 677 extends: 678 - .stage-3 679 - .linux_test 680 - .coverage-disable 681 tags: 682 - name:petsc-knl-01 683 variables: 684 MAKE_FFLAGS: -warn errors 685 TEST_ARCH: arch-ci-linux-knl 686 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 687 688linux-intel-mkl-single: 689 extends: 690 - .stage-3 691 - .linux_test_nofflags 692 - .coverage-disable 693 tags: 694 - name:petsc-knl-01 695 variables: 696 TEST_ARCH: arch-ci-linux-intel-mkl-single 697 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 698 699linux-cxx-cmplx-pkgs-64idx: 700 extends: 701 - .stage-3 702 - .linux_test 703 tags: 704 - gce-u22-stage3 705 variables: 706 TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx 707 PETSC_OPTIONS: -fp_trap 708 709# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings 710linux-pkgs-dbg-ftn-interfaces: 711 extends: 712 - .stage-3 713 - .linux_test 714 - .coverage-disable 715 tags: 716 - gce-u22-stage3 717 variables: 718 TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces 719 OMP_PROC_BIND: "false" 720 OMP_NUM_THREADS: 4 721 PETSC_OPTIONS: -fp_trap 722 723linux-pkgs-cxx-mlib: 724 extends: 725 - .stage-3 726 - .linux_test 727 tags: 728 - gce-u22-stage3 729 variables: 730 TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib 731 PETSC_OPTIONS: -fp_trap 732 733linux-pkgs-valgrind: 734 extends: 735 - .stage-3 736 - .linux_test 737 tags: 738 - gce-valgrind 739 variables: 740 TEST_ARCH: arch-ci-linux-pkgs-valgrind 741 TIMEOUT: 7200 742 743linux-pkgs-opt: 744 extends: 745 - .stage-3 746 - .linux_test 747 tags: 748 - gce-u22-stage3, linux-fast 749 variables: 750 TEST_ARCH: arch-ci-linux-pkgs-opt 751 LOAD_MODULES: gcc/12.1.0 752 MAKE_CXXFLAGS: -Wno-deprecated-declarations -Werror 753 754linux-pkgs-dbg: 755 extends: 756 - .stage-3 757 - .linux_test 758 tags: 759 - gce-u22-stage3, linux-gcov 760 variables: 761 TEST_ARCH: arch-ci-linux-pkgs-dbg 762 PETSC_OPTIONS: -fp_trap 763 764linux-matlab-ilp64: 765 extends: 766 - .stage-3 767 - .linux_test 768 tags: 769 - gce-u22-stage3, linux-gcov 770 variables: 771 TEST_ARCH: arch-ci-linux-matlab-ilp64 772 LOAD_MODULES: gcc/9.4.0 matlab/R2022a 773 allow_failure: true 774 775linux-pgi: 776 extends: 777 - .stage-3 778 - .linux_test_noflags 779 - .coverage-disable 780 tags: 781 - gce-u22-stage3, linux-mcpu 782 variables: 783 TEST_ARCH: arch-ci-linux-pgi 784 LOAD_MODULES: nvhpc/22.3 785 786# If the Nag license server fails then ${PETSC_DIR}/naglicenseproblem is created and the job is marked as failed but allow_failure 787linux-nagfor: 788 extends: 789 - .stage-3 790 - .linux_test_nofflags 791 tags: 792 - gce-stage2, linux-mcpu 793 variables: 794 LOAD_MODULES: nag/6.1 795 TEST_ARCH: arch-ci-linux-nagfor 796 allow_failure: 797 exit_codes: 126 798 799linux-intel-cmplx: 800 extends: 801 - .stage-3 802 - .linux_test_nofflags 803 - .coverage-disable 804 tags: 805 - gce-u22-stage3 806 variables: 807 TEST_ARCH: arch-ci-linux-intel-cmplx 808 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 809 810linux-xsdk-dbg: 811 extends: 812 - .stage-3 813 - .linux_test 814 tags: 815 - gce-u22-stage3 816 variables: 817 TEST_ARCH: arch-ci-linux-xsdk-dbg 818 LOAD_MODULES: gcc/12.1.0 819 820linux-analyzer: 821 extends: 822 - .stage-2 823 - .linux_test 824 - .coverage-disable 825 tags: 826 - gce-u22-stage2 827 script: 828 - printf "PATH:$PATH\n" 829 - printf "PYTHONPATH:$PYTHONPATH\n" 830 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 831 - 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 832 - printf "./config/examples/${TEST_ARCH}.py\n" 833 - cat ./config/examples/${TEST_ARCH}.py 834 - ./config/examples/${TEST_ARCH}.py 835 - make LINTER_OPTIONS="${LINTER_OPTIONS}" test-lint 836 - make LINTER_OPTIONS="${LINTER_OPTIONS} ./src/sys ./src/vec ./src/mat ./src/ts ./src/snes ./src/tao ./src/ksp" lint 837 - make LINTER_OPTIONS="${LINTER_OPTIONS} -fdoc-* no -fdoc-indentation 1 -fdoc-param-list-func-fortran-interface 1 -fdoc-inline-list-seealso-* 1 -fdoc-section-header-spelling 1 -fdoc-inline-list-formatting 1 -fdoc-section-barren 1 -fdoc-section-header-spelling 1 ./src/dm" lint 838 variables: 839 TEST_ARCH: arch-ci-linux-analyzer 840 LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config-14 --libdir`/libclang.so.1 --verbose 1 --werror 1" 841 artifacts: 842 paths: 843 - arch-*/lib/petsc/conf/*.log 844 - ./petscLintPatches/*.patch 845 expire_in: 4 days 846 except: 847 variables: 848 - $PETSC_CI_SCHEDULED =~ /yes/ 849 850linux-intel: 851 extends: 852 - .stage-3 853 - .linux_test_nofflags 854 - .coverage-disable 855 tags: 856 - gce-u22-stage3 857 variables: 858 TEST_ARCH: arch-ci-linux-intel 859 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 860 861linux-opt-misc: 862 extends: 863 - .stage-3 864 - .linux_test 865 tags: 866 - gce-u22-stage3, linux-fast 867 variables: 868 TEST_ARCH: arch-ci-linux-opt-misc 869 LOAD_MODULES: gcc/8.5.0 870 871linux-pkgs-64idx: 872 extends: 873 - .stage-3 874 - .linux_test 875 tags: 876 - gce-u22-stage3, linux-mcpu 877 variables: 878 TEST_ARCH: arch-ci-linux-pkgs-64idx 879 LOAD_MODULES: intel-oneapi-mkl/2022.0.2 880 881linux-64idx-i8: 882 extends: 883 - .stage-3 884 - .linux_test 885 tags: 886 - gce-u22-stage3, linux-mcpu 887 variables: 888 TEST_ARCH: arch-ci-linux-64idx-i8 889 890linux-gcc-ifc-cmplx: 891 extends: 892 - .stage-3 893 - .linux_test_nofflags 894 tags: 895 - gce-u22-stage3 896 variables: 897 TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx 898 LOAD_MODULES: intel-oneapi-compilers/2022.2.1 899 900linux-opt-cxx-quad: 901 extends: 902 - .stage-3 903 - .linux_test 904 tags: 905 - gce-u22-stage3 906 variables: 907 TEST_ARCH: arch-ci-linux-opt-cxx-quad 908 909linux-ILP64: 910 extends: 911 - .stage-3 912 - .linux_test 913 tags: 914 - gce-u22-stage3 915 variables: 916 TEST_ARCH: arch-ci-linux-ILP64 917 LOAD_MODULES: gcc/8.5.0 mpich/2-1.5-gcc-8.5.0 918 MAKE_CFLAGS: -Wno-discarded-qualifiers -Werror 919 920linux-64idx-i8-uni: 921 extends: 922 - .stage-3 923 - .linux_test 924 tags: 925 - gce-u22-stage3, linux-mcpu 926 variables: 927 TEST_ARCH: arch-ci-linux-64idx-i8-uni 928 929linux-misc-32bit: 930 extends: 931 - .stage-3 932 - .linux_test 933 tags: 934 - gce-u22-stage3 935 variables: 936 TEST_ARCH: arch-ci-linux-misc-32bit 937 938mswin-intel-cxx-cmplx: 939 extends: 940 - .stage-3 941 - .mswin_test 942 tags: 943 - mswin-stage3 944 variables: 945 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 946 947mswin-uni: 948 extends: 949 - .stage-3 950 - .mswin_test 951 tags: 952 - mswin-stage3 953 variables: 954 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 955 TEST_ARCH: arch-ci-mswin-uni 956 957mswin-gnu: 958 extends: 959 - .stage-3 960 - .mswin_test 961 tags: 962 - mswin-stage3 963 variables: 964 TEST_ARCH: arch-ci-mswin-gnu 965 MAKE_CFLAGS: -Werror 966 MAKE_CXXFLAGS: -Werror 967 MAKE_FFLAGS: -Werror 968 DISABLE_TESTS: 1 969 970#mswin-intel: 971# extends: 972# - .stage-3 973# - .mswin_test 974# tags: 975# - os:win 976# variables: 977# TEST_ARCH: arch-ci-mswin-intel 978 979osx-cxx-cmplx-pkgs-dbg: 980 extends: 981 - .stage-3 982 - .osx_test 983 - .coverage-disable 984 tags: 985 - os:macos-x64 986 variables: 987 TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg 988 INIT_SCRIPT: .zprofile 989 990osx-cxx-pkgs-opt: 991 extends: 992 - .stage-3 993 - .osx_test 994 - .coverage-disable 995 tags: 996 - os:macos-x64 997 variables: 998 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 999 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 1000 MAKE_CXXFLAGS: -Werror -Wno-pass-failed 1001 INIT_SCRIPT: .zprofile 1002 1003osx-dbg: 1004 extends: 1005 - .stage-3 1006 - .osx_test 1007 - .coverage-disable 1008 tags: 1009 - os:macos-x64 1010 variables: 1011 TEST_ARCH: arch-ci-osx-dbg 1012 ASAN_OPTIONS: log_path=stdout 1013 INIT_SCRIPT: .zprofile 1014 1015osx-xsdk-opt: 1016 extends: 1017 - .stage-3 1018 - .osx_test 1019 - .coverage-disable 1020 tags: 1021 - os:macos-x64 1022 variables: 1023 TEST_ARCH: arch-ci-osx-xsdk-opt 1024 INIT_SCRIPT: .zprofile 1025 1026# job for analyzing the coverage results and generating the various reports 1027coverage-analyze: 1028 extends: .test 1029 stage: stage-4 1030 tags: 1031 - gce-u22-short 1032 dependencies: 1033 # stage-2 1034 - linux-gcc-quad-64idx-dbg 1035 - linux-gcc-pkgs-opt 1036 - linux-gcc-complex-opt-32bit 1037 # stage-3 1038 - linux-pkgs-dbg 1039 - linux-matlab-ilp64 1040 - linux-cuda-pkgs 1041 - linux-cxx-cmplx-pkgs-64idx 1042 - linux-cuda-cmplx 1043 - linux-cuda-double-64idx 1044 - linux-cuda-uni-pkgs 1045 - linux-viennacl 1046 - linux-without-fc 1047 - linux-gcc-cxx-avx2 1048 - linux-clang-avx 1049 - linux-pkgs-cxx-mlib 1050 - linux-pkgs-valgrind 1051 - linux-nagfor 1052 - linux-xsdk-dbg 1053 - linux-opt-misc 1054 - linux-pkgs-64idx 1055 - linux-pkgs-opt 1056 - linux-64idx-i8 1057 - linux-gcc-ifc-cmplx 1058 - linux-opt-cxx-quad 1059 - linux-ILP64 1060 - linux-64idx-i8-uni 1061 variables: 1062 PYTHON: python3 1063 PETSC_ARCH: arch-ci-analyze-pipeline 1064 before_script: 1065 - date 1066 - hostname 1067 script: 1068 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 1069 - ${PYTHON} --version 1070 - gcovr --version 1071 - printf "PATH:$PATH\n" 1072 - printf "PYTHONPATH:$PYTHONPATH\n" 1073 - 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 1074 - ${PYTHON} ./configure --with-mpi=0 --with-cxx=0 --download-sowing --with-fortran-bindings 1075 - make mergegcov PETSC_GCOV_OPTIONS='--ci-mode --verbose' 1076 coverage: /^\s*lines:\s*\d+.\d+\%/ 1077 artifacts: 1078 name: "$CI_JOB_NAME" 1079 when: always 1080 paths: 1081 - arch-ci-analyze-pipeline/gcovr/* 1082 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1083 expire_in: 4 days 1084 reports: 1085 coverage_report: 1086 coverage_format: cobertura 1087 path: arch-ci-analyze-pipeline/gcovr/xml/*.xml 1088 1089# template for the coverage review jobs, these must be separate jobs as you cannot deploy multiple 1090# environments from one job... 1091.coverage-review: 1092 extends: .test 1093 stage: .post 1094 tags: 1095 - gce-u22-short 1096 dependencies: 1097 - coverage-analyze 1098 script: 1099 - date 1100 - hostname 1101 artifacts: 1102 name: "$CI_JOB_NAME" 1103 when: always 1104 paths: 1105 - arch-ci-analyze-pipeline/gcovr/* 1106 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1107 expire_in: 4 days 1108 1109coverage-total-review: 1110 extends: .coverage-review 1111 environment: 1112 name: coverage/all/$CI_COMMIT_REF_SLUG 1113 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html/report.html 1114 auto_stop_in: one week 1115 deployment_tier: testing 1116 1117coverage-untested-review: 1118 extends: .coverage-review 1119 environment: 1120 name: coverage/untested/$CI_COMMIT_REF_SLUG 1121 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 1122 auto_stop_in: one week 1123 deployment_tier: testing 1124 1125analyze-pipeline: 1126 extends: .coverage-review 1127 script: 1128 - date 1129 - hostname 1130 # This file is created by lib/petsc/bin/maint/gcov.py. If it exists then the CI 1131 # pipeline should fail 1132 - if [ -f ./arch-ci-analyze-pipeline/gcovr/.CI_FAIL ]; then 1133 cat ./arch-ci-analyze-pipeline/gcovr/merge_gcov_errors.log; 1134 exit 1; 1135 fi 1136 allow_failure: true 1137 1138# 1139# Base job for a documentation build (runs in venv to allow installing additional packages without root) 1140# 1141.docs: 1142 stage: stage-2 1143 tags: 1144 - linux-docs 1145 before_script: 1146 - git fetch --unshallow --no-tags origin +release:remotes/origin/release +main:remotes/origin/main 1147 - module --trace load python-3.11.2-gcc-9.4.0-6p2ktlj 1148 - printf "PATH:$PATH\n" 1149 - printf "PYTHONPATH:$PYTHONPATH\n" 1150 - VENV=venv-petsc-docs && 1151 python3 -m venv $VENV && 1152 . $VENV/bin/activate && 1153 cd doc && 1154 python3 -m pip install -r requirements.txt 1155 1156# 1157# Build documentation and make available for review using GitLab pages 1158# 1159docs-review: 1160 extends: 1161 - .docs 1162 - .test-basic 1163 script: 1164 - (time make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1165 - (time make latexpdf SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1166 - cp _build/latex/manual.pdf ../public/html/manual/ 1167 environment: 1168 name: review/$CI_COMMIT_REF_NAME 1169 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html 1170 auto_stop_in: one week 1171 deployment_tier: development 1172 artifacts: 1173 paths: 1174 - public 1175 expire_in: 4 days 1176 except: 1177 variables: 1178 - $PETSC_CI_SCHEDULED =~ /yes/ 1179 1180# 1181# Deploy documentation using GitLab pages 1182# 1183pages: # this job name has special meaning to GitLab 1184 extends: .docs 1185 interruptible: true 1186 script: 1187 - mkdir -p ../public/ && cp public/* ../public/ 1188 - (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) 1189 - git clean -fdxq && rm -rf images ../arch-classic-docs 1190 - (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) 1191 - rm -rf ../public/*/.doctrees 1192 only: 1193 variables: 1194 - $PETSC_CI_SCHEDULED == "yes" 1195 artifacts: 1196 paths: 1197 - public 1198 expire_in: 4 days 1199 1200# 1201# 1202# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 1203# that fail produce a warning, but do not block execution of a pipeline. 1204# 1205 1206.test-experimental: 1207 extends: .test 1208 allow_failure: true 1209 1210