@@ -372,7 +372,7 @@ ifeq ($(cxx_is_llvm_intel),1)
372
372
-fimf-precision=low -fp-model fast -fimf-domain-exclusion=none -fma
373
373
YK_CXXWARN2 += -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-but-set-variable \
374
374
-Wno-unused-const-variable -fno-color-diagnostics
375
- OMPFLAG := -fiopenmp
375
+ OMPFLAG := -qopenmp
376
376
SWIG_CXXFLAGS += -Wno-deprecated-declarations
377
377
MACROS += INTEL_OMP
378
378
VEC_MACROS += NO_PRAGMA_VEC2
@@ -881,7 +881,6 @@ help:
881
881
echo " $( MAKE) clean; $( MAKE) -j stencil=ssg YK_CXXOPT='-O2' # Use O2 optimization" ; \
882
882
echo " $( MAKE) clean; $( MAKE) -j stencil=ssg YK_CXX=icpc # Use classic Intel compiler" ; \
883
883
echo " $( MAKE) clean; $( MAKE) -j stencil=ssg YK_CXX=g++ # Use gnu compiler" ; \
884
- echo " $( MAKE) clean; $( MAKE) -j stencil=ssg MPI_CXX=mpiCC # Specify MPI compiler" ; \
885
884
echo " "
886
885
@echo " Example builds of kernel API for C++ and Python apps:" ; \
887
886
echo " $( MAKE) clean; $( MAKE) -j stencil=iso3dfd yk-api" ; \
@@ -910,21 +909,29 @@ help:
910
909
first_test := 0
911
910
last_test := 999
912
911
912
+ # Default regex for stencil to run.
913
+ test_regex := .
914
+
913
915
TEST_MAKE_ARGS := real_bytes=8 use_rcp=0 allow_new_var_types=0 trace=1
914
916
TEST_MAKE := $(MAKE ) $(TEST_MAKE_ARGS )
915
917
916
- # Define makefile functions for folding.
917
918
# Set default threads.
918
- # Disable folding and checking for offload testing.
919
+ # Enable checking for CPU testing.
919
920
ifeq ($(offload ) ,1)
920
- FOLD =
921
921
outer_threads := 2
922
922
inner_threads := 2
923
923
else
924
- TEST_MAKE_ARGS += check=1
925
- FOLD = fold=$(subst $(space ) ,$(comma ) ,$(1 ) )
926
924
outer_threads := 8
927
925
inner_threads := 2
926
+ TEST_MAKE_ARGS += check=1
927
+ endif
928
+
929
+ # Define makefile functions for folding.
930
+ # Disable folding for non-vectorized arch.
931
+ ifeq ($(arch ) ,intel64)
932
+ FOLD =
933
+ else
934
+ FOLD = fold=$(subst $(space ) ,$(comma ) ,$(1 ) )
928
935
endif
929
936
930
937
# ## Unit tests.
@@ -1041,7 +1048,7 @@ test_args10 := $(DEF_MPI_TEST_ARGS) -l 64 -b 24 -mb 16 -bt 2 -no-use_shm -overla
1041
1048
test_args11 := $(DEF_MPI_TEST_ARGS ) -l 64 -b 24 -mb 16 -bt 2 -use_shm -no-overlap_comms $(EXTRA_TEST_ARGS )
1042
1049
endif
1043
1050
1044
- # Run the kernel binary using several combos of sizes and ranks .
1051
+ # Run the kernel binary using the test args defined above .
1045
1052
yk-tests :
1046
1053
if (( $(first_test) <= 0 && $(last_test) >= 0 )) ; then $( YK_SCRIPT) $( test_args0) ; fi
1047
1054
if (( $(first_test) <= 1 && $(last_test) >= 1 )) ; then $( YK_SCRIPT) $( test_args1) ; fi
@@ -1057,15 +1064,19 @@ yk-mpi-tests:
1057
1064
# Run the default YASK compiler and kernel.
1058
1065
# First run on 1 rank, then multiple ranks if ranks>1.
1059
1066
# This is the primary target for building and running stencil tests.
1060
- yc-and-yk-test : $(YK_EXEC ) $(YK_SCRIPT )
1061
- $(MAKE ) ranks=1 yk-tests
1062
- if (( $(ranks) > 1 )) ; then $( MAKE) yk-tests yk-mpi-tests; fi
1067
+ yc-and-yk-test : $(YK_SCRIPT )
1068
+ @ echo " Running tests that match regex '$( test_regex) ' numbered from $( first_test) to $( last_test) ..."
1069
+ if [[ $( stencil) =~ $( test_regex) ]]; then \
1070
+ $(MAKE ) $(YK_EXEC ) && \
1071
+ $(MAKE ) ranks=1 yk-tests && \
1072
+ if (( $(ranks) > 1 )) ; then $( MAKE) yk-tests yk-mpi-tests; fi ; \
1073
+ fi
1063
1074
STENCIL_TEST := $(TEST_MAKE ) yc-and-yk-test
1064
1075
1065
1076
# Run the YASK kernel test without implicity using the YASK compiler.
1066
1077
yk-test-no-yc : kernel-no-yc $(YK_SCRIPT )
1067
1078
$(MAKE ) ranks=1 yk-tests
1068
- if (( $(ranks) > 1 )) ; then $( MAKE) yk-tests yk-mpi-tests; fi
1079
+ (( $(ranks) > 1 )) && $(MAKE ) yk-tests yk-mpi-tests
1069
1080
1070
1081
# Run the kernel API tests for C++ and Python with and w/o expected exceptions.
1071
1082
api-tests :
@@ -1159,20 +1170,6 @@ single-stencil-tests:
1159
1170
4d-tests :
1160
1171
$(MAKE ) clean; $(STENCIL_TEST ) stencil=test_4d $(call FOLD,w=2 x=2)
1161
1172
1162
- # Selected collections from above for testing specific features.
1163
- scratch-tests :
1164
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_scratch_1d $(call FOLD,x=4)
1165
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_scratch_stages_1d $(call FOLD,x=4)
1166
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_scratch_boundary_1d $(call FOLD,x=4)
1167
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_scratch_2d $(call FOLD,x=2 y=2)
1168
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_scratch_3d $(call FOLD,x=2 z=2) inner_loop_dim=x
1169
-
1170
- boundary-tests :
1171
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_boundary_1d $(call FOLD,x=4)
1172
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_scratch_boundary_1d $(call FOLD,x=4)
1173
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_boundary_2d $(call FOLD,x=2 y=2)
1174
- $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_boundary_3d $(call FOLD,x=2 y=2) inner_loop_dim=1
1175
-
1176
1173
# The standard set of stencils to test.
1177
1174
stencil-tests :
1178
1175
$(MAKE ) 1d-tests
@@ -1184,6 +1181,16 @@ stencil-tests:
1184
1181
if (( $(offload) == 0 )) ; then $( MAKE) 3d-tests4; fi
1185
1182
$(MAKE ) 4d-tests
1186
1183
1184
+ # Pre-defined feature tests.
1185
+ scratch-tests :
1186
+ $(MAKE ) stencil-tests test_regex=scratch
1187
+
1188
+ boundary-tests :
1189
+ $(MAKE ) stencil-tests test_regex=boundary
1190
+
1191
+ stages-tests :
1192
+ $(MAKE ) stencil-tests test_regex=stages
1193
+
1187
1194
unit-tests :
1188
1195
$(MAKE ) clean; $(MAKE ) cxx-yk-omp-test
1189
1196
$(MAKE ) clean; $(MAKE ) cxx-yk-var-test stencil=test_3d $(call FOLD,x=2 y=2)
@@ -1193,9 +1200,9 @@ all-tests:
1193
1200
$(MAKE ) api-tests
1194
1201
$(MAKE ) stencil-tests
1195
1202
1196
- # Install the script .
1203
+ # Install the scripts .
1197
1204
# Then, build and run all the tests.
1198
1205
all :
1199
- $(MAKE ) script
1206
+ $(MAKE ) scripts
1200
1207
$(MAKE ) all-tests
1201
1208
0 commit comments