Skip to content
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

Must Destroy OperatorField Objects #1646

Merged
merged 6 commits into from
Oct 11, 2024
Merged

Must Destroy OperatorField Objects #1646

merged 6 commits into from
Oct 11, 2024

Conversation

jeremylt
Copy link
Member

@jeremylt jeremylt commented Aug 15, 2024

Fixes #1639

What do we think @jrwrigh. You can see how this does get a bit invasive.


Ok, now the Vector/ElemRestriction/Basis retrieved from the OperatorField needs to be Destroyed per the corresponding interface.

@jeremylt
Copy link
Member Author

ToDo: Track down all the CPU memory leaks, add GPU restores, language wrapers

Copy link
Collaborator

@jrwrigh jrwrigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question is whether the extra check during the restore is worth the new API, or just force the users to call *Destroy on the objects obtained from CeedOperatorFieldGet*.

I'm not sure what bugs the extra CeedCheck(*vec == op_field->vec, ...) would catch.

See later comment for the fluids code that drove me to the above question.

backends/ref/ceed-ref-operator.c Outdated Show resolved Hide resolved
backends/ref/ceed-ref-operator.c Outdated Show resolved Hide resolved
examples/fluids/src/setuplibceed.c Outdated Show resolved Hide resolved
interface/ceed-preconditioning.c Outdated Show resolved Hide resolved
@jeremylt jeremylt force-pushed the jeremy/get-restore branch 2 times, most recently from 2361dc6 to 54e15cd Compare August 19, 2024 21:37
@jeremylt
Copy link
Member Author

Ok, rebased to work off the branch with the lingering Operator memory fix. Impl for CPU ref is in, rest in progress

@jeremylt jeremylt force-pushed the jeremy/get-restore branch 3 times, most recently from 4502c7f to 02da2a3 Compare August 20, 2024 16:05
@jeremylt
Copy link
Member Author

CPU blocked and ref in, GPU non-gen next. (would need to rebase in another open PR to do gen)

OCCA will be annoying so I'm saving it for last

@jeremylt jeremylt force-pushed the jeremy/get-restore branch 13 times, most recently from fc5c85c to b377dfe Compare August 23, 2024 21:20
@jeremylt jeremylt force-pushed the jeremy/get-restore branch 4 times, most recently from 6feaff7 to 5862f7b Compare September 6, 2024 18:20
@jrwrigh
Copy link
Collaborator

jrwrigh commented Sep 17, 2024

Yeah, all the errors are in the form Error in assembly: 0.0000 != ....

@jeremylt
Copy link
Member Author

Huzzah, at long last. I think this is good to add now, and I can spin up the companion PR to MFEM. Mildly disruptive but not a huge deal as it just leaks if not fixed downstream

@jeremylt jeremylt force-pushed the jeremy/get-restore branch 2 times, most recently from a071b1c to 28bb427 Compare September 23, 2024 14:38
@jeremylt
Copy link
Member Author

#1673 takes priority. Will rework this branch after that merges

@jeremylt jeremylt mentioned this pull request Sep 26, 2024
3 tasks
@jeremylt jeremylt changed the title Add Restore for OperatorField data Must Destroy OperatorField Objects Sep 26, 2024
@jeremylt jeremylt force-pushed the jeremy/get-restore branch 2 times, most recently from 6a975c5 to 1968171 Compare October 3, 2024 18:43
@jeremylt
Copy link
Member Author

jeremylt commented Oct 3, 2024

Rebased, manually tested CUDA, HIP. CI won't run on Noether yet due to the failing fluids tests

@jrwrigh
Copy link
Collaborator

jrwrigh commented Oct 3, 2024

I'll try and fix those when I get back from lunch and my next meeting (which have now combined into the same event).

@jrwrigh
Copy link
Collaborator

jrwrigh commented Oct 3, 2024

(the bin files just needed to be updated if you want to do it yourself).

@jrwrigh
Copy link
Collaborator

jrwrigh commented Oct 4, 2024

#1681

@jeremylt jeremylt force-pushed the jeremy/get-restore branch 3 times, most recently from 700701c to dbb6954 Compare October 9, 2024 15:43
@jeremylt jeremylt merged commit 9beba35 into main Oct 11, 2024
32 checks passed
@jeremylt jeremylt deleted the jeremy/get-restore branch October 11, 2024 16:06
@jeremylt
Copy link
Member Author

@jrwrigh CI has been updated, so HONEE can be updated now

@zatkins-dev zatkins-dev mentioned this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create CeedOperatorFieldGet*Read routines with const parameters
3 participants