-
Notifications
You must be signed in to change notification settings - Fork 125
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
AdiosView object that allows Get/Put to receive Kokkos::View #3320
Conversation
@anagainaru Great work there ⚡ can you give perms to make changes to the branch of this MR, I want to propose some changes |
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.
Generally, I think the limitation that it requires a variable rather than a variable name is a feature. The whole "give me a variable name so I have to do a string lookup on it" should be a second-class API on the writer side...
How can I do this? Google didn't help :) |
https://github.blog/2016-09-07-improving-collaboration-with-forks/ |
The checkbox was already checked. I thought you meant something else. You should be able to edit or propose changes.
In the mean time I am still working on the ICEs |
Thanks @anagainaru I think we need to add an unit test or at least an example for it. I can generate new CI images with Kokkos. |
Notes about the last push: I added an alternative that relies on runtime polymorphism over duck-typing using templates.
|
Please feel free to challenge and push your alternative. This is a proposal :) |
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 for your suggestions. There is an example (link in the PR description), but for now it's outside ADIOS2 just to make sure everything works before I add the example. I don't like code that is in copy pasted in multiple places so I will create the unit test with both CUDA and Kokkos (with Host and Cuda backends) into one test, but later.
bindings/CXX11/CMakeLists.txt
Outdated
if(ADIOS2_HAVE_KOKKOS) | ||
list(APPEND adios2_cxx11 adios2/cxx11/KokkosView.h) | ||
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.
I thought about this and decided against having a ADIOS2_HAVE_KOKKOS
because I want to be able to pass a Kokkos::View
without having to re-build ADIOS.
1a5ab03
to
ac9ac88
Compare
c2fdce9
to
8b93793
Compare
@anagainaru I am pushing the new CI CUDA image with Kokkos. As for now it has kokkos without CUDA, later on I will upload the one with kokkos+cuda. The image will be available in like 20 mins from now. |
@anagainaru the latest push of the CI image includes Kokkos+cuda |
Great, I'm pushing the latest changes and will merge this tomorrow morning so everyone can take one final look |
38bb230
to
199cdf9
Compare
199cdf9
to
8dabf6d
Compare
We got a false positive in the CUDA build, it actually fails with:
|
This is so weird, I will try to reproduce this on Summit. On our local machine I did not get any error. |
I lost perms to push here, apply this patch for hopefully avoiding this false negative error:
|
I tested the code on Summit and change the example code to be more general so it can be executed on CUDA or Host (with any backend). I was able to run it from all the systems I tested (with threads, serial, openmp and cuda). Should the patch be applied in this PR or a separate one? |
e81095c
to
4a319f4
Compare
here is best |
The build output can be seen at: Build->Execute job step, for a strange reason CDASH does not consider it an error but it is since the example binary fails to build with an error message. I think we need to first make it work in the CI |
@anagainaru I am not sure about the error but it seems that you need to build your example with CUDA. |
@vicentebolea I am not an expert but I really don't think there is a problem with the code. It looks like there is a configuration issue, maybe building or linking Kokkos. For an example that uses CUDA, Kokkos needs to be linked with ADIOS2 only to be able to run the Kokkos example. |
7282c46
to
4a319f4
Compare
@anagainaru please apply remove the previous patch and apply this patch |
The patch installs Ninja that correctly parses the ouptut of nvcc and correctly reports the error |
@anagainaru I updated most of the CI images, including the CUDA one. Got ahead drop my commit from your branch and rebase your branch onto the latest master commit. As for the I suspect that the compiling errors will be solved if you set the language of the example code as CUDA when ADIOS2_HAVE_CUDA=ON |
@anagainaru the issue seems to be resolved after I install kokkos with the |
Great ! I am back from vacation so I will have time to rebase this today if it's still needed. |
@anagainaru still rebuilding the CI images, it will take about one hour to push them to Github. I will let you know. Welcome back! |
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.
Other than the comments, please squash all the changes into a single commit co-authoring the people who contribute to this. The reason why we want a single commit is that is good to ensure that every commit builds in our CI for the purpose of revert or for debugging.
What other comments were not addressed? I disagree with merging everything in a single commit, commits are supposed to be small and solve or change one item. We have PRs so we can revert. |
The idea about each commit to be a consistent and CI tested snapshot is an industry standard practice. Imagine this: Let say I git checkout to one of your middle commits in your branch, the code will be inconsistency since that is an intermediate stage, it might not even compile (has each of those commits being tested?). For you they make sense now as you had recently created them but picture another contributor a year from now. I think this will be a long conversation and there are different points of view on this, so I will not block your PR on this, but lets discuss later about it. |
@anagainaru last thing is to rebase your branch to latest master to trigger the CI with the fixed CUDA build |
4a319f4
to
2263785
Compare
@vicentebolea There are many things to discuss about good practices with PR that we don't really follow. We should have a discussion when there are no other topics during one of our weekly meetings. I agree that I should clean the commit history and merge some of the small fix commits, but I def do not agree this PR has only one commit. The CI will pass with the stump function for example so the AdiosView is not needed in the same commit. The example code should also def be separate from the internal changes, etc. Let's define a standard during one of the meetings for future PRs. |
Kokkos-CUDA CI passes 🎉 |
Co-authored-by: Damien L-G <dalg24@gmail.com>
Co-authored-by: Kai Germaschewski <Kai.Germaschewski@unh.edu>
Co-Authored-By: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2263785
to
d695286
Compare
Alternative to #3271 and #3254
This will allow ADIOS to receive Kokkos views without having to be build with Kokkos (which was the problem of #3254) and without loosing the context of the View in case in the future we want to pass it down the stream to ADIOS core functions (which will be needed when we compute the metadata using Kokkos).
The interface remains the same (the only change is that codes will require to include the
KokkosView.h
header from adios):The memory space is extracted from the View object so any
data.SetMemorySpace(some_space)
will be overwritten to correspond to the View object.Limitations
no matching function for call to 'Put'
Example to test the implementation