-
Notifications
You must be signed in to change notification settings - Fork 99
/
cm_test_all_sandia
executable file
·1465 lines (1270 loc) · 55.3 KB
/
cm_test_all_sandia
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
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash -e
#
# Global config
#
set -o pipefail
# Determine current machine.
print_help() {
echo "test_all_sandia <ARGS> <OPTIONS>:"
echo "--kokkoskernels-path=/Path/To/KokkosKernels: Path to the KokkosKernels root directory"
echo " Defaults to root repo containing this script"
echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory"
echo " Defaults to KokkosKernelsPath/../kokkos"
echo ""
echo "--kokkoskernels-branch=<Branch>: Branch to test. Only relevant for Spack builds."
echo " No default. Spack otherwise does dev-build from source."
echo "--spack: Run spack builds rather than direct CMake tests"
echo ""
echo "--debug: Run tests in debug. Defaults to False"
echo "--deprecated-code: Enable deprecated code (disabled by default)"
echo "--boundscheck: Enable Kokkos_ENABLE_DEBUG_BOUNDS_CHECK to check View accesses within bounds."
echo "--test-script: Test this script, not Kokkos"
echo "--skip-hwloc: Do not do hwloc tests"
echo "--num=N: Number of jobs to run in parallel"
echo "--spot-check: Minimal test set to issue pull request"
echo "--spot-check-tpls: Minimal test set enabling blas and lapack tpls"
echo "--timeout: Max time before ctest timeout (in seconds)"
echo "--dry-run: Just print what would be executed"
echo "--build-only: Just do builds, don't run anything"
echo "--opt-flag=FLAG: Optimization flag (default: -O3)"
echo "--cxxflags-extra=FLAGS: Extra flags to be added to CXX_FLAGS"
echo "--ldflags-extra=FLAGS: Extra flags to be added to LD_FLAGS"
echo ""
echo "--arch=ARCHITECTURE: overwrite architecture flags"
echo " Provide a comma-separated list of arch codes (see available at link below):"
echo " https://github.com/kokkos/kokkos/wiki/Compiling#table-43-architecture-variables"
echo ""
echo "--with-cuda-options=OPT: set KOKKOS_CUDA_OPTIONS"
echo " Provide a comma-separated list from the following valid items:"
echo " force_uvm,use_ldg,enable_lambda,rdc"
echo ""
echo "--with-options=OPT: set KOKKOS_OPTIONS"
echo " Provide a comma-separated list from the following valid items:"
echo " compiler_warnings"
echo " aggressive_vectorization = add ivdep on loops"
echo " disable_profiling = do not compile with profiling hooks"
echo ""
echo "--build-list=BUILD,BUILD,BUILD..."
echo " Provide a comma-separated list of builds instead of running all builds"
echo " Valid items:"
echo " OpenMP, Threads, Serial, OpenMP_Serial, Threads_Serial"
echo " Cuda_OpenMP, Cuda_Threads, Cuda_Serial"
echo ""
echo "--with-scalars=SCALARS: set KOKKOSKERNELS_SCALARS"
echo " Provide a comma-separated list scalar types"
echo " Valid items:"
echo " float, complex_float, double, complex_double"
echo " Example: SCALARS=double,complex_double"
echo ""
echo "--with-ordinals=ORDS: set KOKKOSKERNELS_ORDINALS"
echo " Provide a comma-separated list ordinal types"
echo " Valid items:"
echo " int, int64_t"
echo ""
echo "--with-offsets=OFFS: set KOKKOSKERNELS_OFFSETS"
echo " Provide a comma-separated list offset types"
echo " Valid items:"
echo " int, size_t"
echo ""
echo "--with-layouts=LAYOUTS: set KOKKOSKERNELS_LAYOUTS"
echo " Provide a comma-separated list layouts"
echo " Valid items:"
echo " LayoutLeft,LayoutRight"
echo ""
echo "--no-default-eti: Do not include default ETI types for Kokkos Kernels"
echo ""
echo "--disable-test-eti-only: Do not restrict testing to ETI types for Kokkos Kernels"
echo ""
echo "--with-spaces=SPACES: Set spaces to be instantiated."
echo " Options: hostspace, cudaspace, cudauvmspace"
echo ""
echo "--disable-perftests: Do not build perftests for Kokkos Kernels"
echo ""
echo "--enable-perftests: build perftests for Kokkos Kernels (default)"
echo ""
echo "--make-par-level=N: Set parallelism level for builds (default: N=12)"
echo ""
echo "--with-tpls=TPLS: set KOKKOSKERNELS_ENABLE_TPLS"
echo " Provide a comma-separated list of TPLs"
echo " Valid items:"
echo " blas, mkl, cublas, cusparse, cusolver, magma, armpl, rocblas, rocsparse, rocsolver"
echo ""
echo "--cmake-flags=[CMAKE Command options]: Set Kokkos Kernels cmake options not handled by script"
echo "--kokkos-cmake-flags=[CMAKE Command options]: Set Kokkos cmake options not handled by script"
echo ""
echo "ARGS: list of expressions matching compilers to test"
echo " supported compilers sems"
for COMPILER_DATA in "${COMPILERS[@]}"; do
ARR=($COMPILER_DATA)
COMPILER=${ARR[0]}
echo " $COMPILER"
done
echo ""
echo "Examples:"
echo " Run all tests"
echo " % test_all_sandia"
echo ""
echo " Run all gcc tests"
echo " % test_all_sandia gcc"
echo ""
echo " Run all gcc/4.8.4 and all intel tests"
echo " % test_all_sandia gcc/4.8.4 intel"
echo ""
echo " Run all tests in debug"
echo " % test_all_sandia --debug"
echo ""
echo " Run gcc/4.8.4 and only do OpenMP and OpenMP_Serial builds"
echo " % test_all_sandia gcc/4.8.4 --build-list=OpenMP,OpenMP_Serial"
echo ""
echo "If you want to kill the tests, do:"
echo " hit ctrl-z"
echo " % kill -9 %1"
echo
}
MACHINE=""
HOSTNAME=$(hostname)
PROCESSOR=`uname -p`
CUDA_ENABLE_CMD=
HIP_ENABLE_CMD=
#Command(s) for accessing local modules on the current machine,
#e.g. "module use ..."
#This will be added to reproducer instructions/script.
MODULE_ENVIRONMENT=
if [[ "$HOSTNAME" == inouye* ]]; then
MACHINE=inouye
fi
if [[ "$HOSTNAME" =~ weaver.* ]]; then
MACHINE=weaver
source /etc/profile.d/modules.sh
module load git
fi
if [[ "$HOSTNAME" == *blake* ]]; then # Warning: very generic name
MACHINE=blake
fi
if [[ "$HOSTNAME" == *solo* ]]; then # Warning: very generic name
MACHINE=solo
fi
if [[ "$HOSTNAME" == kokkos-dev-2* ]]; then
MACHINE=kokkos-dev-2
fi
if [[ "$HOSTNAME" == caraway* ]]; then # Warning: very generic name
MACHINE=caraway
fi
if [[ "$HOSTNAME" == fat* ]]; then # Caraway MI250 queues
MACHINE=vega90a_caraway
fi
if [[ "$HOSTNAME" == lean* ]]; then # Caraway MI210 queues
MACHINE=vega90a_caraway
fi
if [[ "$HOSTNAME" == kokkos-dev\.sandia\.gov* ]]; then
MACHINE=kokkos-dev
fi
if [[ "$HOSTNAME" == sogpu01* ]]; then
MACHINE=sogpu
fi
if [[ "$HOSTNAME" == sorh7* ]]; then
MACHINE=sorh7
fi
if [ ! -z "$SEMS_MODULEFILES_ROOT" ]; then
if [[ "$MACHINE" = "" ]]; then
MACHINE=sems
fi
fi
if [[ "$MACHINE" = "" ]]; then
echo "Unrecognized machine" >&2
exit 1
fi
echo "Running on machine: $MACHINE"
GCC_BUILD_LIST="OpenMP,Threads,Serial,OpenMP_Serial,Threads_Serial"
ARM_GCC_BUILD_LIST="OpenMP,Serial,OpenMP_Serial"
INTEL_BUILD_LIST="OpenMP,Threads,Serial,OpenMP_Serial,Threads_Serial"
CLANG_BUILD_LIST="Threads,Serial,Threads_Serial"
CUDA_BUILD_LIST="Cuda_OpenMP,Cuda_Threads,Cuda_Serial"
CUDA_IBM_BUILD_LIST="Cuda_OpenMP,Cuda_Serial"
GCC_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wignored-qualifiers,-Wempty-body,-Wclobbered,-Wuninitialized"
CLANG_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized"
INTEL_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized,-diag-disable=1011,-diag-disable=869"
CUDA_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized"
#CUDA_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized"
PGI_WARNING_FLAGS=""
# Default. Machine specific can override.
DEBUG=False
ARGS=""
CUSTOM_BUILD_LIST=""
DRYRUN=False
BUILD_ONLY=False
declare -i NUM_JOBS_TO_RUN_IN_PARALLEL=1
TEST_SCRIPT=False
TEST_SPACK=False
SKIP_HWLOC=False
SPOT_CHECK=False
NO_DEFAULT_ETI=False
ENABLE_PERFTESTS=True
ENABLE_TEST_ETI_ONLY=True
PRINT_HELP=False
OPT_FLAG=""
CXX_FLAGS_EXTRA=""
LD_FLAGS_EXTRA=""
KOKKOS_OPTIONS=""
CXX_STANDARD="17"
GCC_VARIANTS="+blas+lapack +openmp+serial<SPACK_HOST_ARCH>"
CLANG_VARIANTS="+blas+lapack +openmp+serial<SPACK_HOST_ARCH>"
CUDA_VARIANTS="+cusparse+cublas +cuda+cuda_lambda+wrapper<SPACK_CUDA_ARCH>+cuda_uvm"
INTEL_VARIANTS="$GCC_VARIANTS"
PGI_VARIANTS="$GCC_VARIANTS"
SPACK_VARIANTS=("cuda 10.0 $CUDA_VARIANTS std=14"
"cuda 10.1 $CUDA_VARIANTS"
"cuda 9.2 $CUDA_VARIANTS"
"gcc 5.3.0 $GCC_VARIANTS"
"gcc 6.1.0 $GCC_VARIANTS"
"gcc 7.2.0 $GCC_VARIANTS std=14"
"gcc 7.3.0 $GCC_VARIANTS std=14"
"gcc 8.3.0 $GCC_VARIANTS std=14"
"gcc 9.1 $GCC_VARIANTS std=17"
"gcc 9.2.0 $GCC_VARIANTS std=17"
"intel 17.0.1 $INTEL_VARIANTS"
"intel 18.0.5 $INTEL_VARIANTS"
"intel 19.0.5 $INTEL_VARIANTS std=14"
"clang 3.6.1 $CLANG_VARIANTS"
"clang 3.7.1 $CLANG_VARIANTS"
"clang 3.8.1 $CLANG_VARIANTS"
"clang 3.9.0 $CLANG_VARIANTS"
"clang 5.0.1 $CLANG_VARIANTS"
"clang 7.0.1 $CLANG_VARIANTS"
"clang 8.0 $CLANG_VARIANTS std=14"
"clang 9.0.0 $CLANG_VARIANTS std=17"
"pgi 19.4 $PGI_VARIANTS"
)
SPACK_HOST_ARCH=""
SPACK_CUDA_ARCH=""
SPACK_CUDA_HOST_COMPILER=""
SPOT_CHECK_TPLS=False
KOKKOSKERNELS_ENABLE_TPL_CMD=
KOKKOSKERNELS_TPL_PATH_CMD=
KOKKOSKERNELS_TPL_LIBS_CMD=
KOKKOSKERNELS_EXTRA_LINKER_FLAGS_CMD=
# Enable double and complex_double in all builds by default
KOKKOSKERNELS_SCALARS="double,complex_double"
# Defaults for ordinals, offsets, and layouts match the CMake defaults
KOKKOSKERNELS_ORDINALS="int"
KOKKOSKERNELS_OFFSETS="int,size_t"
KOKKOSKERNELS_LAYOUTS="LayoutLeft"
CTESTTIMEOUT=2500
KOKKOS_DEPRECATED_CODE=""
MAKE_PAR_LEVEL=12
#
# Handle arguments.
#
while [[ $# > 0 ]]
do
key="$1"
case $key in
--kokkoskernels-path*)
KOKKOSKERNELS_PATH="${key#*=}"
;;
--kokkos-path*)
KOKKOS_PATH="${key#*=}"
;;
--build-list*)
CUSTOM_BUILD_LIST="${key#*=}"
;;
--debug*)
DEBUG=True
;;
--boundscheck*)
KOKKOS_BOUNDS_CHECK="--boundscheck"
;;
--deprecated-code)
KOKKOS_DEPRECATED_CODE="--deprecated-code"
;;
--build-only*)
BUILD_ONLY=True
;;
--test-script*)
TEST_SCRIPT=True
;;
--spack*)
TEST_SPACK=True
;;
--kokkoskernels-branch*)
KOKKOSKERNELS_BRANCH="${key#*=}"
;;
--skip-hwloc*)
SKIP_HWLOC=True
;;
--num*)
NUM_JOBS_TO_RUN_IN_PARALLEL="${key#*=}"
;;
--dry-run*)
DRYRUN=True
;;
--spot-check-tpls*)
SPOT_CHECK_TPLS=True
;;
--spot-check*)
SPOT_CHECK=True
;;
--timeout*)
CTESTTIMEOUT="${key#*=}"
;;
--arch*)
ARCH_FLAG="--arch=${key#*=}"
;;
--opt-flag*)
OPT_FLAG="${key#*=}"
;;
--with-cuda-options*)
KOKKOS_CUDA_OPTIONS="${key#*=}"
export KOKKOS_CUDA_OPTIONS
;;
--with-options*)
KOKKOS_OPTIONS="${key#*=}"
export KOKKOS_OPTIONS
;;
--cxxflags-extra*)
CXX_FLAGS_EXTRA="${key#*=}"
;;
--cxxstandard*)
FULL_CXX_STANDARD="${key#*=}"
if [[ ${FULL_CXX_STANDARD} == *++* ]]; then
CXX_STANDARD="${FULL_CXX_STANDARD#*++}"
else
CXX_STANDARD="${FULL_CXX_STANDARD}"
fi
;;
--make-par-level*)
MAKE_PAR_LEVEL="${key#*=}"
;;
--ldflags-extra*)
LD_FLAGS_EXTRA="${key#*=}"
;;
--with-scalars*)
# Overwrite the default double and complex_double types
KOKKOSKERNELS_SCALARS="${key#*=}"
;;
--with-ordinals*)
KOKKOSKERNELS_ORDINALS="${key#*=}"
;;
--with-offsets*)
KOKKOSKERNELS_OFFSETS="${key#*=}"
;;
--with-layouts*)
KOKKOSKERNELS_LAYOUTS="${key#*=}"
;;
--no-default-eti*)
NO_DEFAULT_ETI=True
;;
--disable-test-eti-only*)
ENABLE_TEST_ETI_ONLY=False
;;
--disable-perftests*)
ENABLE_PERFTESTS=False
;;
--enable-perftests*)
ENABLE_PERFTESTS=True
;;
--with-spaces*)
KOKKOSKERNELS_SPACES="${key#*=}"
;;
--with-tpls*)
KOKKOSKERNELS_ENABLE_TPLS="${key#*=}"
;;
--cmake-flags*)
PASSTHRU_CMAKE_FLAGS="${key#*=}"
;;
--kokkos-cmake-flags*)
KOKKOS_PASSTHRU_CMAKE_FLAGS="${key#*=}"
;;
--help*)
PRINT_HELP=True
;;
*)
# args, just append
ARGS="$ARGS $1"
;;
esac
shift
done
if [[ "${SPOT_CHECK}" = "True" && "${SPOT_CHECK_TPLS}" = "True" ]]; then
echo "Warning: --spot-check and --spot-check-tpls were requested but only one is allowed - defaulting to --spot-check"
SPOT_CHECK_TPLS=False
fi
SCRIPT_KOKKOSKERNELS_ROOT=$( cd "$( dirname "$0" )" && cd .. && pwd )
# Set kokkos path.
if [ -z "$KOKKOSKERNELS_PATH" ]; then
KOKKOSKERNELS_PATH=$SCRIPT_KOKKOSKERNELS_ROOT
else
# Ensure KOKKOSKERNELS_PATH is abs path.
KOKKOSKERNELS_PATH=$( cd $KOKKOSKERNELS_PATH && pwd )
fi
# Set kokkos path.
if [ -z "$KOKKOS_PATH" ]; then
KOKKOS_PATH=$KOKKOSKERNELS_PATH/../kokkos
else
# Ensure KOKKOS_PATH is abs path.
KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd )
SPACK_DEV_BUILD_KOKKOS=$KOKKOS_PATH
fi
#
# Machine specific config.
#
if [ "$MACHINE" = "sems" ]; then
module purge
MODULE_ENVIRONMENT="sh /projects/sems/modulefiles/utils/sems-v2-modules-init.sh"
eval "$MODULE_ENVIRONMENT"
module load sems-cmake sems-git
BASE_MODULE_LIST="sems-cmake,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
SKIP_HWLOC=True
# No sems hwloc module
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG=""
fi
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/8.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/10.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"clang/11.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"clang/14.0.2 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"intel/19.0.5 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
"intel/19.1.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
"intel/2021.3 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
)
elif [ "$MACHINE" = "sogpu" ]; then
module purge
MODULE_ENVIRONMENT="sh /projects/sems/modulefiles/utils/sems-v2-modules-init.sh"
eval "$MODULE_ENVIRONMENT"
module load sems-cmake sems-git
BASE_MODULE_LIST="sems-cmake,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
CUDA_MODULE_LIST="sems-cmake,sems-gcc/7.2.0,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
CUDA11_MODULE_LIST="sems-cmake,sems-gcc/8.3.0,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
CUDA11_MODULE_TPL_LIST="$CUDA11_MODULE_LIST,sems-openblas/0.3.10"
SKIP_HWLOC=True
# No sems hwloc module
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=Volta70"
fi
if [ "$SPOT_CHECK" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("cuda/11.1.0 $CUDA11_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("cuda/11.1.0 $CUDA11_MODULE_TPL_LIST "Cuda_Serial" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/8.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/10.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"clang/11.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"clang/14.0.2 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"intel/19.0.5 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
"intel/19.1.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
"intel/2021.3 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
"cuda/11.1.0 $CUDA11_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"cuda/11.4.2 $CUDA11_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
)
fi
elif [ "$MACHINE" = "sorh7" ]; then
module load sems-cmake/3.23.1 sems-git
BASE_MODULE_LIST="sems-cmake/3.23.1,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
INTEL_BASE_MODULE_LIST="sems-cmake/3.23.1,sems-gcc/8.3.0,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
CLANG_BASE_MODULE_LIST="sems-cmake/3.23.1,sems-gcc/10.1.0,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
SKIP_HWLOC=True
# No sems hwloc module
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=SKX"
fi
if [ "$SPOT_CHECK" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("intel/19.0.5 $INTEL_BASE_MODULE_LIST "OpenMP,Threads" icpc $INTEL_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("intel/19.0.5 $INTEL_BASE_MODULE_LIST "OpenMP,Threads" icpc $INTEL_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/8.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"clang/10.0.1 $CLANG_BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"intel/19.0.5 $INTEL_BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
)
fi
elif [ "$MACHINE" = "inouye" ]; then
MODULE_ENVIRONMENT="module purge"
eval "$MODULE_ENVIRONMENT"
SKIP_HWLOC=True
export omp_proc_bind=close
export omp_places=cores
export omp_num_threads=47
BASE_MODULE_LIST="cmake/3.17.0,<COMPILER_NAME>/<COMPILER_VERSION>"
ARMPL_MODULE_TPL_LIST="cmake/3.17.0,gcc/10.2.0,<COMPILER_NAME>/<COMPILER_VERSION>"
ARMPL_MODULE_TPL_LIST="cmake/3.17.0,gcc/10.2.0,<COMPILER_NAME>/<COMPILER_VERSION>"
ARMCLANG_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized"
GCC_BUILD_LIST="OpenMP,Serial,OpenMP_Serial"
if [ "$SPOT_CHECK" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/10.2.0 $BASE_MODULE_LIST "OpenMP_Serial" g++ $GCC_WARNING_FLAGS"
#"arm/20.3 $BASE_MODULE_LIST "OpenMP_Serial" armclang++ $ARMCLANG_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("armpl/20.3.0 $ARMPL_MODULE_TPL_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
"armpl/21.0.0 $ARMPL_MODULE_TPL_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
"armpl/21.1.0 $ARMPL_MODULE_TPL_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/10.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"armpl/20.3.0 $ARMPL_MODULE_TPL_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"armpl/21.0.0 $ARMPL_MODULE_TPL_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"armpl/21.1.0 $ARMPL_MODULE_TPL_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
#"arm/20.3 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST armclang++ $ARMCLANG_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=A64FX"
fi
SPACK_HOST_ARCH="+a64fx"
elif [ "$MACHINE" = "weaver" ]; then
# Use the legacy env for now until all modules are part of the new system
MODULE_ENVIRONMENT="source /projects/ppc64le-pwr9-rhel8/legacy-env.sh"
eval "$MODULE_ENVIRONMENT"
SKIP_HWLOC=True
GCC93_MODULE_TPL_LIST="cmake/3.23.1,<COMPILER_NAME>/<COMPILER_VERSION>,openblas/0.3.20/gcc/9.3.0,gcc/9.3.0"
CLANG13_MODULE_TPL_LIST="cmake/3.23.1,<COMPILER_NAME>/<COMPILER_VERSION>,openblas/0.3.20/gcc/9.3.0,cuda/10.1.243,gcc/9.3.0"
BASE_MODULE_LIST="cmake/3.23.1,<COMPILER_NAME>/<COMPILER_VERSION>"
# Cuda/11 modules available rhel8 queue (rhel8 OS); gcc/8.3.1 load by default
RHEL8_CUDA11_MODULE_LIST="cmake/3.23.1,cuda/11.2.2/gcc/8.3.1,openblas/0.3.18/gcc/8.3.1"
# Don't do Threads on weaver
GCC_IBM_BUILD_LIST="OpenMP,Serial,OpenMP_Serial"
if [ "$SPOT_CHECK" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("cuda/11.2.2/gcc/8.3.1 $RHEL8_CUDA11_MODULE_LIST "Cuda_OpenMP" ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"gcc/9.3.0 $BASE_MODULE_LIST $GCC_IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("cuda/11.2.2/gcc/8.3.1 $RHEL8_CUDA11_MODULE_LIST "Cuda_Serial" ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"gcc/9.3.0 $GCC93_MODULE_TPL_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
"clang/13.0.0 $CLANG13_MODULE_TPL_LIST "Cuda" clang++ $CUDA_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/8.3.1 $BASE_MODULE_LIST $GCC_IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/9.3.0 $BASE_MODULE_LIST $GCC_IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"cuda/11.2.2/gcc/8.3.1 $RHEL8_CUDA11_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"clang/13.0.0 $CLANG13_MODULE_TPL_LIST $CUDA_IBM_BUILD_LIST clang++ $CUDA_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=Power9,Volta70"
fi
SPACK_HOST_ARCH="+power9"
SPACK_CUDA_ARCH="+volta70"
elif [ "$MACHINE" = "caraway" ]; then
SKIP_HWLOC=True
# BUILD_ONLY=True
# report_and_log_test_result: only testing compilation of code for now,
# output description and success based only on build succes; build time output (no run-time)
BASE_MODULE_LIST="cmake,<COMPILER_NAME>/<COMPILER_VERSION>"
ROCM520_MODULE_LIST="$BASE_MODULE_LIST,openblas/0.3.20"
HIPCLANG_BUILD_LIST="Hip_Serial"
HIPCLANG_WARNING_FLAGS=""
if [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("rocm/5.2.0 $ROCM520_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("rocm/5.2.0 $BASE_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
"gcc/11.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=VEGA908"
fi
elif [ "$MACHINE" = "vega90a_caraway" ]; then
SKIP_HWLOC=True
# BUILD_ONLY=True
# report_and_log_test_result: only testing compilation of code for now,
# output description and success based only on build succes; build time output (no run-time)
BASE_MODULE_LIST="cmake,<COMPILER_NAME>/<COMPILER_VERSION>"
ROCM520_MODULE_LIST="$BASE_MODULE_LIST,openblas/0.3.20"
ROCM_TPL_MODULE_LIST="$BASE_MODULE_LIST,openblas/0.3.23"
HIPCLANG_BUILD_LIST="Hip_Serial"
HIPCLANG_WARNING_FLAGS=""
if [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("rocm/5.6.1 $ROCM_TPL_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
"rocm/6.0.0 $ROCM_TPL_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("rocm/5.2.0 $BASE_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
"rocm/5.6.1 $BASE_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
"rocm/6.0.0 $BASE_MODULE_LIST $HIPCLANG_BUILD_LIST hipcc $HIPCLANG_WARNING_FLAGS"
"gcc/11.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=VEGA90A"
fi
elif [ "$MACHINE" = "blake" ]; then
MODULE_ENVIRONMENT="source /projects/x86-64-icelake-rocky8/spack-config/blake-setup-user-module-env.sh"
eval "$MODULE_ENVIRONMENT"
SKIP_HWLOC=True
module load cmake
BASE_MODULE_LIST="cmake,<COMPILER_NAME>/<COMPILER_VERSION>"
BASE_MODULE_LIST_TPLS="cmake,<COMPILER_NAME>/<COMPILER_VERSION>,openblas/0.3.23"
BASE_MODULE_LIST_ONEAPI_202310="cmake,<COMPILER_NAME>-oneapi-compilers/<COMPILER_VERSION>,intel-oneapi-dpl/2022.1.0,intel-oneapi-mkl/2023.1.0,intel-oneapi-tbb/2021.9.0"
BASE_MODULE_LIST_ONEAPI_202320="cmake,<COMPILER_NAME>-oneapi-compilers/<COMPILER_VERSION>,intel-oneapi-dpl/2022.2.0,intel-oneapi-mkl/2023.2.0,intel-oneapi-tbb/2021.10.0"
ONEAPI_FLAGS_EXTRA="-fp-model=precise"
LLVM_EXTRA_FLAGS="-fPIC ${CLANG_WARNING_FLAGS}"
# Remove -Wuninitialized: compiler issues show up with Threads backend
GCC11_WARNING_FLAGS="-Wall,-Wunused-parameter,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wignored-qualifiers,-Wempty-body,-Wclobbered,-Wimplicit-fallthrough"
# update KOKKOS_PASSTHRU_CMAKE_FLAGS to disable onedpl on Blake
KOKKOS_PASSTHRU_CMAKE_FLAGS="${KOKKOS_PASSTHRU_CMAKE_FLAGS} -DKokkos_ENABLE_ONEDPL=OFF"
if [ "$SPOT_CHECK" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("intel/2023.1.0 $BASE_MODULE_LIST_ONEAPI_202310 "OpenMP,Threads,Serial" icpx $ONEAPI_FLAGS_EXTRA"
"intel/2023.2.0 $BASE_MODULE_LIST_ONEAPI_202320 "OpenMP,Threads,Serial" icpx $ONEAPI_FLAGS_EXTRA"
"llvm/15.0.7 $BASE_MODULE_LIST "Threads,Serial" clang++ $LLVM_EXTRA_FLAGS"
"gcc/11.3.0 $BASE_MODULE_LIST "OpenMP,Threads,Serial" g++ $GCC11_WARNING_FLAGS"
"gcc/12.2.0 $BASE_MODULE_LIST "OpenMP,Threads,Serial" g++ $GCC11_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
# Known issues:
# gcc/12.2.0+openblas/0.3.23 with OpenMP: internal compiler error: in get_vectype_for_scalar_type, at tree-vect-stmts
COMPILERS=("intel/2023.1.0 $BASE_MODULE_LIST_ONEAPI_202310 "OpenMP,Threads,Serial" icpx $ONEAPI_FLAGS_EXTRA"
"intel/2023.2.0 $BASE_MODULE_LIST_ONEAPI_202320 "OpenMP,Threads,Serial" icpx $ONEAPI_FLAGS_EXTRA"
"llvm/15.0.7 $BASE_MODULE_LIST_TPLS "Threads,Serial" clang++ $LLVM_EXTRA_FLAGS"
"gcc/11.3.0 $BASE_MODULE_LIST_TPLS "OpenMP,Threads,Serial" g++ $GCC11_WARNING_FLAGS"
"gcc/12.2.0 $BASE_MODULE_LIST_TPLS "OpenMP,Threads,Serial" g++ $GCC11_WARNING_FLAGS"
)
else
# gcc/12.2.0 with OpenMP: internal compiler error: in get_vectype_for_scalar_type, at tree-vect-stmts
COMPILERS=("intel/2023.1.0 $BASE_MODULE_LIST_ONEAPI_202310 $INTEL_BUILD_LIST icpx $ONEAPI_FLAGS_EXTRA"
"intel/2023.2.0 $BASE_MODULE_LIST_ONEAPI_202320 $INTEL_BUILD_LIST icpx $ONEAPI_FLAGS_EXTRA"
"llvm/15.0.7 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $LLVM_EXTRA_FLAGS"
"gcc/11.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC11_WARNING_FLAGS"
"gcc/12.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC11_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=SPR"
fi
SPACK_HOST_ARCH="+spr"
elif [ "$MACHINE" = "solo" ]; then
SKIP_HWLOC=True
export SLURM_TASKS_PER_NODE=32
module load cmake
BASE_MODULE_LIST="cmake,<COMPILER_NAME>/<COMPILER_VERSION>"
BASE_MODULE_LIST_LLVM="cmake,<COMPILER_NAME>/<COMPILER_VERSION>,gnu/10.3.1"
BASE_MODULE_LIST_INTEL="cmake,<COMPILER_NAME>/<COMPILER_VERSION>"
ONEAPI_WARNING_FLAGS=""
GNU103_MODULE_TPL_LIST="$BASE_MODULE_LIST,openblas/0.3.21"
if [ "$SPOT_CHECK" = "True" ]; then
COMPILERS=("gnu/10.3.1 $BASE_MODULE_LIST "Threads_Serial,OpenMP" g++ $GNU_WARNING_FLAGS"
"llvm/10.0.1 $BASE_MODULE_LIST_LLVM "Threads_Serial" clang++ $CLANG_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
COMPILERS=("intel/19.1 $BASE_MODULE_LIST_INTEL,mkl/19.1 "OpenMP,Threads" icpc $INTEL_WARNING_FLAGS"
"gnu/10.3.1 $GNU103_MODULE_TPL_LIST "OpenMP_Serial" g++ $GNU_WARNING_FLAGS"
)
else
COMPILERS=("gnu/10.3.1 $BASE_MODULE_LIST $GNU_BUILD_LIST g++ $GNU_WARNING_FLAGS"
"gnu/11.2.1 $BASE_MODULE_LIST $GNU_BUILD_LIST g++ $GNU_WARNING_FLAGS"
"gnu/12.1.1 $BASE_MODULE_LIST $GNU_BUILD_LIST g++ $GNU_WARNING_FLAGS"
"llvm/10.0.1 $BASE_MODULE_LIST_LLVM $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"intel/19.1 $BASE_MODULE_LIST_INTEL,mkl/19.1 "$INTEL_BUILD_LIST" icpc $INTEL_WARNING_FLAGS"
"intel/21.3.0 $BASE_MODULE_LIST_INTEL,mkl/21.3.0 "$INTEL_BUILD_LIST" icpc $INTEL_WARNING_FLAGS"
"intel/23.0.0 $BASE_MODULE_LIST_INTEL,mkl/23.0.0 "$INTEL_BUILD_LIST" icpc $INTEL_WARNING_FLAGS"
"intel/23.1.0 $BASE_MODULE_LIST_INTEL,mkl/23.1.0 "$INTEL_BUILD_LIST" icpc $INTEL_WARNING_FLAGS"
"intel/23.2.0 $BASE_MODULE_LIST_INTEL,mkl/23.2.0 "$INTEL_BUILD_LIST" icpc $INTEL_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=BDW"
fi
SPACK_HOST_ARCH="+bdw"
elif [ "$MACHINE" = "kokkos-dev-2" ]; then
MODULE_ENVIRONMENT="source /projects/sems/modulefiles/utils/sems-archive-modules-init.sh ; module use /home/projects/x86-64/modulefiles/local"
eval "$MODULE_ENVIRONMENT"
module load sems-archive-env
module load sems-archive-git
module load sems-archive-tex
module load sems-archive-cmake/3.17.1
module load sems-archive-gdb
SKIP_HWLOC=True
BASE_MODULE_LIST="sems-archive-env,sems-archive-cmake/3.17.1,sems-archive-<COMPILER_NAME>/<COMPILER_VERSION>"
INTEL_BASE_MODULE_LIST="sems-archive-env,sems-archive-cmake/3.17.1,sems-archive-gcc/8.3.0,sems-archive-<COMPILER_NAME>/<COMPILER_VERSION>"
CLANG_BASE_MODULE_LIST="sems-archive-env,sems-archive-cmake/3.17.1,sems-archive-gcc/9.2.0,sems-archive-<COMPILER_NAME>/<COMPILER_VERSION>"
GCC91_MODULE_LIST="sems-archive-env,sems-archive-cmake/3.17.1,<COMPILER_NAME>/<COMPILER_VERSION>"
NVCC_SEMSMODULE_LIST="sems-archive-env,sems-archive-cmake/3.17.1,sems-archive-gcc/8.3.0,sems-archive-<COMPILER_NAME>/<COMPILER_VERSION>"
NVCC11_MODULE_LIST="sems-archive-env,sems-archive-cmake/3.17.1,sems-archive-gcc/9.2.0,<COMPILER_NAME>/<COMPILER_VERSION>"
LOCAL_MODULE_LIST="cmake/3.21.1,<COMPILER_NAME>/<COMPILER_VERSION>"
BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_Threads"
BUILD_LIST_CLANG="Serial,Threads,OpenMP"
CLANG8_CUDA_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized,-Wno-pass-failed"
if [ "$SPOT_CHECK" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/8.3.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS"
"gcc/9.1 $GCC91_MODULE_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
"intel/19.0.5 $INTEL_BASE_MODULE_LIST "Threads" icpc $INTEL_WARNING_FLAGS"
"clang/9.0.0 $CLANG_BASE_MODULE_LIST "Serial,Threads" clang++ $CLANG_WARNING_FLAGS"
"cuda/11.0 $NVCC11_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("gcc/8.3.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS"
"gcc/9.1 $GCC91_MODULE_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
"intel/19.0.5 $INTEL_BASE_MODULE_LIST "Threads" icpc $INTEL_WARNING_FLAGS"
"clang/9.0.0 $CLANG_BASE_MODULE_LIST "Serial,Threads" clang++ $CLANG_WARNING_FLAGS"
"cuda/11.0 $NVCC11_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
)
else
# Format: (compiler module-list build-list exe-name warning-flag)
COMPILERS=("cuda/11.0 $NVCC11_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"cuda/11.1 $NVCC_SEMSMODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"cuda/11.2 $NVCC11_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"cuda/11.7 $NVCC11_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"cuda/12.0 $NVCC11_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
"gcc/8.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/9.1 $GCC91_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/9.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/10.3 $LOCAL_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"gcc/11.1 $LOCAL_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
"intel/19.0.5 $INTEL_BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
"clang/9.0.0 $CLANG_BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
"clang/10.0.0 $CLANG_BASE_MODULE_LIST $BUILD_LIST_CLANG clang++ $CLANG_WARNING_FLAGS"
"clang/13.0.0 $LOCAL_MODULE_LIST $BUILD_LIST_CLANG clang++ $CLANG_WARNING_FLAGS"
)
fi
if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=Volta70"
fi
SPACK_CUDA_ARCH="+volta70"
else
echo "Unhandled machine $MACHINE" >&2
exit 1
fi
export OMP_NUM_THREADS=${omp_num_threads:=8}
export OMP_PROC_BIND=${omp_proc_bind:=spread}
export OMP_PLACES=${omp_places:=cores}
export KOKKOS_NUM_THREADS=8
declare -i NUM_RESULTS_TO_KEEP=7
RESULT_ROOT_PREFIX=TestAll
if [ "$PRINT_HELP" = "True" ]; then
print_help
exit 0
fi
UNCOMMITTED=`cd ${KOKKOSKERNELS_PATH}; git status --porcelain 2>/dev/null`
if ! [ -z "$UNCOMMITTED" ]; then
echo "WARNING!! THE FOLLOWING CHANGES ARE UNCOMMITTED!! :"
echo "$UNCOMMITTED"
echo ""
fi
GITSTATUS=`cd ${KOKKOSKERNELS_PATH}; git log -n 1 --format=oneline`
echo "KokkosKernels Repository Status: " ${GITSTATUS}
echo ""
KOKKOSGITSTATUS=`cd ${KOKKOS_PATH}; git log -n 1 --format=oneline`
echo "Kokkos Repository Status: " ${KOKKOSGITSTATUS}
echo ""
echo ""
# Set build type.
if [ "$DEBUG" = "True" ]; then
BUILD_TYPE=debug
else
BUILD_TYPE=release
fi
# If no args provided, do all compilers.
if [ -z "$ARGS" ]; then
ARGS='?'
fi
# Process args to figure out which compilers to test.
COMPILERS_TO_TEST=""
for ARG in $ARGS; do
for COMPILER_DATA in "${COMPILERS[@]}"; do
ARR=($COMPILER_DATA)
COMPILER=${ARR[0]}
if [[ "$COMPILER" = $ARG* ]]; then
if [[ "$COMPILERS_TO_TEST" != *${COMPILER}* ]]; then
COMPILERS_TO_TEST="$COMPILERS_TO_TEST $COMPILER"
else
echo "Tried to add $COMPILER twice"
fi
fi
done
done
if [ "$COMPILERS_TO_TEST" == "" ]; then
echo "-----------------------------------------------"
echo " !!!! Invalid Compiler provided '$ARGS' !!!!"
echo "-----------------------------------------------"
print_help
exit 1
fi
#
# Functions.
#
# get_compiler_name <COMPILER>
get_compiler_name() {
echo $1 | cut -d/ -f1
}
# get_compiler_version <COMPILER>
get_compiler_version() {
echo $1 | cut -d/ -f2
}
# Do not call directly.
get_compiler_data() {
local compiler=$1
local item=$2
local compiler_name=$(get_compiler_name $compiler)
local compiler_vers=$(get_compiler_version $compiler)
local compiler_data
for compiler_data in "${COMPILERS[@]}" ; do
local arr=($compiler_data)
if [ "$compiler" = "${arr[0]}" ]; then
echo "${arr[$item]}" | tr , ' ' | sed -e "s/<COMPILER_NAME>/$compiler_name/g" -e "s/<COMPILER_VERSION>/$compiler_vers/g"
return 0
fi
done
# Not found.
echo "Unrecognized compiler $compiler" >&2
exit 1
}
get_variants_data() {
local compiler=$1
local item=$2
local variants_data
for variants_data in "${SPACK_VARIANTS[@]}" ; do
local arr=($variants_data)
matcher="${arr[0]}/${arr[1]}"
if [ "$compiler" = "$matcher" ]; then
if [ "$item" = 4 ]; then
echo "%${arr[0]}@${arr[1]}"
else
echo "${arr[$item]}"| tr , ' ' | sed -e "s/<SPACK_HOST_ARCH>/$SPACK_HOST_ARCH/g" -e "s/<SPACK_CUDA_ARCH>/$SPACK_CUDA_ARCH/g"
fi
return 0
fi
done
# Not found.
echo "Unrecognized compiler $compiler when looking for Spack variants" >&2
exit 1
}
#
# For all getters, usage: <GETTER> <COMPILER>
#
get_compiler_modules() {
get_compiler_data $1 1
}
get_compiler_build_list() {
get_compiler_data $1 2
}
get_compiler_exe_name() {
get_compiler_data $1 3
}
get_compiler_warning_flags() {
get_compiler_data $1 4
}
get_kernels_variants() {
get_variants_data $1 2
}
get_kokkos_variants() {