]> https://gitweb.dealii.org/ - dealii.git/commit
Clean up SUNDIALS contexts and communicators.
authorDavid Wells <drwells@email.unc.edu>
Fri, 3 Jun 2022 19:07:22 +0000 (15:07 -0400)
committerDavid Wells <drwells@email.unc.edu>
Sun, 5 Jun 2022 19:35:35 +0000 (15:35 -0400)
commitaf793e1515aa4ef487745a682231ee120f492856
tree4f1b60f196e4e8c0e5bce9d4e732d5d604a9e284
parent86f497e84e823d60157f3eafcd5e50144d98f2e9
Clean up SUNDIALS contexts and communicators.

SUNDIALS will duplicate communicators for us, as needed. For example, in
SUNProfiler_Create, SUNDIALS implements

    #if SUNDIALS_MPI_ENABLED
    profiler->comm = NULL;
    if (comm != NULL)
    {
        profiler->comm = malloc(sizeof(MPI_Comm));
        MPI_Comm_dup(*((MPI_Comm*) comm), (MPI_Comm*) profiler->comm);
    }
    #else
    profiler->comm = comm;
    #endif

It is preferable to let SUNDIALS duplicate the communicator so that we
don't call MPI functions when we have only serial data structures (and
may not have initialized MPI).
include/deal.II/sundials/arkode.h
include/deal.II/sundials/ida.h
include/deal.II/sundials/kinsol.h
source/sundials/arkode.cc
source/sundials/ida.cc
source/sundials/kinsol.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.