@@ -372,7 +372,7 @@ ifeq ($(cxx_is_llvm_intel),1)
372372 -fimf-precision=low -fp-model fast -fimf-domain-exclusion=none -fma
373373 YK_CXXWARN2 += -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-but-set-variable \
374374 -Wno-unused-const-variable -fno-color-diagnostics
375- OMPFLAG := -fiopenmp
375+ OMPFLAG := -qopenmp
376376 SWIG_CXXFLAGS += -Wno-deprecated-declarations
377377 MACROS += INTEL_OMP
378378 VEC_MACROS += NO_PRAGMA_VEC2
@@ -881,7 +881,6 @@ help:
881881 echo " $( MAKE) clean; $( MAKE) -j stencil=ssg YK_CXXOPT='-O2' # Use O2 optimization" ; \
882882 echo " $( MAKE) clean; $( MAKE) -j stencil=ssg YK_CXX=icpc # Use classic Intel compiler" ; \
883883 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" ; \
885884 echo " "
886885 @echo " Example builds of kernel API for C++ and Python apps:" ; \
887886 echo " $( MAKE) clean; $( MAKE) -j stencil=iso3dfd yk-api" ; \
@@ -910,21 +909,29 @@ help:
910909first_test := 0
911910last_test := 999
912911
912+ # Default regex for stencil to run.
913+ test_regex := .
914+
913915TEST_MAKE_ARGS := real_bytes=8 use_rcp=0 allow_new_var_types=0 trace=1
914916TEST_MAKE := $(MAKE ) $(TEST_MAKE_ARGS )
915917
916- # Define makefile functions for folding.
917918# Set default threads.
918- # Disable folding and checking for offload testing.
919+ # Enable checking for CPU testing.
919920ifeq ($(offload ) ,1)
920- FOLD =
921921outer_threads := 2
922922inner_threads := 2
923923else
924- TEST_MAKE_ARGS += check=1
925- FOLD = fold=$(subst $(space ) ,$(comma ) ,$(1 ) )
926924outer_threads := 8
927925inner_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 ) )
928935endif
929936
930937# ## Unit tests.
@@ -1041,7 +1048,7 @@ test_args10 := $(DEF_MPI_TEST_ARGS) -l 64 -b 24 -mb 16 -bt 2 -no-use_shm -overla
10411048test_args11 := $(DEF_MPI_TEST_ARGS ) -l 64 -b 24 -mb 16 -bt 2 -use_shm -no-overlap_comms $(EXTRA_TEST_ARGS )
10421049endif
10431050
1044- # Run the kernel binary using several combos of sizes and ranks .
1051+ # Run the kernel binary using the test args defined above .
10451052yk-tests :
10461053 if (( $(first_test) <= 0 && $(last_test) >= 0 )) ; then $( YK_SCRIPT) $( test_args0) ; fi
10471054 if (( $(first_test) <= 1 && $(last_test) >= 1 )) ; then $( YK_SCRIPT) $( test_args1) ; fi
@@ -1057,15 +1064,19 @@ yk-mpi-tests:
10571064# Run the default YASK compiler and kernel.
10581065# First run on 1 rank, then multiple ranks if ranks>1.
10591066# 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
10631074STENCIL_TEST := $(TEST_MAKE ) yc-and-yk-test
10641075
10651076# Run the YASK kernel test without implicity using the YASK compiler.
10661077yk-test-no-yc : kernel-no-yc $(YK_SCRIPT )
10671078 $(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
10691080
10701081# Run the kernel API tests for C++ and Python with and w/o expected exceptions.
10711082api-tests :
@@ -1159,20 +1170,6 @@ single-stencil-tests:
115911704d-tests :
11601171 $(MAKE ) clean; $(STENCIL_TEST ) stencil=test_4d $(call FOLD,w=2 x=2)
11611172
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-
11761173# The standard set of stencils to test.
11771174stencil-tests :
11781175 $(MAKE ) 1d-tests
@@ -1184,6 +1181,16 @@ stencil-tests:
11841181 if (( $(offload) == 0 )) ; then $( MAKE) 3d-tests4; fi
11851182 $(MAKE ) 4d-tests
11861183
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+
11871194unit-tests :
11881195 $(MAKE ) clean; $(MAKE ) cxx-yk-omp-test
11891196 $(MAKE ) clean; $(MAKE ) cxx-yk-var-test stencil=test_3d $(call FOLD,x=2 y=2)
@@ -1193,9 +1200,9 @@ all-tests:
11931200 $(MAKE ) api-tests
11941201 $(MAKE ) stencil-tests
11951202
1196- # Install the script .
1203+ # Install the scripts .
11971204# Then, build and run all the tests.
11981205all :
1199- $(MAKE ) script
1206+ $(MAKE ) scripts
12001207 $(MAKE ) all-tests
12011208
0 commit comments