Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmake/SetupBOUTThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ if(BOUT_HAS_CUDA)
# NOTE: CUDA inherits the CXX standard setting from the top-level
# compile features, set for the bout++ target.
set_source_files_properties(${BOUT_SOURCES_CXX} PROPERTIES LANGUAGE CUDA)

# timer.cxx contains no device code, and compiling its C++20 formatting and
# ranges machinery with cudafe++ is pathologically slow with CUDA 12.9.
set_source_files_properties(
${PROJECT_SOURCE_DIR}/src/sys/timer.cxx PROPERTIES LANGUAGE CXX
)

find_package(CUDAToolkit)
set_target_properties(bout++ PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(bout++ PROPERTIES POSITION_INDEPENDENT_CODE ON)
Expand Down
4 changes: 2 additions & 2 deletions include/bout/fieldops.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ struct BinaryExpr {
this->div = div;
return *this;
}
BOUT_HOST_DEVICE BOUT_FORCEINLINE bool hasParallelSlices() const {
BOUT_FORCEINLINE bool hasParallelSlices() const {
if constexpr (is_expr_constant_v<L> && is_expr_constant_v<R>) {
return false;
} else if constexpr (is_expr_constant_v<L>) {
Expand All @@ -485,7 +485,7 @@ struct BinaryExpr {
return lhs.hasParallelSlices() && rhs.hasParallelSlices();
}
}
BOUT_HOST_DEVICE BOUT_FORCEINLINE int numberParallelSlices() const {
BOUT_FORCEINLINE int numberParallelSlices() const {
if (!hasParallelSlices()) {
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion src/mesh/parallel/shiftedmetric.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ static void shiftZ_block_fft(const int Nz, const BoutReal** in, BoutReal** out,

fft_block_cooperative<32, FFTS_PER_BLOCK>
<<<grid, block, 0, stream>>>(in, out, phs, nbatches, nblocks);

} else if (Nz == 64) {
constexpr int FFTS_PER_BLOCK = 4;
constexpr int THREADS_PER_FFT = 64;
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ set(serial_tests_source
./field/test_vector3d.cxx
./field/test_where.cxx
./include/bout/test_array.cxx
./include/bout/test_rajalib.cxx
./include/bout/test_assert.cxx
./include/bout/test_bout_enum_class.cxx
./include/bout/test_boundary_iter.cxx
Expand Down Expand Up @@ -138,6 +137,10 @@ if(BOUT_HAS_HYPRE)
list(APPEND serial_tests_source ./invert/laplace/test_laplace_hypre3d.cxx)
endif()

if(BOUT_HAS_RAJA)
list(APPEND serial_tests_source ./include/bout/test_rajalib.cxx)
endif()

add_executable(serial_tests ${serial_tests_source})

target_include_directories(
Expand Down
Loading