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