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