On Thu, Aug 27, 2015 at 9:53 AM, Michael Povolotskyi <mpovo...@purdue.edu> wrote:
> Another thought. > In your error handler you call MPI_Abort. > I think this is causing problem for my application. > In my application I use both real and complex versions of PETSc, so I > initialize MPI myself, then initialize PETSC, then initialize libmesh. > I don't know what one is legally allowed to do (other than abort()) in a terminate handler, or what the state of the program even is once the terminate handler has been called, so I'm pretty sure we have to call MPI_Abort() there (as opposed to regular abort(), which is wrong for MPI codes). > Can I still have libmesh throwing exceptions (because it is useful to do > checks), but not catch them inside the libmesh? > Yes, they just have to be caught before they leave main(), otherwise the terminate handler is invoked and the code aborts. -- John ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users