-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update CMakeLists.txt for tests #12
Conversation
cedricchevalier19
commented
Mar 27, 2024
- MPI is an explicit dependency for tests
- Use CMake MPI variables to launch tests
Maybe we should get https://github.com/cwpearson/kokkos-comm/pull/14 merged and see how it impacts this one |
@cwpearson, I will update it after #14 is merged. |
a678909
to
ba9a691
Compare
Waiting for #26 |
8adc37b
to
c840c1b
Compare
e6c626a
to
46f6218
Compare
@@ -7,13 +7,16 @@ enable_testing() | |||
# find Kokkos Comm to do a standalone build | |||
if (NOT TARGET KokkosComm::KokkosComm) | |||
find_package(KokkosComm REQUIRED) | |||
|
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.
Delete these comments
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.
If the comments are the ones of the following lines, sorry but I do not agree.
(please consider that I am not a native English speaker).
To me, not using find_package(MPI)
is already wrong practice as we should explicitly require what we are directly using. Relying on transitive dependencies is evil (I've spent my share of time dealing with this nightmare when updating software packages at Spack level). Most of the time tests
are also examples
for end-user, so I want to give them a correct template.
Despite this, for these tests, I have agreed to not do find_package(MPI)
in order to test that the find_dependency(MPI)
is correctly set.
By the way, I should have added find_package(Kokkos)
too.
If test code does not reference anymore any MPI
functions directly, then I'll happily remove everything.
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.
How would you feel about adding a comment to the top of the file saying something like "These tests require Kokkos and MPI, but we're not using find_package(...) here because we want to make sure KokkosComm's find_dependency is working"?
@@ -7,13 +7,16 @@ enable_testing() | |||
# find Kokkos Comm to do a standalone build | |||
if (NOT TARGET KokkosComm::KokkosComm) | |||
find_package(KokkosComm REQUIRED) | |||
|
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.
Remove comments
Have to rebase this branch. |
Pass flags using an empty target rather than using a CMake function that is easy to misuse. The main difference is now configuration choices are permanent: it is not possible to use mdspan if configuration has not asked for it.
Ensure that MPIEXEC macro are available, if when compiled as standalone.
Set KokkosComm definitions in this generated header file KokkosComm Version informations are also located there.
Applying Carl's suggestion.
Superseded by #122 . |