xref: /petsc/.gitlab-ci.yml (revision 7efe37a1cedd385a2f501b843d47cdf14dfb49ea)
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
16variables:
17  GIT_STRATEGY: fetch
18  GIT_CLEAN_FLAGS: -ffdxq
19  PETSC_OPTIONS:  -checkfunctionlist
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#  This provides the basic order of operations and options template for cloud based stage 1 tests.
55#  Not all test-short need to follow this template but most will.
56#
57
58.stage-1:
59  extends: .test
60  stage: stage-1
61  tags:
62    - gce-u22-stage1
63  before_script:
64    - date
65    - hostname
66    - grep PRETTY_NAME /etc/os-release
67    - nproc
68    - lscpu
69    - ccache --zero-stats
70    - printf "CONFIG_OPTS:${CONFIG_OPTS}\n"
71    - printf "PYTHON:${PYTHON}\n"
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}"; source ${INIT_SCRIPT}; fi
74  script:
75    - printf "PATH:$PATH\n"
76    - printf "PYTHONPATH:$PYTHONPATH\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='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS}
80    - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}"
81    - make CFLAGS="${MAKE_TEST_CFLAGS}" CXXFLAGS="${MAKE_TEST_CXXFLAGS}" FFLAGS="${MAKE_TEST_FFLAGS}" allgtests-tap gmakesearch="${TEST_SEARCH}" TIMEOUT=${TIMEOUT}
82  variables:
83    PYTHON: python3
84    MAKE_CFLAGS: -Werror
85    MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant
86    MAKE_FFLAGS: -Werror
87    MAKE_TEST_CFLAGS: -Werror
88    MAKE_TEST_CXXFLAGS: -Werror
89    MAKE_TEST_FFLAGS: -Werror
90  after_script:
91    - date
92    - ccache --show-stats
93  artifacts:
94    reports:
95      junit: arch-*/tests/testresults.xml
96    name: "$CI_JOB_NAME"
97    when: always
98    paths:
99    - arch-*/lib/petsc/conf/*.log
100    - arch-*/lib/pkgconfig/petsc.pc
101    - arch-*/tests/testresults.xml
102    - arch-*/tests/test_*_tap.log
103    - arch-*/tests/test_*_err.log
104    expire_in: 4 days
105
106#
107# The following tests run on the cloud as part of stage-1.
108#
109
110ompi-cuda:
111  extends: .stage-1
112  tags:
113  - cuda-stage1
114  variables:
115    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-fc=0
116    TEST_SEARCH: snes_tutorials-ex19_cuda%
117    MAKE_CXXFLAGS: -Werror
118
119mpich-cxx-py3:
120  extends: .stage-1
121  variables:
122    CONFIG_OPTS: --with-clanguage=cxx --with-fc=0 CXXFLAGS=-std=c++11
123    TEST_SEARCH: snes_tutorials-ex48%
124    LOAD_MODULES: gcc/12.1.0 mpich/4.1a1-gcc-12.1.0
125
126uni-complex-float-int64:
127  extends: .stage-1
128  variables:
129    CONFIG_OPTS: --with-mpi=0 --with-scalar-type=complex --with-precision=single --with-64-bit-indices
130    TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_%
131    LOAD_MODULES: gcc/12.1.0 mpich/4.1a1-gcc-12.1.0
132
133c99-mlib-static-py:
134  extends: .stage-1
135  variables:
136    CONFIG_OPTS: --with-single-library=0 --with-shared-libraries=0 CFLAGS=-std=c99
137    TEST_SEARCH: snes_tutorials-ex19% snes_tutorials-ex5f90t%
138    MAKE_TEST_FFLAGS: -Werror -std=f2008
139    LOAD_MODULES: gcc/12.1.0 mpich/4.1a1-gcc-12.1.0
140
141petsc4py-install:
142  extends: .stage-2
143  tags:
144    - gce-stage2
145  variables:
146    PYTHON: python3
147    T_PREFIX: petsc-install
148    T_DESTDIR: petsc-destdir
149    T_PETSC4PY: src/binding/petsc4py
150    T_VALIDATE_CMD: lib/petsc/bin/maint/validate-petsc4py.sh
151  script:
152    - printf "PATH:$PATH\n"
153    - mkdir hide
154    - 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
155    - ${PYTHON} ./configure --prefix="${PWD}/${T_PREFIX}" --with-petsc4py=1 --with-debugging=0
156    - make CFLAGS=-Werror CXXFLAGS="-Werror -Wzero-as-null-pointer-constant" FFLAGS=-Werror
157    - printf "====== Test A. Install into staging directory then into prefix directory (mimics distro package recipe) =====\n"
158    - make install DESTDIR="${PWD}/${T_DESTDIR}"
159    - test "$(find ${PWD}/${T_PREFIX} -mindepth 1 | wc -l)" -eq 0
160    - test "$(find ${PWD}/${T_DESTDIR} -mindepth 1 | wc -l)" -gt 0
161    - (cd "${PWD}/${T_DESTDIR}" && find * -exec install -v -D "{}" "/{}" \; )
162    - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./
163    - rm -r "${PWD}/${T_PREFIX}" "${PWD}/${T_DESTDIR}" && mkdir "${PWD}/${T_PREFIX}"
164    - printf "====== Test B. Install directly into prefix directory =====\n"
165    - make install
166    - test "$(find ${PWD}/${T_PREFIX} -mindepth 1 | wc -l)" -gt 0
167    - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./
168    - rm -r "${PWD}/${T_PREFIX}"/*/petsc4py*
169    - printf "====== Test C. Install manually with setuptools =====\n"
170    - export PETSC_DIR="${PWD}/${T_PREFIX}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py build)
171    - export PETSC_DIR="${PWD}/${T_PREFIX}" P="${PWD}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py install --install-lib="${P}/${T_PREFIX}/lib")
172    - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./
173    - rm -r "${PWD}/${T_PREFIX}"/*/petsc4py*
174    - printf "====== Test D. Install manually with setuptools with staging =====\n"
175    - 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")
176    - (cd "${PWD}/${T_DESTDIR}" && find * -exec install -v -D "{}" "/{}" \; )
177    - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./
178
179petsc4py-pip:
180  extends: .stage-2
181  tags:
182    - gce-stage2
183  variables:
184    PETSC_CONFIGURE_OPTIONS: --with-mpi=0 --with-fc=0
185    CFLAGS: -O0
186  script:
187    - python3 -m venv pip-builds
188    - source pip-builds/bin/activate
189    - python3 -m pip install --upgrade pip
190    - python3 -m pip install .
191    - python3 -m pip install src/binding/petsc4py
192    - python3 -m petsc4py
193
194checksource:
195  extends: .test-basic
196  stage: .pre
197  tags:
198    - gce-u22-stage1
199  script:
200    - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0
201    - vermin --version
202    - make vermin
203    - PATH=/nfs/gce/projects/petsc/soft/u22.04/spack/opt/spack/linux-ubuntu22.04-ivybridge/gcc-11.2.0/llvm-15.0.0-m7mrrtynenjytkmiib2moeqk6kfcifmv/bin:$PATH make checkclangformat SHELL=bash
204    - make checkbadSource SHELL=bash
205    - make checkbadFileChange SHELL=bash
206    - make -f gmakefile check_output SHELL=bash
207    - make check_petsc4py_rst
208  artifacts:
209    name: "$CI_JOB_NAME"
210    when: always
211    paths:
212    - arch-*/lib/petsc/conf/*.patch
213    - arch-*/lib/petsc/conf/*.log
214    expire_in: 4 days
215
216pause-for-approval:
217  extends: .test
218  stage: .pre
219  tags:
220    - gce-stage1
221  only:
222    refs:
223      - merge_requests
224    variables:
225      - $CI_MERGE_REQUEST_EVENT_TYPE == "merged_result"
226      - $CI_MERGE_REQUEST_EVENT_TYPE == "detached"
227  script:
228    - echo "pause-for-approval has no script to run"
229  variables:
230    GIT_STRATEGY: none
231  when: manual
232  allow_failure: false
233
234#
235# This provides the basic order of operations and options template for stage-2,3 tests.
236# Not all stage-2,3 need to follow this template, but most will.
237#
238.stage-23:
239  extends: .test
240  script:
241    - if [ -d ${HOME}/petsc-hash-pkgs/ ]; then find ${HOME}/petsc-hash-pkgs/ -maxdepth 1 -mindepth 1 -type d -mtime +25 -exec rm -rf {} \; ; fi
242    - printf "PATH:$PATH\n"
243    - printf "PYTHONPATH:$PYTHONPATH\n"
244    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
245    - 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
246    - printf "./config/examples/${TEST_ARCH}.py\n"
247    - cat ./config/examples/${TEST_ARCH}.py
248    - ./config/examples/${TEST_ARCH}.py
249    - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}"
250    - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" check
251    - make updatedatafiles
252    - 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
253    - if [ -z ${DISABLE_TESTS+x} ]; then make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" cleantest allgtests-tap TIMEOUT=${TIMEOUT}  ${TEST_OPTS}; fi
254    - if [ ! -z ${RUN_GCOV+x} ]; then make gcov; fi
255  artifacts:
256    reports:
257      junit: ${TEST_ARCH}/tests/testresults.xml
258    name: "$CI_JOB_NAME"
259    when: always
260    paths:
261    - ${TEST_ARCH}/lib/petsc/conf/*.log
262    - ${TEST_ARCH}/lib/pkgconfig/petsc.pc
263    - ${TEST_ARCH}/tests/testresults.xml
264    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log
265    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log
266    - ${TEST_ARCH}/gcov.tar.gz
267    expire_in: 4 days
268  variables:
269    OPENBLAS_NUM_THREADS: 1
270
271.stage-2:
272  extends: .stage-23
273  stage: stage-2
274
275.stage-3:
276  extends: .stage-23
277  stage: stage-3
278
279#
280# The following provide templates for various OSes for pre/post info
281#
282
283.linux_test_noflags:
284  before_script:
285    - date
286    - hostname
287    - grep PRETTY_NAME /etc/os-release
288    - nproc
289    - lscpu
290    - ccache --zero-stats
291    - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi
292    - if [ ! -z ${INIT_SCRIPT+x} ]; then echo "sourcing ${INIT_SCRIPT}"; source ${INIT_SCRIPT}; fi
293  after_script:
294    - date
295    - ccache --show-stats
296
297.linux_test_nofflags:
298  extends: .linux_test_noflags
299  variables:
300    MAKE_CFLAGS: -Werror
301    MAKE_CXXFLAGS: -Werror
302
303.linux_test:
304  extends: .linux_test_noflags
305  variables:
306    MAKE_CFLAGS: -Werror
307    MAKE_CXXFLAGS: -Werror
308    MAKE_FFLAGS: -Werror
309
310.freebsd_test:
311  variables:
312    MAKE_CFLAGS: -Werror
313    MAKE_CXXFLAGS: -Werror
314    MAKE_FFLAGS: -Werror
315  before_script:
316    - date
317    - hostname
318    - freebsd-version
319    - echo $(sysctl -n hw.ncpu)
320    - ccache --zero-stats
321  after_script:
322    - date
323    - ccache --show-stats
324
325.osx_test:
326  variables:
327    MAKE_CFLAGS: -Werror
328    MAKE_CXXFLAGS: -Werror
329    MAKE_FFLAGS: -Werror
330  before_script:
331    - date
332    - hostname
333    - sw_vers -productVersion
334    - echo $(sysctl -n hw.ncpu)
335    - ccache --zero-stats
336    - if [ ! -z ${INIT_SCRIPT+x} ]; then echo "sourcing ${INIT_SCRIPT}"; source ${INIT_SCRIPT}; fi
337  after_script:
338    - date
339    - ccache --show-stats
340
341.opensolaris_test:
342  before_script:
343    - date
344    - hostname
345    - uname -a
346    - nproc
347    - isainfo -x
348  after_script:
349    - date
350
351.mswin_test:
352  before_script:
353    - date
354    - hostname
355    - uname -a
356    - nproc
357  after_script:
358    - date
359
360#
361# The following tests run as part of stage-2.
362#
363# The tags variable used in the tests below connects the particular test with the runners
364# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd.
365# For example the test linux-sycl-double any runner that has the tags 'gce-nfs, linux-fast'
366# (in a blue box beneath it)
367#
368
369osx-m1:
370  extends:
371    - .stage-3
372    - .osx_test
373  tags:
374    - os:macos-m1
375  variables:
376    TEST_ARCH: arch-ci-osx-m1
377    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump
378    INIT_SCRIPT: /Volumes/Scratch/svcpetsc/soft/py3venv/cython3setup.sh
379
380freebsd-cxx-cmplx-64idx-dbg:
381  extends:
382    - .stage-2
383    - .freebsd_test
384  tags:
385    - os:fbsd
386  variables:
387    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg
388
389freebsd-c-single-opt:
390  extends:
391    - .stage-2
392    - .freebsd_test
393  tags:
394    - os:fbsd
395  variables:
396    TEST_ARCH: arch-ci-freebsd-c-single-opt
397
398mswin-opt-impi:
399  extends:
400    - .stage-3
401    - .mswin_test
402  tags:
403    - mswin-stage3
404  variables:
405    TEST_ARCH: arch-ci-mswin-opt-impi
406    TEST_OPTS: search='ksp_ksp_tests*'
407
408linux-gcc-quad-64idx-dbg:
409  extends:
410    - .stage-2
411    - .linux_test
412  tags:
413    - gce-stage2
414  variables:
415    TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg
416
417linux-gcc-pkgs-opt:
418  extends:
419    - .stage-2
420    - .linux_test
421  tags:
422    - gce-stage2
423  variables:
424    TEST_ARCH: arch-ci-linux-gcc-pkgs-opt
425
426linux-gcc-complex-opt-32bit:
427  extends:
428    - .stage-2
429    - .linux_test
430  tags:
431    - gce-stage2
432  variables:
433    TEST_ARCH: arch-ci-linux-gcc-complex-opt-32bit
434
435#
436# The following tests run as part of stage-3.
437#
438
439freebsd-cxx-cmplx-pkgs-dbg:
440  extends:
441    - .stage-3
442    - .freebsd_test
443  tags:
444    - os:fbsd
445  variables:
446    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
447
448freebsd-cxx-pkgs-opt:
449  extends:
450    - .stage-3
451    - .freebsd_test
452  tags:
453    - os:fbsd
454  variables:
455    PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false -checkfunctionlist
456    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
457
458freebsd-pkgs-opt:
459  extends:
460    - .stage-3
461    - .freebsd_test
462  tags:
463    - os:fbsd
464  variables:
465    TEST_ARCH: arch-ci-freebsd-pkgs-opt
466
467linux-hip-double:
468  extends:
469    - .stage-3
470    - .linux_test_noflags
471  tags:
472    - gpu:amd, os:linux
473  variables:
474    TEST_ARCH: arch-ci-linux-hip-double
475
476linux-sycl-double:
477  extends:
478    - .stage-3
479    - .linux_test_noflags
480  tags:
481    - gce-nfs, linux-fast
482  variables:
483    TEST_ARCH: arch-ci-linux-sycl-double
484    LOAD_MODULES: compiler/latest mpi/latest cmake/3.20.5-yjp2hz6
485    TEST_OPTS: query=requires queryval=kokkos_kernels
486
487linux-cuda-pkgs:
488  extends:
489    - .stage-3
490    - .linux_test
491  tags:
492    - cuda-stage3
493  variables:
494    TEST_ARCH: arch-ci-linux-cuda-pkgs
495    TEST_OPTS: -j3 query=requires queryval=cuda
496
497linux-cuda112-omp:
498  extends:
499    - .stage-3
500    - .linux_test
501  tags:
502    - cuda-stage3
503  variables:
504    TEST_ARCH: arch-ci-linux-cuda112-omp
505    TEST_OPTS: -j4 query=requires queryval=kokkos_kernels
506    LOAD_MODULES: cuda/11.2.2 u-gcc-9/9.4.0
507    OMP_PROC_BIND: "false"
508    OMP_NUM_THREADS: 1
509
510linux-cuda-cmplx:
511  extends:
512    - .stage-3
513    - .linux_test
514  tags:
515    - cuda-stage3
516  variables:
517    TEST_ARCH: arch-ci-linux-cuda-cmplx
518
519linux-cuda-double-64idx:
520  extends:
521    - .stage-3
522    - .linux_test
523  tags:
524    - cuda-stage3
525  variables:
526    TEST_ARCH: arch-ci-linux-cuda-double-64idx
527    TEST_OPTS: -j15 query=requires queryval=cuda
528
529linux-cuda-single-cxx:
530  extends:
531    - .stage-3
532    - .linux_test_noflags
533  tags:
534    - cuda-stage3
535  variables:
536    TEST_ARCH: arch-ci-linux-cuda-single-cxx
537    LOAD_MODULES: nvhpc/22.3
538    TEST_OPTS: -j15 query=requires queryval=cuda
539
540linux-cuda-uni-pkgs:
541  extends:
542    - .stage-3
543    - .linux_test
544  tags:
545    - cuda-stage3
546  variables:
547    TEST_ARCH: arch-ci-linux-cuda-uni-pkgs
548    TEST_OPTS: -j20 query=requires queryval=cuda
549
550linux-viennacl:
551  extends:
552    - .stage-3
553    - .linux_test
554  tags:
555    - cuda-stage3
556  variables:
557    TEST_ARCH: arch-ci-linux-viennacl
558    MAKE_CXXFLAGS: -Werror -Wno-ignored-attributes
559    TEST_OPTS: -j20 query=requires queryval=viennacl
560
561linux-without-fc:
562  extends:
563    - .stage-3
564    - .linux_test
565  tags:
566    - gce-nfs
567  variables:
568    TEST_ARCH: arch-ci-linux-without-fc
569
570linux-cmplx-single:
571  extends:
572    - .stage-3
573    - .linux_test
574  tags:
575    - name:si
576  variables:
577    FLEXIBLAS: netlib
578    TEST_ARCH: arch-ci-linux-cmplx-single
579
580linux-gcc-cxx-avx2:
581  extends:
582    - .stage-3
583    - .linux_test
584  tags:
585    - name:petsc-knl-01
586  variables:
587    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
588
589linux-clang-avx:
590  extends:
591    - .stage-3
592    - .linux_test
593  tags:
594    - name:petsc-knl-01
595  variables:
596    TEST_ARCH: arch-ci-linux-clang-avx
597
598linux-knl:
599  extends:
600    - .stage-3
601    - .linux_test
602  tags:
603    - name:petsc-knl-01
604  variables:
605    MAKE_FFLAGS: -warn errors
606    TEST_ARCH: arch-ci-linux-knl
607    LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1
608
609linux-intel-mkl-single:
610  extends:
611    - .stage-3
612    - .linux_test_nofflags
613  tags:
614    - name:petsc-knl-01
615  variables:
616    TEST_ARCH: arch-ci-linux-intel-mkl-single
617    LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1
618
619linux-cxx-cmplx-pkgs-64idx:
620  extends:
621    - .stage-3
622    - .linux_test
623  tags:
624    - gce-nfs
625  variables:
626    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
627    LOAD_MODULES: llvm/9.0.0-7fyffox gcc/8.3.0-fjpc5ys cmake/3.14.2-rl3q676
628
629# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings
630linux-pkgs-dbg-ftn-interfaces:
631  extends:
632    - .stage-3
633    - .linux_test
634  tags:
635    - gce-nfs
636  variables:
637    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
638    LOAD_MODULES: cmake/3.20.5-yjp2hz6
639    OMP_PROC_BIND: "false"
640    OMP_NUM_THREADS: 4
641
642linux-pkgs-cxx-mlib:
643  extends:
644    - .stage-3
645    - .linux_test
646  tags:
647    - gce-u22-stage3
648  variables:
649    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
650
651linux-pkgs-valgrind:
652  extends:
653    - .stage-3
654    - .linux_test
655  tags:
656    - gce-valgrind
657  variables:
658    TEST_ARCH: arch-ci-linux-pkgs-valgrind
659    TIMEOUT: 7200
660
661linux-pkgs-opt:
662  extends:
663    - .stage-3
664    - .linux_test
665  tags:
666    - gce-nfs, linux-fast
667  variables:
668    TEST_ARCH: arch-ci-linux-pkgs-opt
669    LOAD_MODULES: gcc/10.1.0-5hiqhdh
670
671linux-pkgs-gcov:
672  extends:
673    - .stage-3
674    - .linux_test
675  tags:
676    - gce-nfs, linux-gcov
677  variables:
678    TEST_ARCH: arch-ci-linux-pkgs-gcov
679    RUN_GCOV: 1
680
681linux-cmplx-gcov:
682  extends:
683    - .stage-3
684    - .linux_test
685  tags:
686    - gce-nfs, linux-gcov
687  variables:
688    PETSC_OPTIONS:  -vecscatter_mpi1 false -options_left false -checkfunctionlist
689    TEST_ARCH: arch-ci-linux-cmplx-gcov
690    LOAD_MODULES: gcc/8.3.0-fjpc5ys
691    RUN_GCOV: 1
692
693linux-matlab-ilp64-gcov:
694  extends:
695    - .stage-3
696    - .linux_test
697  tags:
698    - gce-nfs, linux-gcov
699  variables:
700    TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov
701    LOAD_MODULES: matlab/R2018a
702    RUN_GCOV: 1
703  allow_failure: true
704
705linux-gcov:
706  extends:
707    - .stage-3
708    - .linux_test
709  tags:
710    - gce-nfs, linux-gcov
711  variables:
712    TEST_ARCH: arch-ci-linux-gcov
713    RUN_GCOV: 1
714
715linux-pgi:
716  extends:
717    - .stage-3
718    - .linux_test_noflags
719  tags:
720    - gce-nfs, linux-mcpu
721  variables:
722    TEST_ARCH: arch-ci-linux-pgi
723    LOAD_MODULES: hpc_sdk/20.9
724
725# If the Nag license server fails then ${PETSC_DIR}/naglicenseproblem is created and the job is marked as failed but allow_failure
726linux-nagfor:
727  extends:
728    - .stage-3
729    - .linux_test_nofflags
730  tags:
731    - gce-nfs, linux-mcpu
732  script:
733    - rm -f naglicenseproblem
734    - printf "PATH:$PATH\n"
735    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
736    - 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
737    - printf "./config/examples/${TEST_ARCH}.py\n"
738    - cat ./config/examples/${TEST_ARCH}.py
739    - ./config/examples/${TEST_ARCH}.py || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi
740    - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi
741    - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" check || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi
742    - make updatedatafiles
743    - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" cleantest allgtests-tap TIMEOUT=${TIMEOUT}  ${TEST_OPTS} || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi
744  variables:
745    LOAD_MODULES: nag/6.1
746    TEST_ARCH: arch-ci-linux-nagfor
747  allow_failure:
748    exit_codes: 126
749
750linux-intel-cmplx:
751  extends:
752    - .stage-3
753    - .linux_test_nofflags
754  tags:
755    - gce-nfs
756  variables:
757    TEST_ARCH: arch-ci-linux-intel-cmplx
758    LOAD_MODULES: intel-mkl/19.5 intel/19.0-nompilib cmake/3.20.5-yjp2hz6
759    ENABLE_PETSC4PY_LDPRELOAD: 1
760
761linux-xsdk-dbg:
762  extends:
763    - .stage-3
764    - .linux_test
765  tags:
766    - gce-nfs
767  variables:
768    TEST_ARCH: arch-ci-linux-xsdk-dbg
769    LOAD_MODULES: gcc/8.3.0-fjpc5ys
770
771linux-analyzer:
772  extends:
773    - .stage-2
774    - .linux_test
775  tags:
776    - gce-u22-stage2
777  script:
778    - printf "PATH:$PATH\n"
779    - printf "PYTHONPATH:$PYTHONPATH\n"
780    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
781    - 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
782    - printf "./config/examples/${TEST_ARCH}.py\n"
783    - cat ./config/examples/${TEST_ARCH}.py
784    - ./config/examples/${TEST_ARCH}.py
785    - make LINTER_OPTIONS="${LINTER_OPTIONS}" test-lint
786    - make LINTER_OPTIONS="${LINTER_OPTIONS}" lint
787  variables:
788    TEST_ARCH: arch-ci-linux-analyzer
789    LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config-14 --libdir`/libclang.so.1 --verbose --werror"
790  artifacts:
791    paths:
792    - ${TEST_ARCH}/lib/petsc/conf/*.log
793    - ./petscLintPatches/*.patch
794
795linux-intel:
796  extends:
797    - .stage-3
798    - .linux_test_nofflags
799  tags:
800    - gce-nfs
801  variables:
802    TEST_ARCH: arch-ci-linux-intel
803    LOAD_MODULES: intel-mkl/19.5 intel/19.0-nompilib
804
805linux-opt-misc:
806  extends:
807    - .stage-3
808    - .linux_test
809  tags:
810    - gce-nfs, linux-fast
811  variables:
812    TEST_ARCH: arch-ci-linux-opt-misc
813    LOAD_MODULES: gcc/6.5.0-57usejd
814
815linux-pkgs-64idx:
816  extends:
817    - .stage-3
818    - .linux_test
819  tags:
820    - gce-nfs, linux-mcpu
821  variables:
822    TEST_ARCH: arch-ci-linux-pkgs-64idx
823    LOAD_MODULES: cmake/3.20.5-yjp2hz6 intel-mkl/19.5
824
825linux-64idx-i8:
826  extends:
827    - .stage-3
828    - .linux_test
829  tags:
830    - gce-nfs
831  variables:
832    TEST_ARCH: arch-ci-linux-64idx-i8
833
834linux-gcc-ifc-cmplx:
835  extends:
836    - .stage-3
837    - .linux_test_nofflags
838  tags:
839    - gce-nfs
840  variables:
841    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
842    LOAD_MODULES: intel/19.0-nompilib cmake/3.20.0-vov726r
843
844linux-opt-cxx-quad:
845  extends:
846    - .stage-3
847    - .linux_test
848  tags:
849    - gce-nfs
850  variables:
851    TEST_ARCH: arch-ci-linux-opt-cxx-quad
852
853linux-ILP64:
854  extends:
855    - .stage-3
856    - .linux_test
857  tags:
858    - gce-nfs
859  variables:
860    TEST_ARCH: arch-ci-linux-ILP64
861    LOAD_MODULES: mpich/2-1.5-gcc750
862
863linux-64idx-i8-uni:
864  extends:
865    - .stage-3
866    - .linux_test
867  tags:
868    - gce-nfs
869  variables:
870    TEST_ARCH: arch-ci-linux-64idx-i8-uni
871
872mswin-intel-cxx-cmplx:
873  extends:
874    - .stage-3
875    - .mswin_test
876  tags:
877    - mswin-stage3
878  variables:
879    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
880
881mswin-uni:
882  extends:
883    - .stage-3
884    - .mswin_test
885  tags:
886    - mswin-stage3
887  variables:
888    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump
889    TEST_ARCH: arch-ci-mswin-uni
890
891mswin-gnu:
892  extends:
893    - .stage-3
894    - .mswin_test
895  tags:
896    - mswin-stage3
897  variables:
898    TEST_ARCH: arch-ci-mswin-gnu
899    MAKE_CFLAGS: -Werror
900    MAKE_CXXFLAGS: -Werror
901    MAKE_FFLAGS: -Werror
902    DISABLE_TESTS: 1
903  artifacts:
904    reports:
905    paths:
906    - arch-*/lib/petsc/conf/*.log
907    expire_in: 4 days
908
909#mswin-intel:
910#  extends:
911#    - .stage-3
912#    - .mswin_test
913#  tags:
914#    - os:win
915#  variables:
916#    TEST_ARCH: arch-ci-mswin-intel
917
918opensolaris-pkgs-opt:
919  extends:
920    - .stage-3
921    - .opensolaris_test
922  tags:
923    - name:n-gage
924  variables:
925    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
926
927opensolaris-cmplx-pkgs-dbg:
928  extends:
929    - .stage-3
930    - .opensolaris_test
931  tags:
932    - name:n-gage
933  variables:
934    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
935
936opensolaris-misc:
937  extends:
938    - .stage-3
939    - .opensolaris_test
940  tags:
941    - name:n-gage
942  variables:
943    TEST_ARCH: arch-ci-opensolaris-misc
944
945osx-cxx-cmplx-pkgs-dbg:
946  extends:
947    - .stage-3
948    - .osx_test
949  tags:
950    - os:macos
951  variables:
952    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
953    INIT_SCRIPT: /Users/glci/bin/py3.sh
954
955osx-cxx-pkgs-opt:
956  extends:
957    - .stage-3
958    - .osx_test
959  tags:
960    - os:macos, opt
961  variables:
962    PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false -checkfunctionlist
963    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
964    MAKE_CXXFLAGS: -Werror -Wno-pass-failed
965
966osx-dbg:
967  extends:
968    - .stage-3
969    - .osx_test
970  tags:
971    - os:macos
972  variables:
973    TEST_ARCH: arch-ci-osx-dbg
974
975osx-xsdk-opt:
976  extends:
977    - .stage-3
978    - .osx_test
979  tags:
980    - os:macos, opt
981  variables:
982    TEST_ARCH: arch-ci-osx-xsdk-opt
983
984# job for analyzing the final coverage results
985analyze-pipeline:
986  extends: .test
987  stage: .post
988  tags:
989    - gce-nfs-short
990  dependencies:
991    - linux-pkgs-gcov
992    - linux-cmplx-gcov
993    - linux-matlab-ilp64-gcov
994    - linux-gcov
995  variables:
996    PETSC_ARCH: arch-ci-analyze-pipeline
997  before_script:
998    - date
999    - hostname
1000  script:
1001  - ./configure --with-mpi=0 --with-cxx=0 --with-c2html
1002  - make srchtml
1003  - make mergegcov
1004  artifacts:
1005    name: "$CI_JOB_NAME"
1006    when: always
1007    paths:
1008    - arch-ci-analyze-pipeline/*
1009    expire_in: 4 days
1010
1011
1012#
1013# Base job for a documentation build
1014#
1015.docs:
1016  stage: stage-3
1017  tags:
1018    - gce-stage2
1019  before_script:
1020    - VENV=venv-petsc-docs &&
1021      python3 -m venv $VENV &&
1022      . $VENV/bin/activate &&
1023      cd doc &&
1024      pip install -r requirements.txt
1025
1026#
1027# Build documentation and make available for review using GitLab pages
1028#
1029docs-review:
1030  extends:
1031    - .docs
1032    - .test-basic
1033  script:
1034    - (make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going") || (printf "Sphinx build failed (warnings count as errors)\n" && false)
1035    - (make latexpdf SPHINXOPTS="-T -E -W --keep-going") || (printf "Sphinx build failed (warnings count as errors)\n" && false)
1036    - cp _build/latex/manual.pdf ../public/html/docs/manual/
1037  environment:
1038    name: review/$CI_COMMIT_REF_NAME
1039    url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html
1040  artifacts:
1041    paths:
1042      - public
1043  except:
1044    variables:
1045      - $PETSC_CI_SCHEDULED =~ /yes/
1046
1047#
1048# Deploy documentation using GitLab pages
1049#
1050pages:  # this job name has special meaning to GitLab
1051  extends: .docs
1052  interruptible: true
1053  script:
1054    - mkdir -p ../public/ && cp public/* ../public/
1055    - git fetch --unshallow --no-tags origin +release:remotes/origin/release +main:remotes/origin/main
1056    - git checkout origin/main && pip install -r requirements.txt && make website-deploy BUILDDIR="../public/main" && make latexpdf && mkdir -p ../public/main/docs/manual && cp _build/latex/manual.pdf ../public/main/docs/manual/
1057    - make clean BUILDDIR="../public/release"
1058    - git checkout origin/release && pip install -r requirements.txt && make website-deploy BUILDDIR="../public/release" && make latexpdf && mkdir -p ../public/release/docs/manual && cp _build/latex/manual.pdf ../public/release/docs/manual/
1059  only:
1060    variables:
1061      - $PETSC_CI_SCHEDULED == "yes"
1062  artifacts:
1063    paths:
1064      - public
1065
1066#
1067#
1068# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
1069# that fail produce a warning, but do not block execution of a pipeline.
1070#
1071
1072.test-experimental:
1073  extends: .test
1074  allow_failure: true
1075
1076