Skip to content

Commit

Permalink
Try #700:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jul 3, 2023
2 parents 0e09750 + fe11d73 commit 9181074
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .jenkins/cscs/env-gcc-cuda-11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

cxx_std="17"
cxx_std="20"
cuda_std="17"
gcc_version="9.3.0"
boost_version="1.75.0"
hwloc_version="2.0.3"
cuda_version="11.2.0"
fmt_version="9.1.0"
spack_compiler="gcc@${gcc_version}"
spack_arch="cray-cnl7-haswell"

spack_spec="pika@main arch=${spack_arch} %${spack_compiler} +cuda malloc=system cxxstd=${cxx_std} ^boost@${boost_version} ^hwloc@${hwloc_version} ^cuda@${cuda_version}"
spack_spec="pika@main arch=${spack_arch} %${spack_compiler} +cuda malloc=system cxxstd=${cxx_std}
^boost@${boost_version} ^hwloc@${hwloc_version} ^cuda@${cuda_version} ^fmt@${fmt_version}"

configure_extra_options+=" -DPIKA_WITH_CXX_STANDARD=${cxx_std}"
configure_extra_options+=" -DCMAKE_CUDA_STANDARD=${cuda_std}"
configure_extra_options+=" -DPIKA_WITH_MALLOC=system"
configure_extra_options+=" -DPIKA_WITH_CUDA=ON"
configure_extra_options+=" -DPIKA_WITH_EXAMPLES_OPENMP=ON"
11 changes: 6 additions & 5 deletions cmake/pika_setup_cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ if(PIKA_WITH_CUDA AND NOT TARGET pika_internal::cuda)
# support
if(NOT PIKA_FIND_PACKAGE)
if(DEFINED CMAKE_CUDA_STANDARD AND NOT CMAKE_CUDA_STANDARD STREQUAL
PIKA_WITH_CXX_STANDARD
CMAKE_CXX_STANDARD
)
pika_error(
"You've set CMAKE_CUDA_STANDARD to ${CMAKE_CUDA_STANDARD} and PIKA_WITH_CXX_STANDARD to ${PIKA_WITH_CXX_STANDARD}. Please unset CMAKE_CUDA_STANDARD."
pika_info(
"You've set PIKA_WITH_CXX_STANDARD to ${PIKA_WITH_CXX_STANDARD} and CMAKE_CUDA_STANDARD to ${CMAKE_CUDA_STANDARD}."
)
else()
set(CMAKE_CUDA_STANDARD ${PIKA_WITH_CXX_STANDARD})
endif()

set(CMAKE_CUDA_STANDARD ${PIKA_WITH_CXX_STANDARD})
endif()

set(CMAKE_CUDA_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -64,7 +65,7 @@ if(PIKA_WITH_CUDA AND NOT TARGET pika_internal::cuda)
endif()
# Flag not working for CLANG CUDA
target_compile_features(
pika_internal::cuda INTERFACE cuda_std_${PIKA_WITH_CXX_STANDARD}
pika_internal::cuda INTERFACE cuda_std_${CMAKE_CUDA_STANDARD}
)
set_target_properties(
pika_internal::cuda PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON
Expand Down

0 comments on commit 9181074

Please sign in to comment.