<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>  PetscErrorCode  SNESCreate(MPI_Comm comm,SNES *outsnes)<div class="">{</div><div class="">....</div><div class="">  PetscCall(SNESInitializePackage());</div><div class=""><br class=""></div><div class="">One rank creates a SNES, another one doesn't completely different order of registration hence a complete mess.</div><div class=""><br class=""></div><div class="">With dynamic libraries </div><div class=""><br class=""></div><div class=""><div class="">PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_petscsnes(void)</div><div class="">{</div><div class="">  PetscFunctionBegin;</div><div class="">  PetscCall(SNESInitializePackage());</div><div class="">  PetscFunctionReturn(0);</div><div class="">}</div></div><div class=""><br class=""></div><div class="">Everything gets initialized when the libraries are loaded so they can be in the same order.</div><div class=""><br class=""></div><div class="">I believe Jed found some nonstandard magic that when using shared? classic? libraries triggering an initialization function in C from that library that could solve the problem but I forgot what it was. We should start using it, like Jed said we should have five years ago :-).</div><div class=""><br class=""></div><div class="">Barry</div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 17, 2022, at 7:53 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">It has to be collective, so how could it not be called in the same order?<div class=""><br class=""></div><div class="">   Matt</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 16, 2022 at 9:05 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" 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">PetscLogEventRegister() is problematic since it must be call in exactly the same order on all ranks. So for any computing beyond the trivial we've been doing for 30 years -log_view is worthless<br class="">
<br class="">
<br class="">
<br class="">
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></body></html>