-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If CMAKE_CXX_COMPILER_LAUNCHER
is set , do not enable kokkos_launch_compiler
#4870
Conversation
Works for me, as in I get an error during CMake configuration suggesting to use |
Hi @msimberg -- I've added the error condition you requested. Please let us know if we can do anything further to help. |
m_scratch_locks = | ||
m_policy.space().impl_internal_space_instance()->m_scratch_locks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this...
m_scratch_locks = | ||
m_policy.space().impl_internal_space_instance()->m_scratch_locks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...nor this...
core/unit_test/TestTeam.hpp
Outdated
|
||
Kokkos::parallel_reduce( | ||
team_exec.set_scratch_size(1, Kokkos::PerTeam(team_scratch_size), | ||
Kokkos::PerThread(thread_scratch_size)), | ||
Functor(), Kokkos::Sum<typename Functor::value_type>(error_count)); | ||
Kokkos::fence(); | ||
ASSERT_EQ(error_count, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...or this should be in this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my...! I do not know how those changes got into this PR. Maybe in my rebasing ...? In any case, I'll remove this stuff. Thank you for catching that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all cases of files that shouldn't be in this PR, I've checked out the develop
versions of these files, and there doesn't seem to be any difference between the versions. I will look back through the commits to see how these errant files ended up in this PR.
cmake/kokkos_compiler_id.cmake
Outdated
# compiler AND `CMAKE_CXX_COMPILIER_LAUNCHER` is not set, set to use launcher. Will ensure CMAKE_CXX_COMPILER | ||
# is replaced by nvcc_wrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# compiler AND `CMAKE_CXX_COMPILIER_LAUNCHER` is not set, set to use launcher. Will ensure CMAKE_CXX_COMPILER | |
# is replaced by nvcc_wrapper | |
# compiler and `CMAKE_CXX_COMPILIER_LAUNCHER` is not set, set to use launcher. | |
# Will ensure CMAKE_CXX_COMPILER is replaced by nvcc_wrapper |
cmake/kokkos_compiler_id.cmake
Outdated
IF(Kokkos_COMPILE_LAUNCHER AND NOT INTERNAL_HAVE_COMPILER_NVCC AND NOT | ||
CMAKE_CXX_COMPILER_LAUNCHER AND NOT KOKKOS_CXX_COMPILER_ID STREQUAL Clang) | ||
MESSAGE(FATAL_ERROR "Cannot use CMAKE_CXX_COMPILER_LAUNCHER if the CMAKE_CXX_COMPILER is not able to compile CUDA code, i.e. nvcc_wrapper or | ||
clang++!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use tabs.
IF(Kokkos_COMPILE_LAUNCHER AND NOT INTERNAL_HAVE_COMPILER_NVCC AND NOT | |
CMAKE_CXX_COMPILER_LAUNCHER AND NOT KOKKOS_CXX_COMPILER_ID STREQUAL Clang) | |
MESSAGE(FATAL_ERROR "Cannot use CMAKE_CXX_COMPILER_LAUNCHER if the CMAKE_CXX_COMPILER is not able to compile CUDA code, i.e. nvcc_wrapper or | |
clang++!") | |
IF(Kokkos_COMPILE_LAUNCHER AND NOT INTERNAL_HAVE_COMPILER_NVCC AND NOT | |
CMAKE_CXX_COMPILER_LAUNCHER AND NOT KOKKOS_CXX_COMPILER_ID STREQUAL Clang) | |
MESSAGE(FATAL_ERROR "Cannot use CMAKE_CXX_COMPILER_LAUNCHER if the CMAKE_CXX_COMPILER is not able to compile CUDA code, i.e. nvcc_wrapper or | |
clang++!") |
`INTERNAL_USE_COMPILER_LAUNCHER` to prevent interaction with kokkos_launch_compiler when `CMAKE_CXX_COMPILER_LAUNCHER` is set
`CMAKE_CXX_COMPILER_LAUNCHER` is set, and the `CMAKE_CXX_COMPILER` cannot compile Cuda code
kokkos_compiler_id.cmake: Add another condition on setting `INTERNAL_USE_COMPILER_LAUNCHER` to prevent interaction with kokkos_launch_compiler when `CMAKE_CXX_COMPILER_LAUNCHER` is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ajpowelsnl! This looks good to me now.
|
cmake/kokkos_compiler_id.cmake
Outdated
IF(Kokkos_COMPILE_LAUNCHER AND NOT INTERNAL_HAVE_COMPILER_NVCC AND NOT KOKKOS_CXX_COMPILER_ID STREQUAL Clang) | ||
IF(CMAKE_CXX_COMPILER_LAUNCHER) | ||
MESSAGE(FATAL_ERROR "Cannot use CMAKE_CXX_COMPILER_LAUNCHER if the CMAKE_CXX_COMPILER is not able to compile CUDA code, i.e. nvcc_wrapper or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MESSAGE(FATAL_ERROR "Cannot use CMAKE_CXX_COMPILER_LAUNCHER if the CMAKE_CXX_COMPILER is not able to compile CUDA code, i.e. nvcc_wrapper or | |
MESSAGE(FATAL_ERROR "Cannot use CMAKE_CXX_COMPILER_LAUNCHER if the CMAKE_CXX_COMPILER is not able to compile CUDA code, i.e. nvcc_wrapper or |
OK, thanks for the head's up. |
Hi @dalg24 - retest this, please. |
Retest this please. |
This PR adds another condition in setting
INTERNAL_USE_COMPILER_LAUNCHER
to prevent interaction withkokkos_launch_compiler
whenCMAKE_CXX_COMPILER_LAUNCHER
is set. This change fixes #4821.