-
Notifications
You must be signed in to change notification settings - Fork 45
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
vec/qf - initial valid/borrowed/owned split for data #853
Conversation
99553ae
to
67afcc6
Compare
I think we should make sure this design lines ups with @nbeams's path ahead for CeedVector precision, but I think the owned vs borrowed changes in here are important to get into main as they represent a current [minor] flaw in our interface. |
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 @jeremylt for working this up so quickly. I think this will be helpful to have in place before adding multiprecision storage to CeedVector
.
I assume we also want to use void *
instead of CeedScalar *
in the CeedQFunctionContext_[Cuda/Hip]
backend data structs? And in the parameter for the data variable in CeedQFunctionContextTakeData_Cuda
? (The type in the HIP version got changed.)
Thanks for catching that! Updated. |
I rearranged and clarified the logic. I think this should be easier to understand/remember and modify in future work. |
dacbc88
to
1501cb3
Compare
With this latest pass, I pulled the data validity checks up into the interface, simplifying the logic in the backends. I think this should be pretty close to what we need. |
8b51f80
to
7b1c546
Compare
Everything passes the test suite. This PR got bigger than I wanted, but I think we should be good for review + squash + merge, modulo anything else that we want to fixup. |
A quick test tells me we've broken something in the MFEM integration for MFEM's algebraic CEED solver -- from MFEM's ex1 with At any rate, this may be a breaking change for some people using libCEED, depending on how it's integrated (where they should use |
Since this is a breaking change, it might be a fair point to cut a new release. We haven't done a fall release yet. |
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.
Still have a few minor questions, but I'm going ahead and marking as "approve" for this version of the interface. Thanks for all the work @jeremylt
Though I guess, do we need to investigate the GitLab failure on Noether? |
Oh wait, I have another question about |
ICC/IFort failure is Intel's flakey installer, unrelated to this PR |
I think it's on the MFEM side of the integration? |
Yes, after looking into it some more, I do think it's just that we broke the MFEM integration (but it was already broken). |
3e8c176
to
9c7553f
Compare
9c7553f
to
2abadb7
Compare
* vec/qf - initial valid/borrowed/owned split for data * vec/qf - tidy logic for checking active/stale data * minor - add missing NULL * doc - explain VectorTakeArray update * minor - update error messages * test - update error message in junit/tap * gpu - fix stray CeedScalar vs void for QFunctionContext * vec/qf - clarify/simplify access logic * vec - calloc host arrays when no value set to make empty * style - minor * style - minor * minor - fix error messages * vec/qf - move data validity checking to backend interface * gpu - add missing sync error checking for qfcontext * gpu - homogonize use of impl for backend data to reduce confusion * vec - clarify access conditions * python - update test for stricter vector access * vec - minor fixes * minor - fix ipython change * vec - add missing declarations in ceed/backend.h * ctx - mirror vector borrowed data check in ctx interface * vec - add CeedVectorGetArrayWrite * vec - consistent use of CeedVectorGetArray vs CeedVectorGetArrayWrite * python - small vec fixes * doc - describe vector data semantics * magma - update restriction * gpu - fix restr bug I added, need to sum into target * magma - fix restriction bug * cpu - fix restriction bug here too * op - fix evec allocations * julia - fix ElemRestriction for new vector access rules * op - double check GetArray vs Read vs Write usage * doc - small fix * restr - clean up read/write logic for restr * python - add vec.array_write * magma - typo fix
As we talked about on the telecon. I still want to do a pass to simplify the logic, but this runs and passes the tests.