-
Notifications
You must be signed in to change notification settings - Fork 33
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
fixes for builds with no raja or umpire #1270
base: develop
Are you sure you want to change the base?
Conversation
@@ -267,17 +271,29 @@ axom::Array<DoF, 2, axom::MemorySpace::Host> GetElementRestriction(const mfem::F | |||
} | |||
|
|||
if (n == 0) { | |||
#ifdef SERAC_USE_RAJA |
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 think this should be SERAC_USE_UMPIRE
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.
Yeah makes sense, basically all of the axom::MemorySpace::Host
stuff needs to be fixed.
void write_to_file(axom::Array<T, 2, axom::MemorySpace::Host> arr, std::string filename) | ||
#else |
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.
You would think that Host
would always be there but its guarded in axom and Dynamic
is the one unguarded....
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 like host should be safe to unguard in addition to dynamic? Regardless, we could use dynamic + umpire allocator IDs to achieve the same without the clunky #ifdef blocks. Though we would lose the explicit typing of the memory. Thoughts?
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 say go with Dynamic
for now to avoid the ifdef's... but this really needs to be revisited. Might need to chat with Axom about 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.
@white238 and I spoke -- it makes sense to go with (the default) Dynamic
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.
It's not clear to me Dynamic will give the desired result when the original axom::Array
is on device. It seems like this copy constructor will be called: https://github.com/LLNL/axom/blob/develop/src/axom/core/Array.hpp#L1180-L1190 which copies the allocator ID from the existing array. The result will be an array on device and the operator() call on L88 will fail. Is there a different copy constructor being called by this function?
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.
Implemented a fix suggested by @kennyweiss
Should we test this in CI? Maybe in Azure? |
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 @ebchin !
We probably don't want to get into all of the combinatorics, but I see the value in adding a CI test with minimal TPLs, just to check stuff like this. |
} | ||
outfile << "}\n"; | ||
} | ||
} else if constexpr(ArrayT::Dims == 3) { |
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.
We got compiler errors when we have else if constexpr
before. Can you remove the else
and make it just two if constexpr
blocks?
I tried building serac without RAJA or Umpire and found some code that needs some
#ifdef
macros around it. This PR adds them.