Skip to content
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

BUGFIX: add ARB_CUDA flag to example catalogue #2039

Merged
merged 4 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions example/ornstein_uhlenbeck/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ make_catalogue_standalone(
CXX_FLAGS_TARGET ${ARB_CXX_FLAGS_TARGET_FULL}
VERBOSE ON)

if(ARB_WITH_NVCC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also ARB_WITH_CUDA_CLANG and ARB_WITH_HIP_CLANG to consider.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, but then the tests should also handle this, and they do not - what is the difference?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For HIP, we need to define ARB_HIP and ARB_CUDA for the other two. See https://github.com/arbor-sim/arbor/blob/master/CMakeLists.txt#L369

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you are right. Changes:

  • use make_catalogue instead of make_catalogue_standalone
  • link to arbor-private-deps
  • mark all files as c++ sources when using cuda-clang or hip-clang

target_compile_options(ou-catalogue PRIVATE -DARB_CUDA)
endif()

add_executable(ou EXCLUDE_FROM_ALL ou.cpp)
add_dependencies(ou ou-catalogue)
target_compile_options(ou PRIVATE ${ARB_CXX_FLAGS_TARGET_FULL})
Expand Down