-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
905 lines (835 loc) · 31.4 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
#
# stage-1 takes only a few minutes; they do not run the full test suite or external packages.
#
# stage-2 takes less than 10 15 minutes. They run the full test suite but with limited mixture of external packages.
#
# stage-3 may take an hour or more. They run the full test suite and heavily test external packages, utilize valgrind etc.
#
# The stage-(n) tests are only started if all of the stage-(n-1) tests run without error
# You can limit the testing by using the variable STAGE with value 1 or 2
#
stages:
- stage-1
- stage-2
- stage-3
variables:
GIT_STRATEGY: fetch
GIT_CLEAN_FLAGS: -ffdxq
TIMEOUT: 600
EXTRA_OPTIONS: -nox -nox_warning -malloc_dump
#
# The most basic template that most tests will expand upon. In particular merge requests and branch pushes DO NOT trigger testing
#
.test:
interruptible: true
only:
refs:
# Set with CI/CD Shedules - New Schedule
- schedules
# Set with CI/CD Pipelines - Run Pipeline
- web
dependencies: []
#
# This provides the basic order of operations and options template for cloud based stage 1 tests.
# Not all test-short need to follow this template but most will.
#
.stage-1:
extends: .test
stage: stage-1
before_script:
- date
- hostname
- grep PRETTY_NAME /etc/os-release
- nproc
- lscpu
- ccache --zero-stats
- if [ ! -z ${LOAD_MODULES+x} ]; then module load ${LOAD_MODULES}; module list; fi
- printf "PYTHON:${PYTHON}\n"
script:
- printf "PETSC_CONFIG_OPTS:${PETSC_CONFIG_OPTS}\n"
- export SLEPC_DIR=$PWD
- echo -e "section_start:`date +%s`:build_petsc\r\e[0KPETSc configure and make"
- cd ..
- if [ ! -d petsc ]; then git clone https://gitlab.com/petsc/petsc.git; fi
- cd petsc
- git clean ${GIT_CLEAN_FLAGS}
- git fetch
- |
if [ -z ${PETSC_BRANCH+x} ]; then
if [ $(awk '/define SLEPC_VERSION_RELEASE/{print $3}' $SLEPC_DIR/include/slepcversion.h) == 1 ];
then git checkout origin/release;
else git checkout origin/main;
fi
else
echo "Using PETSC_BRANCH=" $PETSC_BRANCH
git checkout origin/$PETSC_BRANCH
fi
- export PETSC_DIR=$PWD
- export PETSC_ARCH=arch-$CI_JOB_NAME
- bash -c "${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O3 -march=native' CXXOPTFLAGS='-O3 -march=native' FOPTFLAGS='-O3 -march=native' ${PETSC_CONFIG_OPTS}"
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}"
- echo -e "section_end:`date +%s`:build_petsc\r\e[0K"
- echo -e "section_start:`date +%s`:build_slepc\r\e[0KSLEPc configure and make"
- cd $SLEPC_DIR
- ${PYTHON} ./configure
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}"
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}" check
- |
if [ ! -z ${CHECKSOURCE+x} ]; then
make checkbadSource SHELL=bash;
make -f gmakefile check_output SHELL=bash;
vermin --version
make vermin_slepc
fi
- if [ ! -z ${RUN_LINT+x} ]; then make lint_slepc LINTER_OPTIONS="--clang_lib=`llvm-config --libdir`/libclang.so --verbose --werror -fdoc-indentation 0 -fdoc-param-list-alignment 0 -fdoc-inline-list-seealso-backticks 0"; fi
- echo -e "section_end:`date +%s`:build_slepc\r\e[0K"
- echo -e "section_start:`date +%s`:tests_slepc\r\e[0KSLEPc test suite"
- if [ -z ${DISABLE_TESTS+x} ]; then make CFLAGS="${MAKE_TEST_CFLAGS}" CXXFLAGS="${MAKE_TEST_CXXFLAGS}" FFLAGS="${MAKE_TEST_FFLAGS}" cleantest allgtests-tap TIMEOUT=${TIMEOUT} gmakesearch="${TEST_SEARCH}" TIMEOUT=${TIMEOUT}; fi
- echo -e "section_end:`date +%s`:tests_slepc\r\e[0K"
variables:
PYTHON: python3
MAKE_CFLAGS: -Werror
MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant
MAKE_FFLAGS: -Werror
MAKE_TEST_CFLAGS: -Werror
MAKE_TEST_CXXFLAGS: -Werror
MAKE_TEST_FFLAGS: -Werror
after_script:
- date
- ccache --show-stats
artifacts:
reports:
junit: arch-*/tests/testresults.xml
name: "$CI_JOB_NAME"
when: always
paths:
- arch-*/lib/slepc/conf/*.log
- arch-*/lib/slepc/conf/slepc*
- arch-*/lib/pkgconfig/slepc.pc
- arch-*/tests/testresults.xml
- arch-*/tests/test_*_tap.log
- arch-*/tests/test_*_err.log
- slepcLintPatches/*
expire_in: 4 days
#
# The following tests run as part of stage-1.
#
gnu-c-single-nofort:
extends: .stage-1
tags:
- name:hapy
variables:
LOAD_MODULES: mpi
PETSC_CONFIG_OPTS: --with-fc=0 --with-precision=single
TEST_SEARCH: eps_tests-test10_1
gnu-cxx-complex-nofort:
extends: .stage-1
tags:
- linux-ubuntu, name:maat
variables:
PETSC_CONFIG_OPTS: --with-fc=0 --with-clanguage=cxx --with-scalar-type=complex
TEST_SEARCH: eps_tests-test10_1
gnu-c-complex-nompi-int64:
extends: .stage-1
tags:
- linux-debian, name:jepri
variables:
PETSC_CONFIG_OPTS: --with-mpi=0 --with-fc=0 --with-scalar-type=complex --with-64-bit-indices
DISABLE_TESTS: 1
gnu-c-py:
extends: .stage-1
tags:
- name:sejmet
variables:
PETSC_CONFIG_OPTS: --with-fc=0
TEST_SEARCH: eps_tests-test10_1
CHECKSOURCE: 1
gnu-c99-mlib-static:
extends: .stage-1
tags:
- linux-ubuntu, name:satet
variables:
PETSC_CONFIG_OPTS: --with-single-library=0 --with-shared-libraries=0 COPTFLAGS="-O -march=native -std=c99"
TEST_SEARCH: eps_tests-test10_1
gnu-lint:
extends: .stage-1
tags:
- linux-debian, name:jepri
variables:
PETSC_CONFIG_OPTS: --with-fc=0 --with-debugging=1
TEST_SEARCH: eps_tests-test10_1
RUN_LINT: 1
#
# This provides the basic order of operations and options template for stage-2,3 tests.
# Not all stage-2,3 need to follow this template, but most will.
#
.stage-23:
extends: .test
script:
- printf "PATH:$PATH\n"
- printf "PYTHONPATH:$PYTHONPATH\n"
- printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
- printf "PETSC_CONFIG_OPTS:${PETSC_CONFIG_OPTS}\n"
- printf "SLEPC_CONFIG_OPTS:${SLEPC_CONFIG_OPTS}\n"
- export SLEPC_DIR=$PWD
- echo -e "section_start:`date +%s`:build_petsc\r\e[0KPETSc configure and make"
- cd ..
- if [ ! -z ${INSTALL+x} ]; then export INSTALL_DIR=$PWD/install; rm -rf $INSTALL_DIR; fi
- if [ ! -d petsc ]; then git clone https://gitlab.com/petsc/petsc.git; fi
- cd petsc
- git clean ${GIT_CLEAN_FLAGS}
- git fetch
- |
if [ -z ${PETSC_BRANCH+x} ]; then
if [ $(awk '/define SLEPC_VERSION_RELEASE/{print $3}' $SLEPC_DIR/include/slepcversion.h) == 1 ];
then git checkout origin/release;
else git checkout origin/main;
fi
else
echo "Using PETSC_BRANCH=" $PETSC_BRANCH
git checkout origin/$PETSC_BRANCH
fi
- export PETSC_DIR=$PWD
- export PETSC_ARCH=arch-$CI_JOB_NAME
- bash -c "${PYTHON} ./configure --with-debugging=0 --with-strict-petscerrorcode --COPTFLAGS='-O -g' --CXXOPTFLAGS='-O -g' --FOPTFLAGS='-O -g' --CUDAOPTFLAGS='-O3' --HIPOPTFLAGS='-O2' ${PETSC_CONFIG_OPTS}"
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}"
- if [ ! -z ${SLEPC4PY+x} ]; then export PYTHONPATH=$PETSC_DIR/$PETSC_ARCH/lib:$SLEPC_DIR/$PETSC_ARCH/lib; fi
- if [ ! -z ${INSTALL+x} ]; then make install-lib; PETSC_DIR=$INSTALL_DIR; unset PETSC_ARCH; fi
- echo -e "section_end:`date +%s`:build_petsc\r\e[0K"
- echo -e "section_start:`date +%s`:build_slepc\r\e[0KSLEPc configure and make"
- cd $SLEPC_DIR
- if [ ! -z ${BUILD_DIR+x} ]; then rm -rf ${BUILD_DIR}; mkdir ${BUILD_DIR}; fi
- bash -c "${PYTHON} ./configure ${SLEPC_CONFIG_OPTS}"
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}"
- if [ ! -z ${INSTALL+x} ]; then make install; SLEPC_DIR=$INSTALL_DIR; fi
- if [ -z ${DISABLE_TESTS+x} ]; then make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}" check; fi
- if [ ! -z ${PKG_CONFIG+x} ]; then make check_usermakefile PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig; fi
- if [ ! -z ${BUILD_DOCS+x} ]; then make alldoc LOC=$SLEPC_DIR; tar czf ${CI_JOB_NAME}-docs.tar.gz --exclude "*.out" --exclude "makefile*" --exclude "ftn-auto*" --exclude slepc4py docs include src; fi
- if [ ! -z ${BUILD_DOCS+x} ] && [ ! -z ${SLEPC4PY+x} ]; then make -C src/binding/slepc4py rst2html sphinx-html sphinx-pdf PYTHON=${PYTHON}; tar czf ${CI_JOB_NAME}-docs-py.tar.gz -C src/binding/slepc4py docs; fi
- echo -e "section_end:`date +%s`:build_slepc\r\e[0K"
- echo -e "section_start:`date +%s`:tests_slepc\r\e[0KSLEPc test suite"
- if [ ! -z ${SLEPC4PY+x} ]; then make slepc4pytest; make -C src/binding/slepc4py/demo PYTHON=${PYTHON}; fi
- if [ -z ${DISABLE_TESTS+x} ]; then make cleantest; make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}" allgtests-tap TIMEOUT=${TIMEOUT} ${TEST_OPTS}; fi
- if [ ! -z ${COVERAGE+x} -a -z ${DISABLE_TESTS+x} ]; then lcov --capture --exclude "/usr/*" --directory $SLEPC_DIR --output-file coverage.info; genhtml coverage.info --legend --title SLEPc --output-directory coverage; tar czf ${CI_JOB_NAME}-cov.tar.gz coverage; fi
- echo -e "section_end:`date +%s`:tests_slepc\r\e[0K"
artifacts:
reports:
junit: arch-*/tests/testresults.xml
name: "$CI_JOB_NAME"
when: always
paths:
- arch-*/lib/slepc/conf/*.log
- arch-*/lib/slepc/conf/slepc*
- arch-*/lib/pkgconfig/slepc.pc
- arch-*/tests/testresults.xml
- arch-*/tests/test_*_tap.log
- arch-*/tests/test_*_err.log
- ${CI_JOB_NAME}-cov.tar.gz
- ${CI_JOB_NAME}-docs*.tar.gz
expire_in: 4 days
variables:
OPENBLAS_NUM_THREADS: 1
PYTHON: python3
.stage-2:
extends: .stage-23
stage: stage-2
only:
variables:
- $STAGE != "1"
- $STAGE != "3"
.stage-3:
extends: .stage-23
stage: stage-3
only:
variables:
- $STAGE != "1"
- $STAGE != "2"
.stage-3-sched:
extends: .stage-3
only:
- schedules
#
# The following provide templates for various OSes for pre/post info
#
.linux_test_noflags:
before_script:
- date
- hostname
- grep PRETTY_NAME /etc/os-release
- nproc
- lscpu
- ccache --zero-stats
- if [ ! -z ${LOAD_MODULES+x} ]; then module load ${LOAD_MODULES}; module list; fi
- printf "PYTHON:${PYTHON}\n"
after_script:
- date
- ccache --show-stats
.linux_test_nofflags:
extends: .linux_test_noflags
variables:
MAKE_CFLAGS: -Werror
MAKE_CXXFLAGS: -Werror
.linux_test:
extends: .linux_test_noflags
variables:
MAKE_CFLAGS: -Werror
MAKE_CXXFLAGS: -Werror
MAKE_FFLAGS: -Werror
.freebsd_test:
variables:
MAKE_CFLAGS: -Werror
MAKE_CXXFLAGS: -Werror
MAKE_FFLAGS: -Werror
before_script:
- date
- hostname
- freebsd-version
- echo $(sysctl -n hw.ncpu)
- ccache --zero-stats
after_script:
- date
- ccache --show-stats
.osx_test:
variables:
MAKE_CFLAGS: -Werror
MAKE_CXXFLAGS: -Werror
MAKE_FFLAGS: -Werror
before_script:
- date
- hostname
- sw_vers -productVersion
- echo $(sysctl -n hw.ncpu)
- ccache --zero-stats
after_script:
- date
- ccache --show-stats
.opensolaris_test:
before_script:
- date
- hostname
- uname -a
- nproc
- isainfo -x
after_script:
- date
.mswin_test:
before_script:
- date
- hostname
- uname -a
- nproc
after_script:
- date
#
# The following tests run as part of stage-2.
#
# The tags variable used in the tests below connects the particular test with the runners
# listed on the left hand side of https://gitlab.com/slepc/slepc/-/settings/ci_cd.
#
gnu-cxx-complex:
extends:
- .stage-2
- .linux_test
tags:
- name:sejmet
variables:
PETSC_CONFIG_OPTS: --with-clanguage=C++ --with-scalar-type=complex --with-fortran-bindings=0
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-arpack-dir=/usr/local/opt/arpack-ng-3.9.0 --with-primme-dir=/usr/local/opt/primme-3.2 --with-blopex-dir=/usr/local/opt/blopex
gnu-c-cuda:
extends:
- .stage-2
- .linux_test
tags:
- gpu:nvidia, name:hapy
variables:
LOAD_MODULES: mpi
PETSC_CONFIG_OPTS: --with-fortran-bindings=0 --with-cuda --download-mumps --download-scalapack --download-metis --download-parmetis --download-suitesparse --with-magma-dir=/usr/local/opt/magma-2.7.1
gnu-c-hip:
extends:
- .stage-2
- .linux_test
tags:
- gpu:amd, name:satet
variables:
LOAD_MODULES: rocm
PETSC_CONFIG_OPTS: --with-fortran-bindings=0 --with-hip --download-mumps --download-scalapack --download-metis --download-parmetis --download-suitesparse
clang-c:
extends:
- .stage-2
- .linux_test
tags:
- linux-ubuntu, compiler:clang, name:maat
variables:
PETSC_CONFIG_OPTS: --with-cc=/opt/mpich/clang/bin/mpicc --with-cxx=/opt/mpich/clang/bin/mpicxx --with-fc=0 --with-mpiexec=/opt/mpich/clang/bin/mpiexec
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --with-primme-dir=/usr/local/opt/primme-3.2 --download-blopex --with-slicot
gnu-c-complex-multilib:
extends:
- .stage-2
- .linux_test
tags:
- linux-ubuntu, name:satet
variables:
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-single-library=0 --download-metis --download-parmetis --download-scalapack --with-cxx-dialect=17
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-elpa --with-fortran-bindings-inplace
gnu-c-libs:
extends:
- .stage-2
- .linux_test
tags:
- linux-suse, name:igai
variables:
PETSC_CONFIG_OPTS: --with-single-library=0 --download-scalapack
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --download-arpack --download-evsl --download-primme --download-blopex --download-trlan --download-slicot --with-packages-download-dir=/var/local/downloads
gnu-cxx-int64:
extends:
- .stage-2
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-clanguage=C++ --with-64-bit-indices --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-primme-dir=/usr/local/opt/primme-3.2
#
# Special job in stage-3 to check pip install.
#
pip-install:
extends: .test
stage: stage-3
tags:
- pip, name:satet
before_script:
- date
- hostname
- grep PRETTY_NAME /etc/os-release
- nproc
- lscpu
- ccache --zero-stats
- printf "PYTHON:${PYTHON}\n"
script:
- |
unset PETSC_DIR PETSC_ARCH SLEPC_DIR
slepc=$PWD
cd ..
if [ ! -d petsc ]; then git clone https://gitlab.com/petsc/petsc.git; fi
cd petsc
git clean ${GIT_CLEAN_FLAGS}
git fetch
if [ -z ${PETSC_BRANCH+x} ]; then
if [ $(awk '/define SLEPC_VERSION_RELEASE/{print $3}' $slepc/include/slepcversion.h) == 1 ]; then
git checkout origin/release
else
git checkout origin/main
fi
else
git checkout origin/$PETSC_BRANCH
fi
petsc=$PWD
cd ..
set -eu pipefail
rm -rf /tmp/venv
python -m venv /tmp/venv
source /tmp/venv/bin/activate
set -x
python -m pip install --upgrade pip
wheelhouse=$PWD/wheelhouse
rm -rf $wheelhouse
mkdir -p $wheelhouse
export PIP_WHEEL_DIR=$wheelhouse
export PIP_FIND_LINKS=$wheelhouse
python -m pip wheel $petsc
python -m pip wheel $petsc/src/binding/petsc4py
python -m pip wheel $slepc
python -m pip wheel $slepc/src/binding/slepc4py
python -m pip install --pre slepc4py
python -m pip list
python -m slepc --prefix
python -m slepc4py
make -C $slepc/src/binding/slepc4py/demo
after_script:
- date
#
# Special job in stage-3 to check DESTDIR install (only in scheduled pipelines).
#
destdir-install:
extends:
- .stage-3-sched
- .linux_test
tags:
- name:hapy
before_script:
- date
- hostname
- grep PRETTY_NAME /etc/os-release
- nproc
- lscpu
script:
- printf "PETSC_CONFIG_OPTS:${PETSC_CONFIG_OPTS}\n"
- export SLEPC_DIR=$PWD
- echo -e "section_start:`date +%s`:build_petsc\r\e[0KPETSc configure and make"
- cd ..
- export DESTDIR=${PWD}/destdir
- export PREFIX=${PWD}/prefix
- rm -rf ${DESTDIR} ${PREFIX}
- if [ ! -d petsc ]; then git clone https://gitlab.com/petsc/petsc.git; fi
- cd petsc
- git clean ${GIT_CLEAN_FLAGS}
- git fetch
- |
if [ -z ${PETSC_BRANCH+x} ]; then
if [ $(awk '/define SLEPC_VERSION_RELEASE/{print $3}' $SLEPC_DIR/include/slepcversion.h) == 1 ];
then git checkout origin/release;
else git checkout origin/main;
fi
else
echo "Using PETSC_BRANCH=" $PETSC_BRANCH
git checkout origin/$PETSC_BRANCH
fi
- export PETSC_DIR=$PWD
- export PETSC_ARCH=arch-$CI_JOB_NAME
- bash -c "${PYTHON} ./configure --with-debugging=0 --with-mpi=0 --prefix=${PREFIX} COPTFLAGS=-O CXXOPTFLAGS=-O FOPTFLAGS=-O CUDAOPTFLAGS=-O1 HIPOPTFLAGS=-O1 ${PETSC_CONFIG_OPTS}"
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}"
- make install-lib DESTDIR=${DESTDIR}; cp -r ${DESTDIR}${PREFIX} ..; PETSC_DIR=${PREFIX}; unset PETSC_ARCH
- echo -e "section_end:`date +%s`:build_petsc\r\e[0K"
- echo -e "section_start:`date +%s`:build_slepc\r\e[0KSLEPc configure and make"
- cd $SLEPC_DIR
- ${PYTHON} ./configure --prefix=${PREFIX}
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}"
- make install-lib DESTDIR=${DESTDIR}; cp -r ${DESTDIR}${PREFIX} ..; SLEPC_DIR=${PREFIX}
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" HIPFLAGS="${MAKE_HIPFLAGS}" check
- echo -e "section_end:`date +%s`:build_slepc\r\e[0K"
variables:
PYTHON: python3
MAKE_CFLAGS: -Werror
MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant
MAKE_FFLAGS: -Werror
after_script:
- date
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- arch-*/lib/slepc/conf/*.log
- arch-*/lib/slepc/conf/slepc*
expire_in: 4 days
#
# The following tests run as part of stage-3.
#
intel-c-complex-mkl:
extends:
- .stage-3
- .linux_test_nofflags
tags:
- compiler:intel, name:sejmet
variables:
LOAD_MODULES: compiler mpi mkl
MAKE_CFLAGS: -Werror -Wno-higher-precision-fp
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-cc=mpiicx --with-fc=mpiifx --with-cxx=mpiicpx --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-mkl_pardiso=1 --with-scalapack=1 --download-cmake
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
gnu-c-cuda-complex:
extends:
- .stage-3
- .linux_test
tags:
- gpu:nvidia, name:hapy
variables:
LOAD_MODULES: mpi
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1
TEST_OPTS: -j1 -l6 query=requires queryval=cuda
gnu-c-cuda-single:
extends:
- .stage-3
- .linux_test
tags:
- gpu:nvidia, name:hapy
variables:
LOAD_MODULES: mpi
PETSC_CONFIG_OPTS: --with-precision=single --with-single-library=0 --with-cuda
TEST_OPTS: -j1 -l6 query=requires queryval=cuda
gnu-c-multilib:
extends:
- .stage-3
- .linux_test
tags:
- linux-suse, name:igai
variables:
PETSC_CONFIG_OPTS: --with-single-library=0 --download-scalapack --download-netlib-lapack
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --download-arpack --download-evsl --with-primme-dir=/usr/local/opt/primme-3.2 --with-blopex-dir=/usr/local/opt/blopex --with-trlan-dir=/usr/local/opt/trlan-201009 --with-packages-download-dir=/var/local/downloads
gnu-c-c99-nompi:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --CFLAGS='-std=c99 -pedantic -Wno-long-long -Wno-overlength-strings' --with-fortran-bindings=0 --with-mpi=0
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-arpack-lib='-L/usr/local/opt/arpack-ng-3.8.0/lib -Wl,-rpath,/usr/local/opt/arpack-ng-3.8.0/lib -lparpack -larpack' --with-blopex-dir=/usr/local/opt/blopex --with-trlan-dir=/usr/local/opt/trlan-201009 --with-packages-download-dir=/var/local/downloads --download-primme --download-primme-cflags=-std=c99
clang-c-valgrind:
extends:
- .stage-3
- .linux_test
tags:
- linux-ubuntu, compiler:clang, name:maat
variables:
PETSC_CONFIG_OPTS: --with-cc=/opt/mpich/clang/bin/mpicc --with-cxx=/opt/mpich/clang/bin/mpicxx --with-fc=0 --with-mpiexec=/opt/mpich/clang/bin/mpiexec --with-shared-libraries=0
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
gnu-c-complex:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-petsc4py --download-netlib-lapack
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-arpack-lib="/usr/local/opt/arpack-ng-3.8.0/lib/libparpack.so /usr/local/opt/arpack-ng-3.8.0/lib/libarpack.so" --download-primme --download-blopex --with-packages-download-dir=/var/local/downloads --with-slepc4py
SLEPC4PY: 1
gnu-c:
extends:
- .stage-3
- .linux_test
tags:
- linux-ubuntu, name:satet
variables:
PETSC_CONFIG_OPTS: --download-superlu_dist --download-elemental --download-metis --download-parmetis --with-petsc4py --download-c2html --download-cmake
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-arpack-dir=/usr/local/opt/arpack-ng-3.9.1 --with-primme-dir=/usr/local/opt/primme-3.2 --with-evsl-dir=/usr/local/opt/evsl-nov21 --download-blopex --with-slepc4py
SLEPC4PY: 1
BUILD_DOCS: 1
PKG_CONFIG: 1
gnu-c-complex-libs:
extends:
- .stage-3
- .linux_test
tags:
- linux-suse, name:igai
variables:
PETSC_CONFIG_OPTS: --with-scalar-type=complex --download-scalapack --download-metis --download-parmetis --download-elemental
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --with-packages-build-dir=${BUILD_DIR} --download-arpack --download-primme --download-blopex
BUILD_DIR: ../externalpackages
clang-c-complex:
extends:
- .stage-3
- .linux_test
tags:
- compiler:clang, name:sejmet
variables:
PETSC_CONFIG_OPTS: --with-cc=/opt/mpich/clang/bin/mpicc --with-cxx=0 --with-fc=0 --with-mpiexec=/opt/mpich/clang/bin/mpiexec --with-scalar-type=complex
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-primme-dir=/usr/local/opt/primme-3.2 --with-blopex-dir=/usr/local/opt/blopex
intel-cxx-mkl:
extends:
- .stage-3
- .linux_test_nofflags
tags:
- compiler:intel, name:sejmet
variables:
LOAD_MODULES: compiler mpi mkl
MAKE_CXXFLAGS: -Werror -Wno-deprecated
PETSC_CONFIG_OPTS: --with-cc=mpiicx --with-fc=mpiifx --with-cxx=mpiicpx --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-mkl_pardiso=1 --with-scalapack=1 --with-clanguage=C++ --with-memalign=64
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
gnu-c-float128:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --download-f2cblaslapack --with-precision=__float128
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
gnu-cxx-complex-int64:
extends:
- .stage-3
- .linux_test
tags:
- linux-ubuntu, name:satet
variables:
PETSC_CONFIG_OPTS: --with-clanguage=C++ --with-scalar-type=complex --with-64-bit-indices --with-petsc4py --download-scalapack --download-elemental --download-parmetis --download-metis --download-mumps --download-suitesparse --download-cmake
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --with-slepc4py --download-primme --download-hpddm
SLEPC4PY: 1
gnu-c-single:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-precision=single --download-scalapack
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-arpack-dir=/usr/local/opt/arpack-ng-3.8.0
gnu-c-coverage:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-fortran-bindings=0 --with-debugging=1 --with-coverage=1 --CXXFLAGS='-O -g' --with-cxx-dialect=11
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --download-arpack --download-primme --download-trlan --download-blopex --download-hpddm --download-evsl
COVERAGE: 1
gnu-c-complex-coverage:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-fortran-bindings=0 --with-scalar-type=complex --with-debugging=1 --with-coverage=1
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --with-arpack-dir=/usr/local/opt/arpack-ng-3.8.0 --with-primme-dir=/usr/local/opt/primme-3.2 --download-blopex --download-hpddm
COVERAGE: 1
intel-c-complex-int64-mkl:
extends:
- .stage-3
- .linux_test_nofflags
tags:
- compiler:intel, name:sejmet
variables:
LOAD_MODULES: compiler mpi mkl
MAKE_CFLAGS: -Werror -Wno-higher-precision-fp
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-cc=mpiicx --with-fc=mpiifx --with-cxx=mpiicpx --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-mkl_pardiso --with-64-bit-indices --with-64-bit-blas-indices
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --download-sowing
nvidia-c-nompi:
extends:
- .stage-3
- .linux_test_noflags
tags:
- compiler:nvidia, name:hapy
variables:
LOAD_MODULES: nvhpc-nompi
PETSC_CONFIG_OPTS: --with-cc=nvc --with-fc=nvfortran --with-cxx=nvc++ --with-mpi=0 --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-blopex --download-primme=/var/local/downloads/primme-3.2.tar.gz --download-arpack
TEST_OPTS: -j4 -l12
gnu-c-complex-valgrind:
extends:
- .stage-3
- .linux_test
tags:
- linux-ubuntu, compiler:clang, name:maat
variables:
PETSC_CONFIG_OPTS: --with-cc=/opt/mpich/clang/bin/mpicc --with-cxx=/opt/mpich/clang/bin/mpicxx --with-fc=0 --with-mpiexec=/opt/mpich/clang/bin/mpiexec --with-shared-libraries=0 --with-scalar-type=complex --download-f2cblaslapack
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
intel-c-mkl-libs:
extends:
- .stage-3
- .linux_test_nofflags
tags:
- compiler:intel, name:sejmet
variables:
LOAD_MODULES: compiler mpi mkl
PETSC_CONFIG_OPTS: --with-cc=mpiicx --with-fc=mpiifx --with-cxx=mpiicpx --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-mkl_pardiso --with-scalapack --download-mumps --download-metis --download-parmetis --download-suitesparse
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-elpa --download-arpack --download-primme --download-blopex --download-polar --download-ksvd
nvidia-c-complex-nompi:
extends:
- .stage-3
- .linux_test_noflags
tags:
- compiler:nvidia, name:hapy
variables:
LOAD_MODULES: nvhpc-nompi
PETSC_CONFIG_OPTS: --with-cc=nvc --with-fc=nvfortran --with-cxx=nvc++ --with-scalar-type=complex --with-mpi=0 --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1-nvidia
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-blopex --download-primme --download-arpack
TEST_OPTS: -j4 -l12
nvidia-cxx-mpi:
extends:
- .stage-3
- .linux_test_noflags
tags:
- compiler:nvidia, name:hapy
variables:
LOAD_MODULES: nvhpc
PETSC_CONFIG_OPTS: --with-cc=mpicc --with-fc=mpifort --with-cxx=mpicxx --with-clanguage=c++ --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1-nvidia
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-blopex --download-primme --download-arpack
TEST_OPTS: -j4 -l12
intel-c-mkl-install:
extends:
- .stage-3
- .linux_test_nofflags
tags:
- compiler:intel, name:igai
variables:
LOAD_MODULES: icc mpi mkl
PETSC_CONFIG_OPTS: --with-cc=mpiicc --with-fc=mpiifort --with-cxx=mpiicpc --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-mkl_pardiso=1 --with-scalapack=1 --prefix=../install
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --prefix=../install --download-hpddm
INSTALL: 1
clang-c-single:
extends:
- .stage-3
- .linux_test
tags:
- compiler:clang, name:maat
variables:
PETSC_CONFIG_OPTS: --with-cc=/opt/mpich/clang/bin/mpicc --with-cxx=/opt/mpich/clang/bin/mpicxx --with-fc=0 --with-mpiexec=/opt/mpich/clang/bin/mpiexec --with-precision=single
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme
gnu-c-complex-single:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-precision=single --with-scalar-type=complex
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme --download-arpack
gnu-c-cuda-int64:
extends:
- .stage-3
- .linux_test
tags:
- gpu:nvidia, name:hapy
variables:
LOAD_MODULES: mpi
PETSC_CONFIG_OPTS: --with-cuda --with-64-bit-indices --with-magma-dir=/usr/local/opt/magma-2.7.1
TEST_OPTS: -j2 -l6 query=requires queryval=cuda
MAKE_CUDAFLAGS: --compiler-options -Wall,-Wunused-parameter,-Wno-deprecated-declarations,-Werror
gnu-c-nocxx:
extends:
- .stage-3
- .linux_test
tags:
- name:jepri
variables:
PETSC_CONFIG_OPTS: --with-cxx=0 --COPTFLAGS='-g -O -fsanitize=address' --FOPTFLAGS='-g -O -fsanitize=address'
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme
gnu-c-complex128:
extends:
- .stage-3
- .linux_test
tags:
- name:satet
variables:
PETSC_CONFIG_OPTS: --with-scalar-type=complex --download-f2cblaslapack --with-precision=__float128 --with-clanguage=c++
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
intel-c-int64-nompi-mkl:
extends:
- .stage-3
- .linux_test_nofflags
tags:
- compiler:intel, name:jepri
variables:
LOAD_MODULES: compiler mpi mkl
PETSC_CONFIG_OPTS: --with-cc=icx --with-fc=ifx --with-cxx=icpx --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-64-bit-indices --with-64-bit-blas-indices --with-mpi=0 --COPTFLAGS='-O -g -fp-model=precise' --CXXOPTFLAGS='-O -g -fp-model=precise' --FOPTFLAGS='-O -g -fp-model=precise'
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme --download-arpack
#gnu-c-hip-complex: # TODO
# extends:
# - .stage-3
# - .linux_test
# tags:
# - gpu:amd, name:satet
# variables:
# LOAD_MODULES: rocm
# PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-hip
# TEST_OPTS: -j1 -l6 query=requires queryval=hip
gnu-c-hip-single:
extends:
- .stage-3
- .linux_test
tags:
- gpu:amd, name:satet
variables:
LOAD_MODULES: rocm
PETSC_CONFIG_OPTS: --with-precision=single --with-single-library=0 --with-hip
TEST_OPTS: query=requires queryval=hip
gnu-c-hip-int64:
extends:
- .stage-3
- .linux_test
tags:
- gpu:amd, name:satet
variables:
LOAD_MODULES: rocm
PETSC_CONFIG_OPTS: --with-hip --with-64-bit-indices
TEST_OPTS: query=requires queryval=hip