Skip to content

Commit 0d6b3ee

Browse files
committed
Clean up OpenMP Target teststo get a passing GitLab CI check
1 parent a586ffa commit 0d6b3ee

File tree

23 files changed

+137
-295
lines changed

23 files changed

+137
-295
lines changed

test/functional/forall/CombiningAdapter/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
#
1111
set(DIMENSIONS 1D 2D 3D)
1212

13+
##
14+
## Enable OpenMP Target tests when support for Combining Adapter is fixed
15+
##
16+
if(RAJA_ENABLE_TARGET_OPENMP)
17+
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
18+
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
19+
endif()
20+
endif()
21+
1322
#
1423
# Generate tests for each enabled RAJA back-end.
1524
#

test/functional/forall/atomic-ref/CMakeLists.txt

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,12 @@
1010
#
1111
set(TESTTYPES AtomicRefAdd AtomicRefSub AtomicRefLoadStore AtomicRefCAS AtomicRefMinMax AtomicRefLogical)
1212

13-
#
14-
# If building a subset of openmp target tests, remove the back-end from
15-
# from the list of tests to generate here.
16-
#
17-
if(RAJA_ENABLE_TARGET_OPENMP)
18-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
19-
list(REMOVE_ITEM FORALL_ATOMIC_BACKENDS OpenMPTarget)
20-
endif()
21-
endif()
22-
2313
#
2414
# Generate atomicref tests for each enabled RAJA back-end.
2515
#
2616
# Note: FORALL_ATOMIC_BACKENDS is defined in ../CMakeLists.txt
2717
#
18+
2819
foreach( ATOMIC_BACKEND ${FORALL_ATOMIC_BACKENDS} )
2920
foreach( TEST ${TESTTYPES} )
3021
configure_file( test-forall-atomicref.cpp.in
@@ -33,34 +24,8 @@ foreach( ATOMIC_BACKEND ${FORALL_ATOMIC_BACKENDS} )
3324
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
3425

3526
target_include_directories(test-forall-${TEST}-${ATOMIC_BACKEND}.exe
36-
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
27+
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
3728
endforeach()
3829
endforeach()
3930

4031
unset( TESTTYPES )
41-
42-
#
43-
# If building a subset of openmp target tests, add tests to build here.
44-
#
45-
if(RAJA_ENABLE_TARGET_OPENMP)
46-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
47-
48-
set(ATOMIC_BACKEND OpenMPTarget)
49-
set(TESTTYPES AtomicRefAdd AtomicRefCAS)
50-
51-
foreach( TEST ${TESTTYPES} )
52-
configure_file( test-forall-atomicref.cpp.in
53-
test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
54-
raja_add_test( NAME test-forall-${TEST}-${ATOMIC_BACKEND}
55-
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
56-
57-
target_include_directories(test-forall-${TEST}-${ATOMIC_BACKEND}.exe
58-
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
59-
endforeach()
60-
61-
unset( TESTTYPES )
62-
63-
endif()
64-
endif()
65-
66-

test/functional/forall/atomic-view/CMakeLists.txt

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,12 @@
1010
#
1111
set(TESTTYPES AtomicView AtomicMultiView)
1212

13-
#
14-
# If building a subset of openmp target tests, remove the back-end from
15-
# from the list of tests to generate here.
16-
#
17-
if(RAJA_ENABLE_TARGET_OPENMP)
18-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
19-
list(REMOVE_ITEM FORALL_ATOMIC_BACKENDS OpenMPTarget)
20-
endif()
21-
endif()
22-
2313
#
2414
# Generate tests for each enabled RAJA back-end.
2515
#
2616
# Note: FORALL_ATOMIC_BACKENDS is defined in ../CMakeLists.txt
2717
#
18+
2819
foreach( ATOMIC_BACKEND ${FORALL_ATOMIC_BACKENDS} )
2920
foreach( TEST ${TESTTYPES} )
3021
configure_file( test-forall-atomic-view.cpp.in
@@ -39,30 +30,6 @@ endforeach()
3930

4031
unset( TESTTYPES )
4132

42-
#
43-
# If building a subset of openmp target tests, add tests to build here.
44-
#
45-
if(RAJA_ENABLE_TARGET_OPENMP)
46-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
47-
48-
set(ATOMIC_BACKEND OpenMPTarget)
49-
set(TESTTYPES AtomicMultiView)
50-
51-
foreach( TEST ${TESTTYPES} )
52-
configure_file( test-forall-atomic-view.cpp.in
53-
test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
54-
raja_add_test( NAME test-forall-${TEST}-${ATOMIC_BACKEND}
55-
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
56-
57-
target_include_directories(test-forall-${TEST}-${ATOMIC_BACKEND}.exe
58-
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
59-
endforeach()
60-
61-
unset(TESTTYPES)
62-
63-
endif()
64-
endif()
65-
6633
#
6734
# Testing failure cases with only Sequential. Failures for various backends differ immensely.
6835
#
@@ -81,4 +48,3 @@ foreach( ATOMIC_BACKEND ${FORALL_FAIL_ATOMIC_BACKENDS} )
8148
endforeach()
8249

8350
unset(FAILTESTS)
84-

test/functional/forall/indexset-view/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,12 @@
1010
#
1111
set(INDEXSETTESTTYPES IndexSetView IcountIndexSetView)
1212

13-
if(RAJA_ENABLE_TARGET_OPENMP)
14-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
15-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
16-
endif()
17-
endif()
18-
1913
#
2014
# Generate tests for each enabled RAJA back-end.
2115
#
2216
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
2317
#
18+
2419
foreach( BACKEND ${FORALL_BACKENDS} )
2520
foreach( INDEXSETTESTTYPE ${INDEXSETTESTTYPES} )
2621
configure_file( test-forall-indexset-view.cpp.in

test/functional/forall/multi-reduce-basic/CMakeLists.txt

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@
1111
set(REDUCETYPES Sum Min Max BitAnd BitOr)
1212

1313
#
14-
# If building openmp target tests, remove the back-end to
15-
# from the list of tests to generate here.
14+
# Do not create tests for OpenMP Target, support not currently implemented
1615
#
1716
if(RAJA_ENABLE_TARGET_OPENMP)
18-
#if(RAJA_TEST_OPENMP_TARGET_SUBSET)
19-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
20-
#endif()
17+
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
2118
endif()
2219

2320
#
24-
# If building SYCL tests, remove the back-end to
25-
# from the list of tests to generate here.
21+
# Do not create tests for SYCL, support not currently implemented
2622
#
2723
if(RAJA_ENABLE_SYCL)
2824
list(REMOVE_ITEM FORALL_BACKENDS Sycl)
@@ -33,6 +29,7 @@ endif()
3329
#
3430
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
3531
#
32+
3633
foreach( BACKEND ${FORALL_BACKENDS} )
3734
foreach( REDUCETYPE ${REDUCETYPES} )
3835
configure_file( test-forall-basic-multi-reduce.cpp.in
@@ -46,28 +43,3 @@ foreach( BACKEND ${FORALL_BACKENDS} )
4643
endforeach()
4744

4845
unset( REDUCETYPES )
49-
50-
51-
#
52-
# If building a subset of openmp target tests, add tests to build here.
53-
#
54-
#if(RAJA_ENABLE_TARGET_OPENMP)
55-
# if(RAJA_TEST_OPENMP_TARGET_SUBSET)
56-
#
57-
# set(BACKEND OpenMPTarget)
58-
# set(REDUCETYPES ReduceSum)
59-
#
60-
# foreach( REDUCETYPE ${REDUCETYPES} )
61-
# configure_file( test-forall-basic-multi-reduce.cpp.in
62-
# test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}.cpp )
63-
# raja_add_test( NAME test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}
64-
# SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}.cpp )
65-
#
66-
# target_include_directories(test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}.exe
67-
# PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
68-
# endforeach()
69-
#
70-
# endif()
71-
#endif()
72-
73-
unset( REDUCETYPES )

test/functional/forall/reduce-basic/CMakeLists.txt

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,13 @@ set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMaxLoc ReduceMinLoc ReduceMa
1212

1313
set(DATATYPES CoreReductionDataTypeList)
1414

15-
#
16-
# If building a subset of openmp target tests, remove the back-end from
17-
# from the list of tests to generate here.
18-
#
19-
if(RAJA_ENABLE_TARGET_OPENMP)
20-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
21-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
22-
endif()
23-
endif()
24-
2515

2616
#
2717
# Generate core reduction tests for each enabled RAJA back-end
2818
#
2919
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
3020
#
21+
3122
foreach( BACKEND ${FORALL_BACKENDS} )
3223
foreach( REDUCETYPE ${REDUCETYPES} )
3324
configure_file( test-forall-basic-expt-reduce.cpp.in
@@ -86,14 +77,11 @@ set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMinLoc ReduceMaxLoc)
8677

8778
set(DATATYPES CoreReductionDataTypeList)
8879

89-
#
90-
# If building a subset of openmp target tests, remove the back-end from
91-
# from the list of tests to generate here.
92-
#
80+
##
81+
## Do not create OpenMP Target tests for "traditional" RAJA reduction interface
82+
##
9383
if(RAJA_ENABLE_TARGET_OPENMP)
94-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
95-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
96-
endif()
84+
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
9785
endif()
9886

9987
#
@@ -160,30 +148,3 @@ endforeach()
160148

161149
unset( DATATYPES )
162150
unset( REDUCETYPES )
163-
164-
165-
#
166-
# If building a subset of openmp target tests, add tests to build here.
167-
#
168-
if(RAJA_ENABLE_TARGET_OPENMP)
169-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
170-
171-
set(BACKEND OpenMPTarget)
172-
set(REDUCETYPES ReduceSum)
173-
set(DATATYPES CoreReductionDataTypeList)
174-
175-
foreach( REDUCETYPE ${REDUCETYPES} )
176-
configure_file( test-forall-basic-reduce.cpp.in
177-
test-forall-basic-${REDUCETYPE}-${BACKEND}.cpp )
178-
raja_add_test( NAME test-forall-basic-${REDUCETYPE}-${BACKEND}
179-
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-basic-${REDUCETYPE}-${BACKEND}.cpp )
180-
181-
target_include_directories(test-forall-basic-${REDUCETYPE}-${BACKEND}.exe
182-
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
183-
endforeach()
184-
185-
endif()
186-
endif()
187-
188-
unset( DATATYPES )
189-
unset( REDUCETYPES )

test/functional/forall/reduce-multiple-indexset/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
#
1111
set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMinLoc ReduceMaxLoc)
1212

13+
##
14+
## Do not create OpenMP Target tests for "traditional" RAJA reduction interface
15+
##
1316
if(RAJA_ENABLE_TARGET_OPENMP)
14-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
15-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
16-
endif()
17+
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
1718
endif()
1819

1920
#

test/functional/forall/reduce-multiple-segment/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
#
1111
set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMinLoc ReduceMaxLoc)
1212

13+
##
14+
## Do not create OpenMP Target tests for "traditional" RAJA reduction interface
15+
##
1316
if(RAJA_ENABLE_TARGET_OPENMP)
14-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
15-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
16-
endif()
17+
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
1718
endif()
1819

1920
#
@@ -31,6 +32,7 @@ endif()
3132
#
3233
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
3334
#
35+
3436
foreach( BACKEND ${FORALL_BACKENDS} )
3537
foreach( REDUCETYPE ${REDUCETYPES} )
3638
configure_file( test-forall-segment-multiple-reduce.cpp.in

test/functional/forall/resource-indexset/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,12 @@
1010
#
1111
set(INDEXSETTESTTYPES ResourceIndexSet ResourceIcountIndexSet)
1212

13-
if(RAJA_ENABLE_TARGET_OPENMP)
14-
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
15-
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
16-
endif()
17-
endif()
18-
1913
#
2014
# Generate tests for each enabled RAJA back-end.
2115
#
2216
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
2317
#
18+
2419
foreach( BACKEND ${FORALL_BACKENDS} )
2520
foreach( INDEXSETTESTTYPE ${INDEXSETTESTTYPES} )
2621
configure_file( test-forall-resource-indexset.cpp.in

test/functional/kernel/basic-fission-fusion-loop/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
# Note: KERNEL_BACKENDS is defined in ../CMakeLists.txt
1212
#
1313

14+
##
15+
## Enable OpenMP Target tests when support for fission-fusion is fixed
16+
##
17+
if(RAJA_ENABLE_TARGET_OPENMP)
18+
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
19+
list(REMOVE_ITEM KERNEL_BACKENDS OpenMPTarget)
20+
endif()
21+
endif()
22+
1423
foreach( BACKEND ${KERNEL_BACKENDS} )
1524
configure_file( test-kernel-basic-fission-fusion-loop.cpp.in
1625
test-kernel-basic-fission-fusion-loop-${BACKEND}.cpp )

0 commit comments

Comments
 (0)