-
Notifications
You must be signed in to change notification settings - Fork 37
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
WIP: Fixes to compile CUDA with nvc++ #910
Changes from 4 commits
2bbce53
81ba353
dacc2a1
8657717
c48f557
9d6fdc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,9 +301,11 @@ endif() | |
# However, Parthenon heavily relies on it and there is no harm in compiling Kokkos | ||
# without and Parthenon with (via Max Katz on the Kokkos Slack channel). | ||
# Therefore, we don't use the Kokkos_ENABLE_CUDA_CONSTEXPR option add the flag manually. | ||
# Also, not checking for NVIDIA as nvcc_wrapper is identified as GNU so we just make sure | ||
# the flag is not added when compiling with Clang for Cuda. | ||
if (Kokkos_ENABLE_CUDA AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
# Also, not checking for NVIDIA as nvcc_wrapper is identified as GNU so we just | ||
# make sure the flag is not added when compiling with Clang for Cuda. The flag | ||
# is also not necessary (and not recognized) when using nvc++ to compile Cuda | ||
# code | ||
if (Kokkos_ENABLE_CUDA AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes me a little nervous, as it may cause problems with downstream codes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this condition could be changed to check whether There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure---that seems like it might be safer. My main worry here is will the jury-rigged insanity that I (and KHARMA) are currently using to build with nvhpc fail? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I don't know. I'm not sure how that works at all without removing this flag, unless you mean you're using nvc++ as the host compiler and nvcc as the device compiler? In that case, I think it should still report There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. I feel like we've discussed this before. The option Does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you use clang as the device compiler, it doesn't accept this option either (it doesn't need it). So IMO it might be good to keep that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if you can force I also verified that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default, at least on non-Cray systems, it uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember the full context for this discussion - is this issue resolved? |
||
target_compile_options(parthenon PUBLIC --expt-relaxed-constexpr) | ||
endif() | ||
|
||
|
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.
seems totally reasonable to change this
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.
This var name was changed on develop, so I don't think this is an issue anymore.