Skip to content

Commit

Permalink
Merge branch 'develop' into woptim/extended-radiuss-envs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbernede committed Nov 14, 2024
2 parents 75a4cf7 + 5023196 commit 70c72c1
Show file tree
Hide file tree
Showing 25 changed files with 119 additions and 308 deletions.
8 changes: 2 additions & 6 deletions .gitlab/jobs/lassen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,8 @@ gcc_8_3_1_cuda_11_7_desul_atomics:
MODULE_LIST: "cuda/11.7.0"
extends: .job_on_lassen

# Warning: Allowed to fail temporarily
# Deactivated due to issues with OpenMP Target and various tests and compilers.
clang_16_0_6_ibm_omptarget:
clang_16_0_6_omptarget:
variables:
SPEC: " ~shared +openmp +omptarget +tests %clang@=16.0.6.ibm.gcc.8.3.1"
ON_LASSEN: "OFF"
SPEC: " ~shared +openmp +omptarget +tests %clang@=16.0.6.cuda.11.8.0.gcc.11.2.1"
extends: .job_on_lassen
allow_failure: true

2 changes: 1 addition & 1 deletion cmake/SetupRajaOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ option(RAJA_ENABLE_FORCEINLINE_RECURSIVE "Enable Forceinline recursive (only sup
option(RAJA_DEPRECATED_TESTS "Test deprecated features" Off)
option(RAJA_ENABLE_BOUNDS_CHECK "Enable bounds checking in RAJA::Views/Layouts" Off)
option(RAJA_TEST_EXHAUSTIVE "Build RAJA exhaustive tests" Off)
option(RAJA_TEST_OPENMP_TARGET_SUBSET "Build subset of RAJA OpenMP target tests when it is enabled" On)
option(RAJA_TEST_OPENMP_TARGET_SUBSET "Build subset of RAJA OpenMP target tests" On)
option(RAJA_ENABLE_RUNTIME_PLUGINS "Enable support for loading plugins at runtime" Off)
option(RAJA_ALLOW_INCONSISTENT_OPTIONS "Enable inconsistent values for ENABLE_X and RAJA_ENABLE_X options" Off)

Expand Down
9 changes: 9 additions & 0 deletions test/functional/forall/CombiningAdapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
#
set(DIMENSIONS 1D 2D 3D)

##
## Enable OpenMP Target tests when support for Combining Adapter is fixed
##
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
endif()

#
# Generate tests for each enabled RAJA back-end.
#
Expand Down
39 changes: 2 additions & 37 deletions test/functional/forall/atomic-ref/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,12 @@
#
set(TESTTYPES AtomicRefAdd AtomicRefSub AtomicRefLoadStore AtomicRefCAS AtomicRefMinMax AtomicRefLogical)

#
# If building a subset of openmp target tests, remove the back-end from
# from the list of tests to generate here.
#
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_ATOMIC_BACKENDS OpenMPTarget)
endif()
endif()

#
# Generate atomicref tests for each enabled RAJA back-end.
#
# Note: FORALL_ATOMIC_BACKENDS is defined in ../CMakeLists.txt
#

foreach( ATOMIC_BACKEND ${FORALL_ATOMIC_BACKENDS} )
foreach( TEST ${TESTTYPES} )
configure_file( test-forall-atomicref.cpp.in
Expand All @@ -33,34 +24,8 @@ foreach( ATOMIC_BACKEND ${FORALL_ATOMIC_BACKENDS} )
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )

target_include_directories(test-forall-${TEST}-${ATOMIC_BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endforeach()
endforeach()

unset( TESTTYPES )

#
# If building a subset of openmp target tests, add tests to build here.
#
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)

set(ATOMIC_BACKEND OpenMPTarget)
set(TESTTYPES AtomicRefAdd AtomicRefCAS)

foreach( TEST ${TESTTYPES} )
configure_file( test-forall-atomicref.cpp.in
test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
raja_add_test( NAME test-forall-${TEST}-${ATOMIC_BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )

target_include_directories(test-forall-${TEST}-${ATOMIC_BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endforeach()

unset( TESTTYPES )

endif()
endif()


36 changes: 1 addition & 35 deletions test/functional/forall/atomic-view/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,12 @@
#
set(TESTTYPES AtomicView AtomicMultiView)

#
# If building a subset of openmp target tests, remove the back-end from
# from the list of tests to generate here.
#
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_ATOMIC_BACKENDS OpenMPTarget)
endif()
endif()

#
# Generate tests for each enabled RAJA back-end.
#
# Note: FORALL_ATOMIC_BACKENDS is defined in ../CMakeLists.txt
#

foreach( ATOMIC_BACKEND ${FORALL_ATOMIC_BACKENDS} )
foreach( TEST ${TESTTYPES} )
configure_file( test-forall-atomic-view.cpp.in
Expand All @@ -39,30 +30,6 @@ endforeach()

unset( TESTTYPES )

#
# If building a subset of openmp target tests, add tests to build here.
#
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)

set(ATOMIC_BACKEND OpenMPTarget)
set(TESTTYPES AtomicMultiView)

foreach( TEST ${TESTTYPES} )
configure_file( test-forall-atomic-view.cpp.in
test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )
raja_add_test( NAME test-forall-${TEST}-${ATOMIC_BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-${TEST}-${ATOMIC_BACKEND}.cpp )

target_include_directories(test-forall-${TEST}-${ATOMIC_BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endforeach()

unset(TESTTYPES)

endif()
endif()

#
# Testing failure cases with only Sequential. Failures for various backends differ immensely.
#
Expand All @@ -81,4 +48,3 @@ foreach( ATOMIC_BACKEND ${FORALL_FAIL_ATOMIC_BACKENDS} )
endforeach()

unset(FAILTESTS)

7 changes: 1 addition & 6 deletions test/functional/forall/indexset-view/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@
#
set(INDEXSETTESTTYPES IndexSetView IcountIndexSetView)

if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
endif()

#
# Generate tests for each enabled RAJA back-end.
#
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
#

foreach( BACKEND ${FORALL_BACKENDS} )
foreach( INDEXSETTESTTYPE ${INDEXSETTESTTYPES} )
configure_file( test-forall-indexset-view.cpp.in
Expand Down
36 changes: 4 additions & 32 deletions test/functional/forall/multi-reduce-basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@
set(REDUCETYPES Sum Min Max BitAnd BitOr)

#
# If building openmp target tests, remove the back-end to
# from the list of tests to generate here.
# Do not create tests for OpenMP Target, support not currently implemented
#
if(RAJA_ENABLE_TARGET_OPENMP)
#if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
#endif()
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()

#
# If building SYCL tests, remove the back-end to
# from the list of tests to generate here.
# Do not create tests for SYCL, support not currently implemented
#
if(RAJA_ENABLE_SYCL)
list(REMOVE_ITEM FORALL_BACKENDS Sycl)
Expand All @@ -33,6 +29,7 @@ endif()
#
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
#

foreach( BACKEND ${FORALL_BACKENDS} )
foreach( REDUCETYPE ${REDUCETYPES} )
configure_file( test-forall-basic-multi-reduce.cpp.in
Expand All @@ -46,28 +43,3 @@ foreach( BACKEND ${FORALL_BACKENDS} )
endforeach()

unset( REDUCETYPES )


#
# If building a subset of openmp target tests, add tests to build here.
#
#if(RAJA_ENABLE_TARGET_OPENMP)
# if(RAJA_TEST_OPENMP_TARGET_SUBSET)
#
# set(BACKEND OpenMPTarget)
# set(REDUCETYPES ReduceSum)
#
# foreach( REDUCETYPE ${REDUCETYPES} )
# configure_file( test-forall-basic-multi-reduce.cpp.in
# test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}.cpp )
# raja_add_test( NAME test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}
# SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}.cpp )
#
# target_include_directories(test-forall-basic-MultiReduce${REDUCETYPE}-${BACKEND}.exe
# PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
# endforeach()
#
# endif()
#endif()

unset( REDUCETYPES )
49 changes: 5 additions & 44 deletions test/functional/forall/reduce-basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,13 @@ set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMaxLoc ReduceMinLoc ReduceMa

set(DATATYPES CoreReductionDataTypeList)

#
# If building a subset of openmp target tests, remove the back-end from
# from the list of tests to generate here.
#
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
endif()


#
# Generate core reduction tests for each enabled RAJA back-end
#
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
#

foreach( BACKEND ${FORALL_BACKENDS} )
foreach( REDUCETYPE ${REDUCETYPES} )
configure_file( test-forall-basic-expt-reduce.cpp.in
Expand Down Expand Up @@ -86,14 +77,11 @@ set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMinLoc ReduceMaxLoc)

set(DATATYPES CoreReductionDataTypeList)

#
# If building a subset of openmp target tests, remove the back-end from
# from the list of tests to generate here.
#
##
## Do not create OpenMP Target tests for "traditional" RAJA reduction interface
##
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()

#
Expand Down Expand Up @@ -160,30 +148,3 @@ endforeach()

unset( DATATYPES )
unset( REDUCETYPES )


#
# If building a subset of openmp target tests, add tests to build here.
#
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)

set(BACKEND OpenMPTarget)
set(REDUCETYPES ReduceSum)
set(DATATYPES CoreReductionDataTypeList)

foreach( REDUCETYPE ${REDUCETYPES} )
configure_file( test-forall-basic-reduce.cpp.in
test-forall-basic-${REDUCETYPE}-${BACKEND}.cpp )
raja_add_test( NAME test-forall-basic-${REDUCETYPE}-${BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-forall-basic-${REDUCETYPE}-${BACKEND}.cpp )

target_include_directories(test-forall-basic-${REDUCETYPE}-${BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endforeach()

endif()
endif()

unset( DATATYPES )
unset( REDUCETYPES )
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
#
set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMinLoc ReduceMaxLoc)

##
## Do not create OpenMP Target tests for "traditional" RAJA reduction interface
##
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()

#
Expand Down
8 changes: 5 additions & 3 deletions test/functional/forall/reduce-multiple-segment/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
#
set(REDUCETYPES ReduceSum ReduceMin ReduceMax ReduceMinLoc ReduceMaxLoc)

##
## Do not create OpenMP Target tests for "traditional" RAJA reduction interface
##
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()

#
Expand All @@ -31,6 +32,7 @@ endif()
#
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
#

foreach( BACKEND ${FORALL_BACKENDS} )
foreach( REDUCETYPE ${REDUCETYPES} )
configure_file( test-forall-segment-multiple-reduce.cpp.in
Expand Down
7 changes: 1 addition & 6 deletions test/functional/forall/resource-indexset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@
#
set(INDEXSETTESTTYPES ResourceIndexSet ResourceIcountIndexSet)

if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM FORALL_BACKENDS OpenMPTarget)
endif()
endif()

#
# Generate tests for each enabled RAJA back-end.
#
# Note: FORALL_BACKENDS is defined in ../CMakeLists.txt
#

foreach( BACKEND ${FORALL_BACKENDS} )
foreach( INDEXSETTESTTYPE ${INDEXSETTESTTYPES} )
configure_file( test-forall-resource-indexset.cpp.in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
# Note: KERNEL_BACKENDS is defined in ../CMakeLists.txt
#

##
## Enable OpenMP Target tests when support for fission-fusion is fixed
##
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM KERNEL_BACKENDS OpenMPTarget)
endif()
endif()

foreach( BACKEND ${KERNEL_BACKENDS} )
configure_file( test-kernel-basic-fission-fusion-loop.cpp.in
test-kernel-basic-fission-fusion-loop-${BACKEND}.cpp )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
# list(APPEND KERNEL_BACKENDS Sycl)
#endif()

##
## Enable OpenMP Target tests when support for fission-fusion is fixed
##
if(RAJA_ENABLE_TARGET_OPENMP)
if(RAJA_TEST_OPENMP_TARGET_SUBSET)
list(REMOVE_ITEM KERNEL_BACKENDS OpenMPTarget)
endif()
endif()

foreach( BACKEND ${KERNEL_BACKENDS} )
configure_file( test-kernel-conditional-fission-fusion-loop.cpp.in
test-kernel-conditional-fission-fusion-loop-${BACKEND}.cpp )
Expand Down
Loading

0 comments on commit 70c72c1

Please sign in to comment.