[petsc-dev] PetscLogEventRegister() is problematic since it must be call in exactly the same order on all ranks
Barry Smith
bsmith at petsc.dev
Sat Sep 17 09:11:04 CDT 2022
PetscErrorCode SNESCreate(MPI_Comm comm,SNES *outsnes)
{
....
PetscCall(SNESInitializePackage());
One rank creates a SNES, another one doesn't completely different order of registration hence a complete mess.
With dynamic libraries
PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_petscsnes(void)
{
PetscFunctionBegin;
PetscCall(SNESInitializePackage());
PetscFunctionReturn(0);
}
Everything gets initialized when the libraries are loaded so they can be in the same order.
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 :-).
Barry
> On Sep 17, 2022, at 7:53 AM, Matthew Knepley <knepley at gmail.com> wrote:
>
> It has to be collective, so how could it not be called in the same order?
>
> Matt
>
> On Fri, Sep 16, 2022 at 9:05 PM Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
> 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
>
>
>
>
>
> --
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220917/09c9fba0/attachment.html>
More information about the petsc-dev
mailing list