-
Notifications
You must be signed in to change notification settings - Fork 90
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
Undefined references when using new Cuda-UVM flags #1025
Comments
@cgcgcg FYI, we have seen these errors when enabling UVM with the new flags. Hopefully they will be caught by the new PR trilinos/Trilinos#12767. |
Are you sure Albany is correctly set up to use the Tpetra shared spaces flag? I see this Albany/src/Albany_TpetraTypes.hpp Lines 52 to 62 in 93c7e76
and this Albany/src/Albany_KokkosTypes.hpp Line 29 in 93c7e76
but nothing in Phalanx is using the Tpetra shared space stuff. |
@rppawlo Christian helped me understand a bit better this issue.
However, Phalanx does not allow us to do so. At the moment, in Albany we use |
I don't think we should make Phalanx look at what Tpetra uses, b/c PHX has no dependence on Tpetra. Probably the cleanest solution would be to add a
It is up to the downstream app then to ensure that Tpetra and PHX use compatible spaces. If they so desire. There is no a-priori need to have PHX and Tpetra use the same mem space (though it is probably convenient). |
@bartgol 's comment is probably the fastest way to accomplish uvm support. There would have to be some changes to the memory allocators as well (make sure phalanx uses MemSpace consistently and still allow users to override when needed). We do not want to introduce a dependency between phalanx and tpetra just to get a default type. There is a branch that makes the PHX::Device a true Kokkos::Device (my preferred long term solution), but that causes a mess of backwards incompatible changes. It severely impacts the downstream apps. The branch is in my personal fork of trilinos: |
I think that setting the Device would not solve the problem. The issue is the memory space that PHX uses. Without using the deprecated |
Sounds good. I didn't think of the fact that Phalanx doesn't depend on Tpetra @bartgol The "true" Kokkos::Device, not the current PHX::Device, let you set both the execution space and the memory space, e.g. @rppawlo, sounds good, let's have a quick meeting when you have time. |
Ah, you're right. I confused Kokkos::Device with the exec space. Makes sense then. |
It looks like we're now getting a bunch of undefined references on Weaver now that I've turned on the new Cuda UVM flags. The errors can be seen here: https://sems-cdash-son.sandia.gov/cdash/viewBuildError.php?buildid=56941
An example:
tmpxft_001e528f_00000000-6_Albany_Utils.cudafe1.cpp:(.text+0x164c): undefined reference to `Tpetra::MultiVector<double, int, long long, Tpetra::KokkosCompat::KokkosDeviceWrapperNode<Kokkos::Cuda, Kokkos::CudaSpace> >::putScalar(double const&)'
It looks like
KokkosDeviceWrapper
is looking for functions withCudaSpace
template arguments instead ofCudaUVMSpace
.I'm not sure exactly when this showed up since I forgot to update the weaver scripts when I updated them in the repo so we only started nightly testing of this today. It worked when I tested trilinos/Trilinos#12626 so this showed up sometime between now and then.
The text was updated successfully, but these errors were encountered: