<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> It may be that certain attached objects cannot be kept; or if kept, when used need to be checked that they are still valid. This could be tagged with the objectID and when checked the current objectid be compared and the attached objects discarded if out of date. Depends exactly on how the objects are used.<div class=""><br class=""></div><div class=""> <br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 1, 2022, at 6:36 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">If it's tricky I would just throw an error if there are attached objects. <div class="">It was easy for me to work around it.</div><div class="">Worry about it later.</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 1, 2022 at 5:49 PM Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com" class="">junchao.zhang@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">I met errors and I don't know how to fix them, <a href="https://gitlab.com/petsc/petsc/-/jobs/2151255655" target="_blank" class="">https://gitlab.com/petsc/petsc/-/jobs/2151255655</a><div class="">The errors are all hypre-related. <a class="gmail_plusreply" id="gmail-m_6403448607308853413plusReplyChip-0" href="mailto:stefano.zampini@gmail.com" target="_blank">@Stefano Zampini</a> might know more.</div><div class="">Perhaps we can assert in MatHeaderMerge(A,C) and A does not contain composed objects? MatHeaderMerge() is so vague on what will be kept and what will be discarded.</div><div class=""><br class=""></div><div class=""><div class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="">--Junchao Zhang</div></div></div><br class=""></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 1, 2022 at 3:00 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">I can attach my containers (3!) after this call.<div class="">Actually better structure in my code but this should be fixed.</div><div class="">Thanks</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 1, 2022 at 3:06 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" class="">bsmith@petsc.dev</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class=""><br class=""></div> These might not need to be deleted but could possibly be moved over<div class=""><br class=""></div><div class=""><div class="">ierr = PetscFunctionListDestroy(&((PetscObject)A)->qlist);CHKERRQ(ierr);</div><div class=""> ierr = PetscObjectListDestroy(&((PetscObject)A)->olist);CHKERRQ(ierr);</div><div class=""> ierr = PetscComposedQuantitiesDestroy((PetscObject)A);CHKERRQ(ierr);</div><div class=""><br class=""></div><div class="">also MatHeaderReplace() exists. I struggle to understand the exact differences and why both exist but I think there are some subtle reasons why there are both and don't know if they can be merged.</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Mar 1, 2022, at 2:47 PM, Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com" target="_blank" class="">junchao.zhang@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">I realized this problem but did not expect someone would run into it :)<div class="">Let me think again.<br class=""><div class=""><br clear="all" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="">--Junchao Zhang</div></div></div><br class=""></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 1, 2022 at 1:33 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">I have a container attached to my matrix and it seems to go away after a call to MatSetPreallocationCOO.<div class="">Does that sound plausible?</div></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>