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-2 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} ./src/sys ./src/vec ./src/mat ./src/tao" lint 831 - 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 ./src/ksp ./src/snes ./src/ts" lint 832 variables: 833 TEST_ARCH: arch-ci-linux-analyzer 834 LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config-14 --libdir`/libclang.so.1 --verbose 1 --werror 1" 835 artifacts: 836 paths: 837 - arch-*/lib/petsc/conf/*.log 838 - ./petscLintPatches/*.patch 839 expire_in: 4 days 840 except: 841 variables: 842 - $PETSC_CI_SCHEDULED =~ /yes/ 843 844linux-intel: 845 extends: 846 - .stage-3 847 - .linux_test_nofflags 848 - .coverage-disable 849 tags: 850 - gce-u22-stage3 851 variables: 852 TEST_ARCH: arch-ci-linux-intel 853 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 854 855linux-opt-misc: 856 extends: 857 - .stage-3 858 - .linux_test 859 tags: 860 - gce-u22-stage3, linux-fast 861 variables: 862 TEST_ARCH: arch-ci-linux-opt-misc 863 LOAD_MODULES: gcc/8.5.0 864 865linux-pkgs-64idx: 866 extends: 867 - .stage-3 868 - .linux_test 869 tags: 870 - gce-u22-stage3, linux-mcpu 871 variables: 872 TEST_ARCH: arch-ci-linux-pkgs-64idx 873 LOAD_MODULES: intel-oneapi-mkl/2022.0.2 874 875linux-64idx-i8: 876 extends: 877 - .stage-3 878 - .linux_test 879 tags: 880 - gce-u22-stage3, linux-mcpu 881 variables: 882 TEST_ARCH: arch-ci-linux-64idx-i8 883 884linux-gcc-ifc-cmplx: 885 extends: 886 - .stage-3 887 - .linux_test_nofflags 888 tags: 889 - gce-u22-stage3 890 variables: 891 TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx 892 LOAD_MODULES: intel-oneapi-compilers/2022.2.1 893 894linux-opt-cxx-quad: 895 extends: 896 - .stage-3 897 - .linux_test 898 tags: 899 - gce-u22-stage3 900 variables: 901 TEST_ARCH: arch-ci-linux-opt-cxx-quad 902 903linux-ILP64: 904 extends: 905 - .stage-3 906 - .linux_test 907 tags: 908 - gce-u22-stage3 909 variables: 910 TEST_ARCH: arch-ci-linux-ILP64 911 LOAD_MODULES: gcc/8.5.0 mpich/2-1.5-gcc-8.5.0 912 MAKE_CFLAGS: -Wno-discarded-qualifiers -Werror 913 914linux-64idx-i8-uni: 915 extends: 916 - .stage-3 917 - .linux_test 918 tags: 919 - gce-u22-stage3, linux-mcpu 920 variables: 921 TEST_ARCH: arch-ci-linux-64idx-i8-uni 922 923linux-misc-32bit: 924 extends: 925 - .stage-3 926 - .linux_test 927 tags: 928 - gce-u22-stage3 929 variables: 930 TEST_ARCH: arch-ci-linux-misc-32bit 931 932mswin-intel-cxx-cmplx: 933 extends: 934 - .stage-3 935 - .mswin_test 936 tags: 937 - mswin-stage3 938 variables: 939 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 940 941mswin-uni: 942 extends: 943 - .stage-3 944 - .mswin_test 945 tags: 946 - mswin-stage3 947 variables: 948 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 949 TEST_ARCH: arch-ci-mswin-uni 950 951mswin-gnu: 952 extends: 953 - .stage-3 954 - .mswin_test 955 tags: 956 - mswin-stage3 957 variables: 958 TEST_ARCH: arch-ci-mswin-gnu 959 MAKE_CFLAGS: -Werror 960 MAKE_CXXFLAGS: -Werror 961 MAKE_FFLAGS: -Werror 962 DISABLE_TESTS: 1 963 964#mswin-intel: 965# extends: 966# - .stage-3 967# - .mswin_test 968# tags: 969# - os:win 970# variables: 971# TEST_ARCH: arch-ci-mswin-intel 972 973osx-cxx-cmplx-pkgs-dbg: 974 extends: 975 - .stage-3 976 - .osx_test 977 - .coverage-disable 978 tags: 979 - os:macos-x64 980 variables: 981 TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg 982 INIT_SCRIPT: .zprofile 983 984osx-cxx-pkgs-opt: 985 extends: 986 - .stage-3 987 - .osx_test 988 tags: 989 - os:macos-x64 990 variables: 991 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 992 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 993 MAKE_CXXFLAGS: -Werror -Wno-pass-failed 994 INIT_SCRIPT: .zprofile 995 996osx-dbg: 997 extends: 998 - .stage-3 999 - .osx_test 1000 - .coverage-disable 1001 tags: 1002 - os:macos-x64 1003 variables: 1004 TEST_ARCH: arch-ci-osx-dbg 1005 ASAN_OPTIONS: log_path=stdout 1006 INIT_SCRIPT: .zprofile 1007 1008osx-xsdk-opt: 1009 extends: 1010 - .stage-3 1011 - .osx_test 1012 - .coverage-disable 1013 tags: 1014 - os:macos-x64 1015 variables: 1016 TEST_ARCH: arch-ci-osx-xsdk-opt 1017 INIT_SCRIPT: .zprofile 1018 1019# job for analyzing the coverage results and generating the various reports 1020coverage-analyze: 1021 extends: .test 1022 stage: stage-4 1023 tags: 1024 - gce-u22-short 1025 dependencies: 1026 # stage-2 1027 - linux-gcc-quad-64idx-dbg 1028 - linux-gcc-pkgs-opt 1029 - linux-gcc-complex-opt-32bit 1030 # stage-3 1031 - linux-pkgs-dbg 1032 - linux-matlab-ilp64 1033 - linux-cuda-pkgs 1034 - linux-cxx-cmplx-pkgs-64idx 1035 - linux-cuda-cmplx 1036 - linux-cuda-double-64idx 1037 - linux-cuda-uni-pkgs 1038 - linux-viennacl 1039 - linux-without-fc 1040 - linux-gcc-cxx-avx2 1041 - linux-clang-avx 1042 - linux-pkgs-cxx-mlib 1043 - linux-pkgs-valgrind 1044 - linux-nagfor 1045 - linux-xsdk-dbg 1046 - linux-opt-misc 1047 - linux-pkgs-64idx 1048 - linux-64idx-i8 1049 - linux-gcc-ifc-cmplx 1050 - linux-opt-cxx-quad 1051 - linux-ILP64 1052 - linux-64idx-i8-uni 1053 - osx-cxx-pkgs-opt 1054 variables: 1055 PYTHON: python3 1056 PETSC_ARCH: arch-ci-analyze-pipeline 1057 before_script: 1058 - date 1059 - hostname 1060 script: 1061 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 1062 - ${PYTHON} --version 1063 - gcovr --version 1064 - printf "PATH:$PATH\n" 1065 - printf "PYTHONPATH:$PYTHONPATH\n" 1066 - 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 1067 - ${PYTHON} ./configure --with-mpi=0 --with-cxx=0 --download-sowing --with-fortran-bindings 1068 - make mergegcov PETSC_GCOV_OPTIONS='--ci-mode --verbose' 1069 coverage: /^\s*lines:\s*\d+.\d+\%/ 1070 artifacts: 1071 name: "$CI_JOB_NAME" 1072 when: always 1073 paths: 1074 - arch-ci-analyze-pipeline/gcovr/* 1075 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1076 expire_in: 4 days 1077 reports: 1078 coverage_report: 1079 coverage_format: cobertura 1080 path: arch-ci-analyze-pipeline/gcovr/xml/*.xml 1081 1082# template for the coverage review jobs, these must be separate jobs as you cannot deploy multiple 1083# environments from one job... 1084.coverage-review: 1085 extends: .test 1086 stage: .post 1087 tags: 1088 - gce-u22-short 1089 dependencies: 1090 - coverage-analyze 1091 script: 1092 - date 1093 - hostname 1094 artifacts: 1095 name: "$CI_JOB_NAME" 1096 when: always 1097 paths: 1098 - arch-ci-analyze-pipeline/gcovr/* 1099 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1100 expire_in: 4 days 1101 1102coverage-total-review: 1103 extends: .coverage-review 1104 environment: 1105 name: coverage/all/$CI_COMMIT_REF_SLUG 1106 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html/report.html 1107 auto_stop_in: one week 1108 deployment_tier: testing 1109 1110coverage-untested-review: 1111 extends: .coverage-review 1112 environment: 1113 name: coverage/untested/$CI_COMMIT_REF_SLUG 1114 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 1115 auto_stop_in: one week 1116 deployment_tier: testing 1117 1118analyze-pipeline: 1119 extends: .coverage-review 1120 script: 1121 - date 1122 - hostname 1123 # This file is created by lib/petsc/bin/maint/gcov.py. If it exists then the CI 1124 # pipeline should fail 1125 - if [ -f ./arch-ci-analyze-pipeline/gcovr/.CI_FAIL ]; then 1126 cat ./arch-ci-analyze-pipeline/gcovr/merge_gcov_errors.log; 1127 exit 1; 1128 fi 1129 allow_failure: true 1130 1131# 1132# Base job for a documentation build (runs in venv to allow installing additional packages without root) 1133# 1134.docs: 1135 stage: stage-2 1136 tags: 1137 - linux-docs 1138 before_script: 1139 - git fetch --unshallow --no-tags origin +release:remotes/origin/release +main:remotes/origin/main 1140 - module --trace load python-3.11.2-gcc-9.4.0-6p2ktlj 1141 - printf "PATH:$PATH\n" 1142 - printf "PYTHONPATH:$PYTHONPATH\n" 1143 - VENV=venv-petsc-docs && 1144 python3 -m venv $VENV && 1145 . $VENV/bin/activate && 1146 cd doc && 1147 python3 -m pip install -r requirements.txt 1148 1149# 1150# Build documentation and make available for review using GitLab pages 1151# 1152docs-review: 1153 extends: 1154 - .docs 1155 - .test-basic 1156 script: 1157 - (time make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1158 - (time make latexpdf SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1159 - cp _build/latex/manual.pdf ../public/html/manual/ 1160 environment: 1161 name: review/$CI_COMMIT_REF_NAME 1162 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html 1163 auto_stop_in: one week 1164 deployment_tier: development 1165 artifacts: 1166 paths: 1167 - public 1168 expire_in: 4 days 1169 except: 1170 variables: 1171 - $PETSC_CI_SCHEDULED =~ /yes/ 1172 1173# 1174# Deploy documentation using GitLab pages 1175# 1176pages: # this job name has special meaning to GitLab 1177 extends: .docs 1178 interruptible: true 1179 script: 1180 - mkdir -p ../public/ && cp public/* ../public/ 1181 - (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) 1182 - git clean -fdxq && rm -rf images ../arch-classic-docs 1183 - (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) 1184 - rm -rf ../public/*/.doctrees 1185 only: 1186 variables: 1187 - $PETSC_CI_SCHEDULED == "yes" 1188 artifacts: 1189 paths: 1190 - public 1191 expire_in: 4 days 1192 1193# 1194# 1195# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 1196# that fail produce a warning, but do not block execution of a pipeline. 1197# 1198 1199.test-experimental: 1200 extends: .test 1201 allow_failure: true 1202 1203