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 # gcovr is not on si 642 - .coverage-disable 643 tags: 644 - name:si 645 variables: 646 FLEXIBLAS: netlib 647 TEST_ARCH: arch-ci-linux-cmplx-single 648 649linux-gcc-cxx-avx2: 650 extends: 651 - .stage-3 652 - .linux_test 653 tags: 654 - name:petsc-knl-01 655 variables: 656 TEST_ARCH: arch-ci-linux-gcc-cxx-avx2 657 658linux-clang-avx: 659 extends: 660 - .stage-3 661 - .linux_test 662 tags: 663 - name:petsc-knl-01 664 variables: 665 TEST_ARCH: arch-ci-linux-clang-avx 666 667linux-knl: 668 extends: 669 - .stage-3 670 - .linux_test 671 - .coverage-disable 672 tags: 673 - name:petsc-knl-01 674 variables: 675 MAKE_FFLAGS: -warn errors 676 TEST_ARCH: arch-ci-linux-knl 677 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 678 679linux-intel-mkl-single: 680 extends: 681 - .stage-3 682 - .linux_test_nofflags 683 - .coverage-disable 684 tags: 685 - name:petsc-knl-01 686 variables: 687 TEST_ARCH: arch-ci-linux-intel-mkl-single 688 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 689 690linux-cxx-cmplx-pkgs-64idx: 691 extends: 692 - .stage-3 693 - .linux_test 694 tags: 695 - gce-u22-stage3 696 variables: 697 TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx 698 PETSC_OPTIONS: -fp_trap 699 700# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings 701linux-pkgs-dbg-ftn-interfaces: 702 extends: 703 - .stage-3 704 - .linux_test 705 - .coverage-disable 706 tags: 707 - gce-u22-stage3 708 variables: 709 TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces 710 OMP_PROC_BIND: "false" 711 OMP_NUM_THREADS: 4 712 PETSC_OPTIONS: -fp_trap 713 714linux-pkgs-cxx-mlib: 715 extends: 716 - .stage-3 717 - .linux_test 718 tags: 719 - gce-u22-stage3 720 variables: 721 TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib 722 PETSC_OPTIONS: -fp_trap 723 except: 724 variables: 725 - $PETSC_CI_SCHEDULED =~ /yes/ 726 727linux-pkgs-valgrind: 728 extends: 729 - .stage-3 730 - .linux_test 731 tags: 732 - gce-valgrind 733 variables: 734 TEST_ARCH: arch-ci-linux-pkgs-valgrind 735 TIMEOUT: 7200 736 737linux-pkgs-opt: 738 extends: 739 - .stage-3 740 - .linux_test 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/ts ./src/snes ./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" 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 - .coverage-disable 989 tags: 990 - os:macos-x64 991 variables: 992 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 993 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 994 MAKE_CXXFLAGS: -Werror -Wno-pass-failed 995 INIT_SCRIPT: .zprofile 996 997osx-dbg: 998 extends: 999 - .stage-3 1000 - .osx_test 1001 - .coverage-disable 1002 tags: 1003 - os:macos-x64 1004 variables: 1005 TEST_ARCH: arch-ci-osx-dbg 1006 ASAN_OPTIONS: log_path=stdout 1007 INIT_SCRIPT: .zprofile 1008 1009osx-xsdk-opt: 1010 extends: 1011 - .stage-3 1012 - .osx_test 1013 - .coverage-disable 1014 tags: 1015 - os:macos-x64 1016 variables: 1017 TEST_ARCH: arch-ci-osx-xsdk-opt 1018 INIT_SCRIPT: .zprofile 1019 1020# job for analyzing the coverage results and generating the various reports 1021coverage-analyze: 1022 extends: .test 1023 stage: stage-4 1024 tags: 1025 - gce-u22-short 1026 dependencies: 1027 # stage-2 1028 - linux-gcc-quad-64idx-dbg 1029 - linux-gcc-pkgs-opt 1030 - linux-gcc-complex-opt-32bit 1031 # stage-3 1032 - linux-pkgs-dbg 1033 - linux-matlab-ilp64 1034 - linux-cuda-pkgs 1035 - linux-cxx-cmplx-pkgs-64idx 1036 - linux-cuda-cmplx 1037 - linux-cuda-double-64idx 1038 - linux-cuda-uni-pkgs 1039 - linux-viennacl 1040 - linux-without-fc 1041 - linux-gcc-cxx-avx2 1042 - linux-clang-avx 1043 - linux-pkgs-cxx-mlib 1044 - linux-pkgs-valgrind 1045 - linux-nagfor 1046 - linux-xsdk-dbg 1047 - linux-opt-misc 1048 - linux-pkgs-64idx 1049 - linux-pkgs-opt 1050 - linux-64idx-i8 1051 - linux-gcc-ifc-cmplx 1052 - linux-opt-cxx-quad 1053 - linux-ILP64 1054 - linux-64idx-i8-uni 1055 variables: 1056 PYTHON: python3 1057 PETSC_ARCH: arch-ci-analyze-pipeline 1058 before_script: 1059 - date 1060 - hostname 1061 script: 1062 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 1063 - ${PYTHON} --version 1064 - gcovr --version 1065 - printf "PATH:$PATH\n" 1066 - printf "PYTHONPATH:$PYTHONPATH\n" 1067 - 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 1068 - ${PYTHON} ./configure --with-mpi=0 --with-cxx=0 --download-sowing --with-fortran-bindings 1069 - make mergegcov PETSC_GCOV_OPTIONS='--ci-mode --verbose' 1070 coverage: /^\s*lines:\s*\d+.\d+\%/ 1071 artifacts: 1072 name: "$CI_JOB_NAME" 1073 when: always 1074 paths: 1075 - arch-ci-analyze-pipeline/gcovr/* 1076 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1077 expire_in: 4 days 1078 reports: 1079 coverage_report: 1080 coverage_format: cobertura 1081 path: arch-ci-analyze-pipeline/gcovr/xml/*.xml 1082 1083# template for the coverage review jobs, these must be separate jobs as you cannot deploy multiple 1084# environments from one job... 1085.coverage-review: 1086 extends: .test 1087 stage: .post 1088 tags: 1089 - gce-u22-short 1090 dependencies: 1091 - coverage-analyze 1092 script: 1093 - date 1094 - hostname 1095 artifacts: 1096 name: "$CI_JOB_NAME" 1097 when: always 1098 paths: 1099 - arch-ci-analyze-pipeline/gcovr/* 1100 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1101 expire_in: 4 days 1102 1103coverage-total-review: 1104 extends: .coverage-review 1105 environment: 1106 name: coverage/all/$CI_COMMIT_REF_SLUG 1107 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html/report.html 1108 auto_stop_in: one week 1109 deployment_tier: testing 1110 1111coverage-untested-review: 1112 extends: .coverage-review 1113 environment: 1114 name: coverage/untested/$CI_COMMIT_REF_SLUG 1115 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html_untested/report_untested.html 1116 auto_stop_in: one week 1117 deployment_tier: testing 1118 1119analyze-pipeline: 1120 extends: .coverage-review 1121 script: 1122 - date 1123 - hostname 1124 # This file is created by lib/petsc/bin/maint/gcov.py. If it exists then the CI 1125 # pipeline should fail 1126 - if [ -f ./arch-ci-analyze-pipeline/gcovr/.CI_FAIL ]; then 1127 cat ./arch-ci-analyze-pipeline/gcovr/merge_gcov_errors.log; 1128 exit 1; 1129 fi 1130 allow_failure: true 1131 1132# 1133# Base job for a documentation build (runs in venv to allow installing additional packages without root) 1134# 1135.docs: 1136 stage: stage-2 1137 tags: 1138 - linux-docs 1139 before_script: 1140 - git fetch --unshallow --no-tags origin +release:remotes/origin/release +main:remotes/origin/main 1141 - module --trace load python-3.11.2-gcc-9.4.0-6p2ktlj 1142 - printf "PATH:$PATH\n" 1143 - printf "PYTHONPATH:$PYTHONPATH\n" 1144 - VENV=venv-petsc-docs && 1145 python3 -m venv $VENV && 1146 . $VENV/bin/activate && 1147 cd doc && 1148 python3 -m pip install -r requirements.txt 1149 1150# 1151# Build documentation and make available for review using GitLab pages 1152# 1153docs-review: 1154 extends: 1155 - .docs 1156 - .test-basic 1157 script: 1158 - (time make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1159 - (time make latexpdf SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1160 - cp _build/latex/manual.pdf ../public/html/manual/ 1161 environment: 1162 name: review/$CI_COMMIT_REF_NAME 1163 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html 1164 auto_stop_in: one week 1165 deployment_tier: development 1166 artifacts: 1167 paths: 1168 - public 1169 expire_in: 4 days 1170 except: 1171 variables: 1172 - $PETSC_CI_SCHEDULED =~ /yes/ 1173 1174# 1175# Deploy documentation using GitLab pages 1176# 1177pages: # this job name has special meaning to GitLab 1178 extends: .docs 1179 interruptible: true 1180 script: 1181 - mkdir -p ../public/ && cp public/* ../public/ 1182 - (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) 1183 - git clean -fdxq && rm -rf images ../arch-classic-docs 1184 - (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) 1185 - rm -rf ../public/*/.doctrees 1186 only: 1187 variables: 1188 - $PETSC_CI_SCHEDULED == "yes" 1189 artifacts: 1190 paths: 1191 - public 1192 expire_in: 4 days 1193 1194# 1195# 1196# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 1197# that fail produce a warning, but do not block execution of a pipeline. 1198# 1199 1200.test-experimental: 1201 extends: .test 1202 allow_failure: true 1203 1204