From b76f20515509c39d47842d5a1ae26e48d80aacfe Mon Sep 17 00:00:00 2001 From: Logan Harbour Date: Tue, 27 Jan 2026 11:14:37 -0700 Subject: [PATCH 01/11] Add libmesh_abort() to enable aborting ASAP --- include/base/libmesh.h | 8 +++ src/base/libmesh.C | 149 +++++++++++++++++++++-------------------- 2 files changed, 86 insertions(+), 71 deletions(-) diff --git a/include/base/libmesh.h b/include/base/libmesh.h index 982ca23e2e7..5051d9ff1b7 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -165,6 +165,14 @@ bool initialized (); */ bool closed (); +/** + * Abort as soon as possible on this rank. + * + * This cleans up stream buffers, aborts with MPI_Abort (if MPI + * is initialized), and falls back to std::abort. + */ +void libmesh_abort(); + /** * A terminate handler. libMesh sets this to handle uncaught * exceptions; it can also be called manually to print stack traces diff --git a/src/base/libmesh.C b/src/base/libmesh.C index dfd6f1ec57c..c2a593a69dc 100644 --- a/src/base/libmesh.C +++ b/src/base/libmesh.C @@ -42,6 +42,7 @@ #ifdef LIBMESH_ENABLE_EXCEPTIONS #include +#include #endif #ifdef LIBMESH_HAVE_OPENMP @@ -374,17 +375,46 @@ bool closed() } + +void libmesh_abort() +{ + libMesh::perflog.clear(); + + // Now that we're done with output we should clean up our stream + // buffers; if we fail to uninstall_thread_buffered_sync() when + // needed we can end up seeing a segfault in iostreams destructors + cleanup_stream_buffers(); + + // If we have MPI and it has been initialized, we need to be sure + // and call MPI_Abort instead of std::abort, so that the parallel + // job can die nicely. +#if defined(LIBMESH_HAVE_MPI) + int mpi_initialized; + MPI_Initialized (&mpi_initialized); + + if (mpi_initialized) + MPI_Abort(libMesh::GLOBAL_COMM_WORLD, 1); +#endif + + // The last attempt to die if nothing else has killed us + std::abort(); +} + + + #ifdef LIBMESH_ENABLE_EXCEPTIONS std::terminate_handler old_terminate_handler; #endif void libmesh_terminate_handler() { - bool print_debug_info = true; + bool quiet = false; + #ifdef LIBMESH_ENABLE_EXCEPTIONS // If we have an active exception, it may have an error message that // we should print, or it may have a type that tells us not to print // anything. + std::optional exception_message; std::exception_ptr ex = std::current_exception(); if (ex) { @@ -392,83 +422,61 @@ void libmesh_terminate_handler() { std::rethrow_exception(ex); } - catch (const TerminationException & term_ex) - { - print_debug_info = false; - } - catch (...) - { - } - } - if (print_debug_info) - libMesh::err << "libMesh terminating:\n"; - if (ex) - { - try - { - std::rethrow_exception(ex); - } + // Capture the exception message to be used later. catch (const std::exception & std_ex) { - libMesh::err << std_ex.what(); + exception_message = std_ex.what(); } - catch (...) + // We arrived here via TerminationException (likely from + // libmesh_terminate()), which implies that a useful + // error message has already been emitted. + catch (const TerminationException &) { + quiet = true; } } - if (print_debug_info) - libMesh::err << std::endl; #endif - // If this got called then we're probably crashing; let's print a - // stack trace. The trace files that are ultimately written depend on: - // 1.) Who throws the exception. - // 2.) Whether the C++ runtime unwinds the stack before the - // terminate_handler is called (this is implementation defined). - // - // The various cases are summarized in the table below: - // - // | libmesh exception | other exception - // ------------------------------------- - // stack unwinds | A | B - // stack does not unwind | C | D - // - // Case A: There will be two stack traces in the file: one "useful" - // one, and one nearly empty one due to stack unwinding. - // Case B: You will get one nearly empty stack trace (not great, Bob!) - // Case C: You will get two nearly identical stack traces, ignore one of them. - // Case D: You will get one useful stack trace. - // - // Cases A and B (where the stack unwinds when an exception leaves - // main) appear to be non-existent in practice. I don't have a - // definitive list, but the stack does not unwind for GCC on either - // Mac or Linux. I think there's good reasons for this behavior too: - // it's much easier to get a stack trace when the stack doesn't - // unwind, for example. - if (print_debug_info) - libMesh::write_traceout(); - - // We may care about performance data pre-crash; it would be sad to - // throw that away. - if (print_debug_info) - libMesh::perflog.print_log(); - libMesh::perflog.clear(); - - // Now that we're done with output we should clean up our stream - // buffers; if we fail to uninstall_thread_buffered_sync() when - // needed we can end up seeing a segfault in iostreams destructors - cleanup_stream_buffers(); - - // If we have MPI and it has been initialized, we need to be sure - // and call MPI_Abort instead of std::abort, so that the parallel - // job can die nicely. -#if defined(LIBMESH_HAVE_MPI) - int mpi_initialized; - MPI_Initialized (&mpi_initialized); - - if (mpi_initialized) - MPI_Abort(libMesh::GLOBAL_COMM_WORLD, 1); + if (!quiet) + { + libMesh::err << "libMesh terminating"; +#ifdef LIBMESH_ENABLE_EXCEPTIONS + if (exception_message) + libMesh::err << ":\n" << *exception_message; #endif + libMesh::err << std::endl; + + // If this got called then we're probably crashing; let's print a + // stack trace. The trace files that are ultimately written depend on: + // 1.) Who throws the exception. + // 2.) Whether the C++ runtime unwinds the stack before the + // terminate_handler is called (this is implementation defined). + // + // The various cases are summarized in the table below: + // + // | libmesh exception | other exception + // ------------------------------------- + // stack unwinds | A | B + // stack does not unwind | C | D + // + // Case A: There will be two stack traces in the file: one "useful" + // one, and one nearly empty one due to stack unwinding. + // Case B: You will get one nearly empty stack trace (not great, Bob!) + // Case C: You will get two nearly identical stack traces, ignore one of them. + // Case D: You will get one useful stack trace. + // + // Cases A and B (where the stack unwinds when an exception leaves + // main) appear to be non-existent in practice. I don't have a + // definitive list, but the stack does not unwind for GCC on either + // Mac or Linux. I think there's good reasons for this behavior too: + // it's much easier to get a stack trace when the stack doesn't + // unwind, for example. + libMesh::write_traceout(); + + // We may care about performance data pre-crash; it would be sad to + // throw that away. + libMesh::perflog.print_log(); + } #ifdef LIBMESH_ENABLE_EXCEPTIONS // The system terminate_handler may do useful things, or the user @@ -476,8 +484,7 @@ void libmesh_terminate_handler() old_terminate_handler(); #endif - // The last attempt to die if nothing else has killed us - std::abort(); + libmesh_abort(); } From 20c3b5364d86ed0d07e1d4395e7ce7a7637932ee Mon Sep 17 00:00:00 2001 From: Logan Harbour Date: Tue, 27 Jan 2026 13:36:46 -0700 Subject: [PATCH 02/11] Define libmesh_abort() as noreturn --- include/base/libmesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/base/libmesh.h b/include/base/libmesh.h index 5051d9ff1b7..b38a2614b90 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -171,7 +171,7 @@ bool closed (); * This cleans up stream buffers, aborts with MPI_Abort (if MPI * is initialized), and falls back to std::abort. */ -void libmesh_abort(); +[[noreturn]] void libmesh_abort(); /** * A terminate handler. libMesh sets this to handle uncaught From 6f405216f1d77cc69e43639db0627b959135578d Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 13:39:53 -0600 Subject: [PATCH 03/11] Better docs on abort/terminate --- include/base/libmesh.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/base/libmesh.h b/include/base/libmesh.h index b38a2614b90..b0a9d44d903 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -166,17 +166,23 @@ bool initialized (); bool closed (); /** - * Abort as soon as possible on this rank. + * Abort as soon as possible. * * This cleans up stream buffers, aborts with MPI_Abort (if MPI - * is initialized), and falls back to std::abort. + * is initialized), and falls back on std::abort afterward. */ [[noreturn]] void libmesh_abort(); /** * A terminate handler. libMesh sets this to handle uncaught - * exceptions; it can also be called manually to print stack traces - * and perf logs and call MPI + * exceptions; it can also be called manually to cleanup, print + * any diagnostics, do cleanup, and abort. + * + * If an uncaught exception is a TerminationException, as thrown by + * libmesh_terminate(), the handler avoids any diagnostic output. + * + * If an uncaught exception is a std::exception, its message is + * printed, followed by stack trace and performance log output. */ void libmesh_terminate_handler(); From a1994f5a83819449ad485327c73862bb17c768da Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 13:42:59 -0600 Subject: [PATCH 04/11] Give libmesh_abort() its own header --- include/base/libmesh.h | 8 ------- include/base/libmesh_abort.h | 37 +++++++++++++++++++++++++++++++ include/base/libmesh_exceptions.h | 4 +++- include/include_HEADERS | 1 + include/libmesh/Makefile.am | 4 ++++ 5 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 include/base/libmesh_abort.h diff --git a/include/base/libmesh.h b/include/base/libmesh.h index b0a9d44d903..6ecab41bbb7 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -165,14 +165,6 @@ bool initialized (); */ bool closed (); -/** - * Abort as soon as possible. - * - * This cleans up stream buffers, aborts with MPI_Abort (if MPI - * is initialized), and falls back on std::abort afterward. - */ -[[noreturn]] void libmesh_abort(); - /** * A terminate handler. libMesh sets this to handle uncaught * exceptions; it can also be called manually to cleanup, print diff --git a/include/base/libmesh_abort.h b/include/base/libmesh_abort.h new file mode 100644 index 00000000000..dfe5308c8de --- /dev/null +++ b/include/base/libmesh_abort.h @@ -0,0 +1,37 @@ +// The libMesh Finite Element Library. +// Copyright (C) 2002-2025 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. + +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + +#ifndef LIBMESH_LIBMESH_ABORT_H +#define LIBMESH_LIBMESH_ABORT_H + +#include "libmesh/libmesh_config.h" + +namespace libMesh { + +/** + * Abort as soon as possible. + * + * This cleans up stream buffers, aborts with MPI_Abort (if MPI + * is initialized), and falls back on std::abort afterward. + */ +[[noreturn]] void libmesh_abort(); + +} + +#endif // LIBMESH_LIBMESH_ABORT_H diff --git a/include/base/libmesh_exceptions.h b/include/base/libmesh_exceptions.h index 639face78f2..b250e30e07f 100644 --- a/include/base/libmesh_exceptions.h +++ b/include/base/libmesh_exceptions.h @@ -22,6 +22,8 @@ #include "libmesh/libmesh_config.h" +#include "libmesh/libmesh_abort.h" + #include #include #include @@ -192,7 +194,7 @@ class TerminationException #else -#define LIBMESH_THROW(e) do { libMesh::err << e.what(); std::abort(); } while (0) +#define LIBMESH_THROW(e) do { libMesh::err << e.what(); libmesh_abort(); } while (0) #define libmesh_rethrow #define libmesh_try #define libmesh_catch(e) if (0) diff --git a/include/include_HEADERS b/include/include_HEADERS index 348acfa7081..3f0968fe475 100644 --- a/include/include_HEADERS +++ b/include/include_HEADERS @@ -26,6 +26,7 @@ include_HEADERS = \ base/getpot.h \ base/id_types.h \ base/libmesh.h \ + base/libmesh_abort.h \ base/libmesh_base.h \ base/libmesh_common.h \ base/libmesh_documentation.h \ diff --git a/include/libmesh/Makefile.am b/include/libmesh/Makefile.am index 7d80c6bdcf2..8c49e7ba361 100644 --- a/include/libmesh/Makefile.am +++ b/include/libmesh/Makefile.am @@ -15,6 +15,7 @@ BUILT_SOURCES = \ getpot.h \ id_types.h \ libmesh.h \ + libmesh_abort.h \ libmesh_augment_std_namespace.h \ libmesh_base.h \ libmesh_common.h \ @@ -643,6 +644,9 @@ id_types.h: $(top_srcdir)/include/base/id_types.h libmesh.h: $(top_srcdir)/include/base/libmesh.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +libmesh_abort.h: $(top_srcdir)/include/base/libmesh_abort.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + libmesh_augment_std_namespace.h: $(top_srcdir)/include/base/libmesh_augment_std_namespace.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ From 30531836de826e40b572323b8be3d8263ecd749e Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 14:05:25 -0600 Subject: [PATCH 05/11] Move FPE/C++ exceptions code to libmesh_exceptions --- include/base/libmesh.h | 23 --- include/base/libmesh_exceptions.h | 23 +++ src/base/libmesh.C | 136 ------------- src/base/libmesh_exceptions.C | 310 ++++++++++++++++++++++++++++++ src/libmesh_SOURCES | 1 + 5 files changed, 334 insertions(+), 159 deletions(-) create mode 100644 src/base/libmesh_exceptions.C diff --git a/include/base/libmesh.h b/include/base/libmesh.h index 6ecab41bbb7..bfb7adcb390 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -165,29 +165,6 @@ bool initialized (); */ bool closed (); -/** - * A terminate handler. libMesh sets this to handle uncaught - * exceptions; it can also be called manually to cleanup, print - * any diagnostics, do cleanup, and abort. - * - * If an uncaught exception is a TerminationException, as thrown by - * libmesh_terminate(), the handler avoids any diagnostic output. - * - * If an uncaught exception is a std::exception, its message is - * printed, followed by stack trace and performance log output. - */ -void libmesh_terminate_handler(); - -/** - * Toggle hardware trap floating point exceptions - */ -void enableFPE(bool on); - -/** - * Toggle libMesh reporting of segmentation faults - */ -void enableSEGV(bool on); - /** * \returns \p true if the argument \p arg was specified on the command line, * \p false otherwise. diff --git a/include/base/libmesh_exceptions.h b/include/base/libmesh_exceptions.h index b250e30e07f..895622de1a9 100644 --- a/include/base/libmesh_exceptions.h +++ b/include/base/libmesh_exceptions.h @@ -30,6 +30,29 @@ namespace libMesh { +/** + * A terminate handler. libMesh sets this to handle uncaught + * exceptions; it can also be called manually to cleanup, print + * any diagnostics, do cleanup, and abort. + * + * If an uncaught exception is a TerminationException, as thrown by + * libmesh_terminate(), the handler avoids any diagnostic output. + * + * If an uncaught exception is a std::exception, its message is + * printed, followed by stack trace and performance log output. + */ +void libmesh_terminate_handler(); + +/** + * Toggle hardware trap floating point exceptions + */ +void enableFPE(bool on); + +/** + * Toggle libMesh reporting of segmentation faults + */ +void enableSEGV(bool on); + /** * A class to represent the internal "this should never happen" * errors, to be thrown by "libmesh_error();" diff --git a/src/base/libmesh.C b/src/base/libmesh.C index c2a593a69dc..715a8d598f5 100644 --- a/src/base/libmesh.C +++ b/src/base/libmesh.C @@ -126,55 +126,6 @@ bool libmesh_initialized_petsc = false; bool libmesh_initialized_slepc = false; #endif - - -/** - * Floating point exception handler -- courtesy of Cody Permann & MOOSE team - */ -#if LIBMESH_HAVE_DECL_SIGACTION -void libmesh_handleFPE(int /*signo*/, siginfo_t * info, void * /*context*/) -{ - libMesh::err << std::endl; - libMesh::err << "Floating point exception signaled ("; - switch (info->si_code) - { - case FPE_INTDIV: libMesh::err << "integer divide by zero"; break; - case FPE_INTOVF: libMesh::err << "integer overflow"; break; - case FPE_FLTDIV: libMesh::err << "floating point divide by zero"; break; - case FPE_FLTOVF: libMesh::err << "floating point overflow"; break; - case FPE_FLTUND: libMesh::err << "floating point underflow"; break; - case FPE_FLTRES: libMesh::err << "floating point inexact result"; break; - case FPE_FLTINV: libMesh::err << "invalid floating point operation"; break; - case FPE_FLTSUB: libMesh::err << "subscript out of range"; break; - default: libMesh::err << "unrecognized"; break; - } - libMesh::err << ")!" << std::endl; - - libmesh_error_msg("\nTo track this down, compile in debug mode, then in gdb do:\n" \ - << " break libmesh_handleFPE\n" \ - << " run ...\n" \ - << " bt"); -} - - -void libmesh_handleSEGV(int /*signo*/, siginfo_t * info, void * /*context*/) -{ - libMesh::err << std::endl; - libMesh::err << "Segmentation fault exception signaled ("; - switch (info->si_code) - { - case SEGV_MAPERR: libMesh::err << "Address not mapped"; break; - case SEGV_ACCERR: libMesh::err << "Invalid permissions"; break; - default: libMesh::err << "unrecognized"; break; - } - libMesh::err << ")!" << std::endl; - - libmesh_error_msg("\nTo track this down, compile in debug mode, then in gdb do:\n" \ - << " break libmesh_handleSEGV\n" \ - << " run ...\n" \ - << " bt"); -} -#endif } // anonymous namespace @@ -402,93 +353,6 @@ void libmesh_abort() -#ifdef LIBMESH_ENABLE_EXCEPTIONS -std::terminate_handler old_terminate_handler; -#endif - -void libmesh_terminate_handler() -{ - bool quiet = false; - -#ifdef LIBMESH_ENABLE_EXCEPTIONS - // If we have an active exception, it may have an error message that - // we should print, or it may have a type that tells us not to print - // anything. - std::optional exception_message; - std::exception_ptr ex = std::current_exception(); - if (ex) - { - try - { - std::rethrow_exception(ex); - } - // Capture the exception message to be used later. - catch (const std::exception & std_ex) - { - exception_message = std_ex.what(); - } - // We arrived here via TerminationException (likely from - // libmesh_terminate()), which implies that a useful - // error message has already been emitted. - catch (const TerminationException &) - { - quiet = true; - } - } -#endif - - if (!quiet) - { - libMesh::err << "libMesh terminating"; -#ifdef LIBMESH_ENABLE_EXCEPTIONS - if (exception_message) - libMesh::err << ":\n" << *exception_message; -#endif - libMesh::err << std::endl; - - // If this got called then we're probably crashing; let's print a - // stack trace. The trace files that are ultimately written depend on: - // 1.) Who throws the exception. - // 2.) Whether the C++ runtime unwinds the stack before the - // terminate_handler is called (this is implementation defined). - // - // The various cases are summarized in the table below: - // - // | libmesh exception | other exception - // ------------------------------------- - // stack unwinds | A | B - // stack does not unwind | C | D - // - // Case A: There will be two stack traces in the file: one "useful" - // one, and one nearly empty one due to stack unwinding. - // Case B: You will get one nearly empty stack trace (not great, Bob!) - // Case C: You will get two nearly identical stack traces, ignore one of them. - // Case D: You will get one useful stack trace. - // - // Cases A and B (where the stack unwinds when an exception leaves - // main) appear to be non-existent in practice. I don't have a - // definitive list, but the stack does not unwind for GCC on either - // Mac or Linux. I think there's good reasons for this behavior too: - // it's much easier to get a stack trace when the stack doesn't - // unwind, for example. - libMesh::write_traceout(); - - // We may care about performance data pre-crash; it would be sad to - // throw that away. - libMesh::perflog.print_log(); - } - -#ifdef LIBMESH_ENABLE_EXCEPTIONS - // The system terminate_handler may do useful things, or the user - // may have set their own terminate handler that we want to call. - old_terminate_handler(); -#endif - - libmesh_abort(); -} - - - LibMeshInit::LibMeshInit (int argc, const char * const * argv, TIMPI::communicator COMM_WORLD_IN, int n_threads) { diff --git a/src/base/libmesh_exceptions.C b/src/base/libmesh_exceptions.C new file mode 100644 index 00000000000..8d1ea16411e --- /dev/null +++ b/src/base/libmesh_exceptions.C @@ -0,0 +1,310 @@ +// The libMesh Finite Element Library. +// Copyright (C) 2002-2025 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. + +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +// Local includes +#include "libmesh/libmesh_exceptions.h" + +// C/C++ includes +#include +#include +#include + +#ifdef LIBMESH_ENABLE_EXCEPTIONS +#include +#include +#endif + +#ifdef LIBMESH_HAVE_OPENMP +#include +#endif + +#include "stdlib.h" // C, not C++ - we need setenv() from POSIX +#include "signal.h" + + +// floating-point exceptions +#ifdef LIBMESH_HAVE_FENV_H +# include +#endif +#ifdef LIBMESH_HAVE_XMMINTRIN_H +# include +#endif + + +#if defined(LIBMESH_HAVE_MPI) +# include "libmesh/ignore_warnings.h" +# include +# include "libmesh/restore_warnings.h" +#endif // #if defined(LIBMESH_HAVE_MPI) + +#if defined(LIBMESH_HAVE_PETSC) +# include "libmesh/petsc_solver_exception.h" +# include +# include +# include "libmesh/petscdmlibmesh.h" +# if defined(LIBMESH_HAVE_SLEPC) +// Ignore unused variable warnings from SLEPc +# include "libmesh/ignore_warnings.h" +# include "libmesh/slepc_macro.h" +# include +# include "libmesh/restore_warnings.h" +# endif // #if defined(LIBMESH_HAVE_SLEPC) +#endif // #if defined(LIBMESH_HAVE_PETSC) + +#ifdef LIBMESH_HAVE_NETGEN +// We need the nglib namespace, because it's used everywhere in nglib +// and we don't get binary compatibility without it. +// +// We need the nglib namespace *here*, because somehow nobody ever +// figured out to just put it in nglib.h? +namespace nglib { +#include "netgen/nglib/nglib.h" +} +#endif + +// If we're using MPI and VTK has been detected, we need to do some +// MPI initialize/finalize stuff for VTK. +#if defined(LIBMESH_HAVE_MPI) && defined(LIBMESH_HAVE_VTK) +#include "libmesh/ignore_warnings.h" +# include "vtkMPIController.h" +#include "libmesh/restore_warnings.h" +#endif + +#include + +// -------------------------------------------------------- +// Local anonymous namespace to hold miscellaneous bits +namespace { + +/** + * Floating point exception handler -- courtesy of Cody Permann & MOOSE team + */ +#if LIBMESH_HAVE_DECL_SIGACTION +void libmesh_handleFPE(int /*signo*/, siginfo_t * info, void * /*context*/) +{ + libMesh::err << std::endl; + libMesh::err << "Floating point exception signaled ("; + switch (info->si_code) + { + case FPE_INTDIV: libMesh::err << "integer divide by zero"; break; + case FPE_INTOVF: libMesh::err << "integer overflow"; break; + case FPE_FLTDIV: libMesh::err << "floating point divide by zero"; break; + case FPE_FLTOVF: libMesh::err << "floating point overflow"; break; + case FPE_FLTUND: libMesh::err << "floating point underflow"; break; + case FPE_FLTRES: libMesh::err << "floating point inexact result"; break; + case FPE_FLTINV: libMesh::err << "invalid floating point operation"; break; + case FPE_FLTSUB: libMesh::err << "subscript out of range"; break; + default: libMesh::err << "unrecognized"; break; + } + libMesh::err << ")!" << std::endl; + + libmesh_error_msg("\nTo track this down, compile in debug mode, then in gdb do:\n" \ + << " break libmesh_handleFPE\n" \ + << " run ...\n" \ + << " bt"); +} + + +void libmesh_handleSEGV(int /*signo*/, siginfo_t * info, void * /*context*/) +{ + libMesh::err << std::endl; + libMesh::err << "Segmentation fault exception signaled ("; + switch (info->si_code) + { + case SEGV_MAPERR: libMesh::err << "Address not mapped"; break; + case SEGV_ACCERR: libMesh::err << "Invalid permissions"; break; + default: libMesh::err << "unrecognized"; break; + } + libMesh::err << ")!" << std::endl; + + libmesh_error_msg("\nTo track this down, compile in debug mode, then in gdb do:\n" \ + << " break libmesh_handleSEGV\n" \ + << " run ...\n" \ + << " bt"); +} +#endif +} // anonymous namespace + + + +namespace libMesh +{ + +// ------------------------------------------------------------ +// libMesh functions + +#ifdef LIBMESH_ENABLE_EXCEPTIONS +std::terminate_handler old_terminate_handler; +#endif + +void libmesh_terminate_handler() +{ + bool quiet = false; + +#ifdef LIBMESH_ENABLE_EXCEPTIONS + // If we have an active exception, it may have an error message that + // we should print, or it may have a type that tells us not to print + // anything. + std::optional exception_message; + std::exception_ptr ex = std::current_exception(); + if (ex) + { + try + { + std::rethrow_exception(ex); + } + // Capture the exception message to be used later. + catch (const std::exception & std_ex) + { + exception_message = std_ex.what(); + } + // We arrived here via TerminationException (likely from + // libmesh_terminate()), which implies that a useful + // error message has already been emitted. + catch (const TerminationException &) + { + quiet = true; + } + } +#endif + + if (!quiet) + { + libMesh::err << "libMesh terminating"; +#ifdef LIBMESH_ENABLE_EXCEPTIONS + if (exception_message) + libMesh::err << ":\n" << *exception_message; +#endif + libmesh::err << std::endl; + + // If this got called then we're probably crashing; let's print a + // stack trace. The trace files that are ultimately written depend on: + // 1.) Who throws the exception. + // 2.) Whether the C++ runtime unwinds the stack before the + // terminate_handler is called (this is implementation defined). + // + // The various cases are summarized in the table below: + // + // | libmesh exception | other exception + // ------------------------------------- + // stack unwinds | A | B + // stack does not unwind | C | D + // + // Case A: There will be two stack traces in the file: one "useful" + // one, and one nearly empty one due to stack unwinding. + // Case B: You will get one nearly empty stack trace (not great, Bob!) + // Case C: You will get two nearly identical stack traces, ignore one of them. + // Case D: You will get one useful stack trace. + // + // Cases A and B (where the stack unwinds when an exception leaves + // main) appear to be non-existent in practice. I don't have a + // definitive list, but the stack does not unwind for GCC on either + // Mac or Linux. I think there's good reasons for this behavior too: + // it's much easier to get a stack trace when the stack doesn't + // unwind, for example. + libMesh::write_traceout(); + + // We may care about performance data pre-crash; it would be sad to + // throw that away. + libMesh::perflog.print_log(); + } + +#ifdef LIBMESH_ENABLE_EXCEPTIONS + // The system terminate_handler may do useful things, or the user + // may have set their own terminate handler that we want to call. + old_terminate_handler(); +#endif + + libmesh_abort(); +} + + +/** + * Toggle floating point exceptions -- courtesy of Cody Permann & MOOSE team + */ +void enableFPE(bool on) +{ +#if !defined(LIBMESH_HAVE_FEENABLEEXCEPT) && defined(LIBMESH_HAVE_XMMINTRIN_H) + static int flags = 0; +#endif + + if (on) + { +#ifdef LIBMESH_HAVE_FEENABLEEXCEPT + feenableexcept(FE_DIVBYZERO | FE_INVALID); +#elif LIBMESH_HAVE_XMMINTRIN_H + flags = _MM_GET_EXCEPTION_MASK(); // store the flags + _MM_SET_EXCEPTION_MASK(flags & ~_MM_MASK_INVALID); +#endif + +#if LIBMESH_HAVE_DECL_SIGACTION + struct sigaction new_action, old_action; + + // Set up the structure to specify the new action. + new_action.sa_sigaction = libmesh_handleFPE; + sigemptyset (&new_action.sa_mask); + new_action.sa_flags = SA_SIGINFO; + + sigaction (SIGFPE, nullptr, &old_action); + if (old_action.sa_handler != SIG_IGN) + sigaction (SIGFPE, &new_action, nullptr); +#endif + } + else + { +#ifdef LIBMESH_HAVE_FEDISABLEEXCEPT + fedisableexcept(FE_DIVBYZERO | FE_INVALID); +#elif LIBMESH_HAVE_XMMINTRIN_H + _MM_SET_EXCEPTION_MASK(flags); +#endif + signal(SIGFPE, SIG_DFL); + } +} + + +// Enable handling of SIGSEGV by libMesh +// (potentially instead of PETSc) +void enableSEGV(bool on) +{ +#if LIBMESH_HAVE_DECL_SIGACTION + static struct sigaction old_action; + static bool was_on = false; + + if (on) + { + struct sigaction new_action; + was_on = true; + + // Set up the structure to specify the new action. + new_action.sa_sigaction = libmesh_handleSEGV; + sigemptyset (&new_action.sa_mask); + new_action.sa_flags = SA_SIGINFO; + + sigaction (SIGSEGV, &new_action, &old_action); + } + else if (was_on) + { + was_on = false; + sigaction (SIGSEGV, &old_action, nullptr); + } +#else + libmesh_error_msg("System call sigaction not supported."); +#endif +} + +} // namespace libMesh diff --git a/src/libmesh_SOURCES b/src/libmesh_SOURCES index 0b975a5eb89..d73987f9168 100644 --- a/src/libmesh_SOURCES +++ b/src/libmesh_SOURCES @@ -7,6 +7,7 @@ libmesh_SOURCES = \ src/base/dof_object.C \ src/base/libmesh.C \ src/base/libmesh_common.C \ + src/base/libmesh_exceptions.C \ src/base/libmesh_singleton.C \ src/base/libmesh_version.C \ src/base/periodic_boundaries.C \ From ca777fea9a29dd6e0d13c11349b5c453a23a4959 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 13:45:11 -0600 Subject: [PATCH 06/11] Re-bootstrap --- Makefile.in | 111 +++++++++++++++++++++++++++++------- include/Makefile.in | 1 + include/libmesh/Makefile.in | 13 +++-- 3 files changed, 100 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index ffc4b9fbf75..3a1ba94fba4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -272,10 +272,10 @@ am__libmesh_dbg_la_SOURCES_DIST = src/base/dirichlet_boundary.C \ src/base/dof_map.C src/base/dof_map_base.C \ src/base/dof_map_constraints.C src/base/dof_object.C \ src/base/libmesh.C src/base/libmesh_common.C \ - src/base/libmesh_singleton.C src/base/libmesh_version.C \ - src/base/periodic_boundaries.C src/base/periodic_boundary.C \ - src/base/periodic_boundary_base.C src/base/print_trace.C \ - src/base/reference_counted_object.C \ + src/base/libmesh_exceptions.C src/base/libmesh_singleton.C \ + src/base/libmesh_version.C src/base/periodic_boundaries.C \ + src/base/periodic_boundary.C src/base/periodic_boundary_base.C \ + src/base/print_trace.C src/base/reference_counted_object.C \ src/base/reference_counter.C src/base/single_predicates.C \ src/base/sparsity_pattern.C src/base/variable.C \ src/error_estimation/adjoint_refinement_estimator.C \ @@ -600,6 +600,7 @@ am__objects_1 = src/base/libmesh_dbg_la-dirichlet_boundary.lo \ src/base/libmesh_dbg_la-dof_object.lo \ src/base/libmesh_dbg_la-libmesh.lo \ src/base/libmesh_dbg_la-libmesh_common.lo \ + src/base/libmesh_dbg_la-libmesh_exceptions.lo \ src/base/libmesh_dbg_la-libmesh_singleton.lo \ src/base/libmesh_dbg_la-libmesh_version.lo \ src/base/libmesh_dbg_la-periodic_boundaries.lo \ @@ -1086,10 +1087,10 @@ am__libmesh_devel_la_SOURCES_DIST = src/base/dirichlet_boundary.C \ src/base/dof_map.C src/base/dof_map_base.C \ src/base/dof_map_constraints.C src/base/dof_object.C \ src/base/libmesh.C src/base/libmesh_common.C \ - src/base/libmesh_singleton.C src/base/libmesh_version.C \ - src/base/periodic_boundaries.C src/base/periodic_boundary.C \ - src/base/periodic_boundary_base.C src/base/print_trace.C \ - src/base/reference_counted_object.C \ + src/base/libmesh_exceptions.C src/base/libmesh_singleton.C \ + src/base/libmesh_version.C src/base/periodic_boundaries.C \ + src/base/periodic_boundary.C src/base/periodic_boundary_base.C \ + src/base/print_trace.C src/base/reference_counted_object.C \ src/base/reference_counter.C src/base/single_predicates.C \ src/base/sparsity_pattern.C src/base/variable.C \ src/error_estimation/adjoint_refinement_estimator.C \ @@ -1413,6 +1414,7 @@ am__objects_2 = src/base/libmesh_devel_la-dirichlet_boundary.lo \ src/base/libmesh_devel_la-dof_object.lo \ src/base/libmesh_devel_la-libmesh.lo \ src/base/libmesh_devel_la-libmesh_common.lo \ + src/base/libmesh_devel_la-libmesh_exceptions.lo \ src/base/libmesh_devel_la-libmesh_singleton.lo \ src/base/libmesh_devel_la-libmesh_version.lo \ src/base/libmesh_devel_la-periodic_boundaries.lo \ @@ -1896,10 +1898,10 @@ am__libmesh_oprof_la_SOURCES_DIST = src/base/dirichlet_boundary.C \ src/base/dof_map.C src/base/dof_map_base.C \ src/base/dof_map_constraints.C src/base/dof_object.C \ src/base/libmesh.C src/base/libmesh_common.C \ - src/base/libmesh_singleton.C src/base/libmesh_version.C \ - src/base/periodic_boundaries.C src/base/periodic_boundary.C \ - src/base/periodic_boundary_base.C src/base/print_trace.C \ - src/base/reference_counted_object.C \ + src/base/libmesh_exceptions.C src/base/libmesh_singleton.C \ + src/base/libmesh_version.C src/base/periodic_boundaries.C \ + src/base/periodic_boundary.C src/base/periodic_boundary_base.C \ + src/base/print_trace.C src/base/reference_counted_object.C \ src/base/reference_counter.C src/base/single_predicates.C \ src/base/sparsity_pattern.C src/base/variable.C \ src/error_estimation/adjoint_refinement_estimator.C \ @@ -2223,6 +2225,7 @@ am__objects_3 = src/base/libmesh_oprof_la-dirichlet_boundary.lo \ src/base/libmesh_oprof_la-dof_object.lo \ src/base/libmesh_oprof_la-libmesh.lo \ src/base/libmesh_oprof_la-libmesh_common.lo \ + src/base/libmesh_oprof_la-libmesh_exceptions.lo \ src/base/libmesh_oprof_la-libmesh_singleton.lo \ src/base/libmesh_oprof_la-libmesh_version.lo \ src/base/libmesh_oprof_la-periodic_boundaries.lo \ @@ -2706,10 +2709,10 @@ am__libmesh_opt_la_SOURCES_DIST = src/base/dirichlet_boundary.C \ src/base/dof_map.C src/base/dof_map_base.C \ src/base/dof_map_constraints.C src/base/dof_object.C \ src/base/libmesh.C src/base/libmesh_common.C \ - src/base/libmesh_singleton.C src/base/libmesh_version.C \ - src/base/periodic_boundaries.C src/base/periodic_boundary.C \ - src/base/periodic_boundary_base.C src/base/print_trace.C \ - src/base/reference_counted_object.C \ + src/base/libmesh_exceptions.C src/base/libmesh_singleton.C \ + src/base/libmesh_version.C src/base/periodic_boundaries.C \ + src/base/periodic_boundary.C src/base/periodic_boundary_base.C \ + src/base/print_trace.C src/base/reference_counted_object.C \ src/base/reference_counter.C src/base/single_predicates.C \ src/base/sparsity_pattern.C src/base/variable.C \ src/error_estimation/adjoint_refinement_estimator.C \ @@ -3033,6 +3036,7 @@ am__objects_4 = src/base/libmesh_opt_la-dirichlet_boundary.lo \ src/base/libmesh_opt_la-dof_object.lo \ src/base/libmesh_opt_la-libmesh.lo \ src/base/libmesh_opt_la-libmesh_common.lo \ + src/base/libmesh_opt_la-libmesh_exceptions.lo \ src/base/libmesh_opt_la-libmesh_singleton.lo \ src/base/libmesh_opt_la-libmesh_version.lo \ src/base/libmesh_opt_la-periodic_boundaries.lo \ @@ -3515,10 +3519,10 @@ am__libmesh_prof_la_SOURCES_DIST = src/base/dirichlet_boundary.C \ src/base/dof_map.C src/base/dof_map_base.C \ src/base/dof_map_constraints.C src/base/dof_object.C \ src/base/libmesh.C src/base/libmesh_common.C \ - src/base/libmesh_singleton.C src/base/libmesh_version.C \ - src/base/periodic_boundaries.C src/base/periodic_boundary.C \ - src/base/periodic_boundary_base.C src/base/print_trace.C \ - src/base/reference_counted_object.C \ + src/base/libmesh_exceptions.C src/base/libmesh_singleton.C \ + src/base/libmesh_version.C src/base/periodic_boundaries.C \ + src/base/periodic_boundary.C src/base/periodic_boundary_base.C \ + src/base/print_trace.C src/base/reference_counted_object.C \ src/base/reference_counter.C src/base/single_predicates.C \ src/base/sparsity_pattern.C src/base/variable.C \ src/error_estimation/adjoint_refinement_estimator.C \ @@ -3842,6 +3846,7 @@ am__objects_5 = src/base/libmesh_prof_la-dirichlet_boundary.lo \ src/base/libmesh_prof_la-dof_object.lo \ src/base/libmesh_prof_la-libmesh.lo \ src/base/libmesh_prof_la-libmesh_common.lo \ + src/base/libmesh_prof_la-libmesh_exceptions.lo \ src/base/libmesh_prof_la-libmesh_singleton.lo \ src/base/libmesh_prof_la-libmesh_version.lo \ src/base/libmesh_prof_la-periodic_boundaries.lo \ @@ -4812,6 +4817,7 @@ am__depfiles_remade = src/apps/$(DEPDIR)/amr_dbg-amr.Po \ src/base/$(DEPDIR)/libmesh_dbg_la-dof_object.Plo \ src/base/$(DEPDIR)/libmesh_dbg_la-libmesh.Plo \ src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_common.Plo \ + src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Plo \ src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Plo \ src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_version.Plo \ src/base/$(DEPDIR)/libmesh_dbg_la-periodic_boundaries.Plo \ @@ -4830,6 +4836,7 @@ am__depfiles_remade = src/apps/$(DEPDIR)/amr_dbg-amr.Po \ src/base/$(DEPDIR)/libmesh_devel_la-dof_object.Plo \ src/base/$(DEPDIR)/libmesh_devel_la-libmesh.Plo \ src/base/$(DEPDIR)/libmesh_devel_la-libmesh_common.Plo \ + src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Plo \ src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Plo \ src/base/$(DEPDIR)/libmesh_devel_la-libmesh_version.Plo \ src/base/$(DEPDIR)/libmesh_devel_la-periodic_boundaries.Plo \ @@ -4848,6 +4855,7 @@ am__depfiles_remade = src/apps/$(DEPDIR)/amr_dbg-amr.Po \ src/base/$(DEPDIR)/libmesh_oprof_la-dof_object.Plo \ src/base/$(DEPDIR)/libmesh_oprof_la-libmesh.Plo \ src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_common.Plo \ + src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Plo \ src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Plo \ src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_version.Plo \ src/base/$(DEPDIR)/libmesh_oprof_la-periodic_boundaries.Plo \ @@ -4866,6 +4874,7 @@ am__depfiles_remade = src/apps/$(DEPDIR)/amr_dbg-amr.Po \ src/base/$(DEPDIR)/libmesh_opt_la-dof_object.Plo \ src/base/$(DEPDIR)/libmesh_opt_la-libmesh.Plo \ src/base/$(DEPDIR)/libmesh_opt_la-libmesh_common.Plo \ + src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Plo \ src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Plo \ src/base/$(DEPDIR)/libmesh_opt_la-libmesh_version.Plo \ src/base/$(DEPDIR)/libmesh_opt_la-periodic_boundaries.Plo \ @@ -4884,6 +4893,7 @@ am__depfiles_remade = src/apps/$(DEPDIR)/amr_dbg-amr.Po \ src/base/$(DEPDIR)/libmesh_prof_la-dof_object.Plo \ src/base/$(DEPDIR)/libmesh_prof_la-libmesh.Plo \ src/base/$(DEPDIR)/libmesh_prof_la-libmesh_common.Plo \ + src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Plo \ src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Plo \ src/base/$(DEPDIR)/libmesh_prof_la-libmesh_version.Plo \ src/base/$(DEPDIR)/libmesh_prof_la-periodic_boundaries.Plo \ @@ -7857,6 +7867,7 @@ libmesh_SOURCES = \ src/base/dof_object.C \ src/base/libmesh.C \ src/base/libmesh_common.C \ + src/base/libmesh_exceptions.C \ src/base/libmesh_singleton.C \ src/base/libmesh_version.C \ src/base/periodic_boundaries.C \ @@ -8813,6 +8824,8 @@ src/base/libmesh_dbg_la-libmesh.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_dbg_la-libmesh_common.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) +src/base/libmesh_dbg_la-libmesh_exceptions.lo: \ + src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_dbg_la-libmesh_singleton.lo: \ src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_dbg_la-libmesh_version.lo: src/base/$(am__dirstamp) \ @@ -10072,6 +10085,8 @@ src/base/libmesh_devel_la-libmesh.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_devel_la-libmesh_common.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) +src/base/libmesh_devel_la-libmesh_exceptions.lo: \ + src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_devel_la-libmesh_singleton.lo: \ src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_devel_la-libmesh_version.lo: \ @@ -11244,6 +11259,8 @@ src/base/libmesh_oprof_la-libmesh.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_oprof_la-libmesh_common.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) +src/base/libmesh_oprof_la-libmesh_exceptions.lo: \ + src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_oprof_la-libmesh_singleton.lo: \ src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_oprof_la-libmesh_version.lo: \ @@ -12416,6 +12433,8 @@ src/base/libmesh_opt_la-libmesh.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_opt_la-libmesh_common.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) +src/base/libmesh_opt_la-libmesh_exceptions.lo: \ + src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_opt_la-libmesh_singleton.lo: \ src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_opt_la-libmesh_version.lo: src/base/$(am__dirstamp) \ @@ -13585,6 +13604,8 @@ src/base/libmesh_prof_la-libmesh.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_prof_la-libmesh_common.lo: src/base/$(am__dirstamp) \ src/base/$(DEPDIR)/$(am__dirstamp) +src/base/libmesh_prof_la-libmesh_exceptions.lo: \ + src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_prof_la-libmesh_singleton.lo: \ src/base/$(am__dirstamp) src/base/$(DEPDIR)/$(am__dirstamp) src/base/libmesh_prof_la-libmesh_version.lo: src/base/$(am__dirstamp) \ @@ -15307,6 +15328,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-dof_object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-libmesh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_common.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_version.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_dbg_la-periodic_boundaries.Plo@am__quote@ # am--include-marker @@ -15325,6 +15347,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-dof_object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-libmesh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-libmesh_common.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-libmesh_version.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_devel_la-periodic_boundaries.Plo@am__quote@ # am--include-marker @@ -15343,6 +15366,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-dof_object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-libmesh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_common.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_version.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_oprof_la-periodic_boundaries.Plo@am__quote@ # am--include-marker @@ -15361,6 +15385,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-dof_object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-libmesh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-libmesh_common.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-libmesh_version.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_opt_la-periodic_boundaries.Plo@am__quote@ # am--include-marker @@ -15379,6 +15404,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-dof_object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-libmesh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-libmesh_common.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-libmesh_version.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/base/$(DEPDIR)/libmesh_prof_la-periodic_boundaries.Plo@am__quote@ # am--include-marker @@ -17755,6 +17781,13 @@ src/base/libmesh_dbg_la-libmesh_common.lo: src/base/libmesh_common.C @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_dbg_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_dbg_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_dbg_la-libmesh_common.lo `test -f 'src/base/libmesh_common.C' || echo '$(srcdir)/'`src/base/libmesh_common.C +src/base/libmesh_dbg_la-libmesh_exceptions.lo: src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_dbg_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_dbg_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_dbg_la-libmesh_exceptions.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Tpo -c -o src/base/libmesh_dbg_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Tpo src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/base/libmesh_exceptions.C' object='src/base/libmesh_dbg_la-libmesh_exceptions.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_dbg_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_dbg_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_dbg_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C + src/base/libmesh_dbg_la-libmesh_singleton.lo: src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_dbg_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_dbg_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_dbg_la-libmesh_singleton.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Tpo -c -o src/base/libmesh_dbg_la-libmesh_singleton.lo `test -f 'src/base/libmesh_singleton.C' || echo '$(srcdir)/'`src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Tpo src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Plo @@ -21080,6 +21113,13 @@ src/base/libmesh_devel_la-libmesh_common.lo: src/base/libmesh_common.C @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_devel_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_devel_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_devel_la-libmesh_common.lo `test -f 'src/base/libmesh_common.C' || echo '$(srcdir)/'`src/base/libmesh_common.C +src/base/libmesh_devel_la-libmesh_exceptions.lo: src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_devel_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_devel_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_devel_la-libmesh_exceptions.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Tpo -c -o src/base/libmesh_devel_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Tpo src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/base/libmesh_exceptions.C' object='src/base/libmesh_devel_la-libmesh_exceptions.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_devel_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_devel_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_devel_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C + src/base/libmesh_devel_la-libmesh_singleton.lo: src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_devel_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_devel_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_devel_la-libmesh_singleton.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Tpo -c -o src/base/libmesh_devel_la-libmesh_singleton.lo `test -f 'src/base/libmesh_singleton.C' || echo '$(srcdir)/'`src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Tpo src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Plo @@ -24405,6 +24445,13 @@ src/base/libmesh_oprof_la-libmesh_common.lo: src/base/libmesh_common.C @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_oprof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_oprof_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_oprof_la-libmesh_common.lo `test -f 'src/base/libmesh_common.C' || echo '$(srcdir)/'`src/base/libmesh_common.C +src/base/libmesh_oprof_la-libmesh_exceptions.lo: src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_oprof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_oprof_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_oprof_la-libmesh_exceptions.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Tpo -c -o src/base/libmesh_oprof_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Tpo src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/base/libmesh_exceptions.C' object='src/base/libmesh_oprof_la-libmesh_exceptions.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_oprof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_oprof_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_oprof_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C + src/base/libmesh_oprof_la-libmesh_singleton.lo: src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_oprof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_oprof_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_oprof_la-libmesh_singleton.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Tpo -c -o src/base/libmesh_oprof_la-libmesh_singleton.lo `test -f 'src/base/libmesh_singleton.C' || echo '$(srcdir)/'`src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Tpo src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Plo @@ -27730,6 +27777,13 @@ src/base/libmesh_opt_la-libmesh_common.lo: src/base/libmesh_common.C @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_opt_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_opt_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_opt_la-libmesh_common.lo `test -f 'src/base/libmesh_common.C' || echo '$(srcdir)/'`src/base/libmesh_common.C +src/base/libmesh_opt_la-libmesh_exceptions.lo: src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_opt_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_opt_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_opt_la-libmesh_exceptions.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Tpo -c -o src/base/libmesh_opt_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Tpo src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/base/libmesh_exceptions.C' object='src/base/libmesh_opt_la-libmesh_exceptions.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_opt_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_opt_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_opt_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C + src/base/libmesh_opt_la-libmesh_singleton.lo: src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_opt_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_opt_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_opt_la-libmesh_singleton.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Tpo -c -o src/base/libmesh_opt_la-libmesh_singleton.lo `test -f 'src/base/libmesh_singleton.C' || echo '$(srcdir)/'`src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Tpo src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Plo @@ -31055,6 +31109,13 @@ src/base/libmesh_prof_la-libmesh_common.lo: src/base/libmesh_common.C @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_prof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_prof_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_prof_la-libmesh_common.lo `test -f 'src/base/libmesh_common.C' || echo '$(srcdir)/'`src/base/libmesh_common.C +src/base/libmesh_prof_la-libmesh_exceptions.lo: src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_prof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_prof_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_prof_la-libmesh_exceptions.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Tpo -c -o src/base/libmesh_prof_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Tpo src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/base/libmesh_exceptions.C' object='src/base/libmesh_prof_la-libmesh_exceptions.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_prof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_prof_la_CXXFLAGS) $(CXXFLAGS) -c -o src/base/libmesh_prof_la-libmesh_exceptions.lo `test -f 'src/base/libmesh_exceptions.C' || echo '$(srcdir)/'`src/base/libmesh_exceptions.C + src/base/libmesh_prof_la-libmesh_singleton.lo: src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmesh_prof_la_CPPFLAGS) $(CPPFLAGS) $(libmesh_prof_la_CXXFLAGS) $(CXXFLAGS) -MT src/base/libmesh_prof_la-libmesh_singleton.lo -MD -MP -MF src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Tpo -c -o src/base/libmesh_prof_la-libmesh_singleton.lo `test -f 'src/base/libmesh_singleton.C' || echo '$(srcdir)/'`src/base/libmesh_singleton.C @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Tpo src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Plo @@ -35722,6 +35783,7 @@ distclean: distclean-recursive -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-periodic_boundaries.Plo @@ -35740,6 +35802,7 @@ distclean: distclean-recursive -rm -f src/base/$(DEPDIR)/libmesh_devel_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-periodic_boundaries.Plo @@ -35758,6 +35821,7 @@ distclean: distclean-recursive -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-periodic_boundaries.Plo @@ -35776,6 +35840,7 @@ distclean: distclean-recursive -rm -f src/base/$(DEPDIR)/libmesh_opt_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-periodic_boundaries.Plo @@ -35794,6 +35859,7 @@ distclean: distclean-recursive -rm -f src/base/$(DEPDIR)/libmesh_prof_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-periodic_boundaries.Plo @@ -38208,6 +38274,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_dbg_la-periodic_boundaries.Plo @@ -38226,6 +38293,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/base/$(DEPDIR)/libmesh_devel_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_devel_la-periodic_boundaries.Plo @@ -38244,6 +38312,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_oprof_la-periodic_boundaries.Plo @@ -38262,6 +38331,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/base/$(DEPDIR)/libmesh_opt_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_opt_la-periodic_boundaries.Plo @@ -38280,6 +38350,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/base/$(DEPDIR)/libmesh_prof_la-dof_object.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_common.Plo + -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_exceptions.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_singleton.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-libmesh_version.Plo -rm -f src/base/$(DEPDIR)/libmesh_prof_la-periodic_boundaries.Plo diff --git a/include/Makefile.in b/include/Makefile.in index 3a50d8cc204..68bdb28a4b7 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -632,6 +632,7 @@ include_HEADERS = \ base/getpot.h \ base/id_types.h \ base/libmesh.h \ + base/libmesh_abort.h \ base/libmesh_base.h \ base/libmesh_common.h \ base/libmesh_documentation.h \ diff --git a/include/libmesh/Makefile.in b/include/libmesh/Makefile.in index 5e38a3fd137..7777d7f6798 100644 --- a/include/libmesh/Makefile.in +++ b/include/libmesh/Makefile.in @@ -528,11 +528,11 @@ vtkversion = @vtkversion@ EXTRA_DIST = rebuild_makefile.sh BUILT_SOURCES = dirichlet_boundaries.h dof_map.h dof_map_base.h \ dof_object.h factory.h float128_shims.h getpot.h id_types.h \ - libmesh.h libmesh_augment_std_namespace.h libmesh_base.h \ - libmesh_common.h libmesh_documentation.h libmesh_exceptions.h \ - libmesh_logging.h libmesh_singleton.h libmesh_version.h \ - multi_predicates.h periodic_boundaries.h periodic_boundary.h \ - periodic_boundary_base.h print_trace.h \ + libmesh.h libmesh_abort.h libmesh_augment_std_namespace.h \ + libmesh_base.h libmesh_common.h libmesh_documentation.h \ + libmesh_exceptions.h libmesh_logging.h libmesh_singleton.h \ + libmesh_version.h multi_predicates.h periodic_boundaries.h \ + periodic_boundary.h periodic_boundary_base.h print_trace.h \ reference_counted_object.h reference_counter.h \ single_predicates.h sparsity_pattern.h variable.h \ variant_filter_iterator.h enum_convergence_flags.h \ @@ -979,6 +979,9 @@ id_types.h: $(top_srcdir)/include/base/id_types.h libmesh.h: $(top_srcdir)/include/base/libmesh.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +libmesh_abort.h: $(top_srcdir)/include/base/libmesh_abort.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + libmesh_augment_std_namespace.h: $(top_srcdir)/include/base/libmesh_augment_std_namespace.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ From 344fecdde077132e235871aec27a0c6e4d1e1aaa Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 15:32:10 -0600 Subject: [PATCH 07/11] Move more exceptions stuff to libmesh_exceptions.C --- include/base/libmesh.h | 9 ++++ src/base/libmesh.C | 89 +++-------------------------------- src/base/libmesh_exceptions.C | 16 +++---- 3 files changed, 21 insertions(+), 93 deletions(-) diff --git a/include/base/libmesh.h b/include/base/libmesh.h index bfb7adcb390..e726439a591 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -65,6 +65,7 @@ namespace Parallel { class Communicator; } +class PerfLog; enum SolverPackage : int; /** @@ -147,6 +148,14 @@ class LibMeshInit // protected and forces us to use a named destructor manually vtkMPIController * _vtk_mpi_controller; #endif + +#ifdef LIBMESH_ENABLE_EXCEPTIONS + static std::terminate_handler _old_terminate_handler; +#endif + + static PerfLog & perf_log(); + + friend void libmesh_terminate_handler(); }; /** diff --git a/src/base/libmesh.C b/src/base/libmesh.C index 715a8d598f5..1c1c6566b1d 100644 --- a/src/base/libmesh.C +++ b/src/base/libmesh.C @@ -50,16 +50,6 @@ #endif #include "stdlib.h" // C, not C++ - we need setenv() from POSIX -#include "signal.h" - - -// floating-point exceptions -#ifdef LIBMESH_HAVE_FENV_H -# include -#endif -#ifdef LIBMESH_HAVE_XMMINTRIN_H -# include -#endif #if defined(LIBMESH_HAVE_MPI) @@ -170,6 +160,8 @@ MPI_Comm GLOBAL_COMM_WORLD = MPI_COMM_NULL; int GLOBAL_COMM_WORLD = 0; #endif +std::terminate_handler LibMeshInit::_old_terminate_handler; + OStreamProxy out(std::cout); OStreamProxy err(std::cerr); @@ -681,7 +673,7 @@ LibMeshInit::LibMeshInit (int argc, const char * const * argv, #ifdef LIBMESH_ENABLE_EXCEPTIONS // Set our terminate handler to write stack traces in the event of a // crash - old_terminate_handler = std::set_terminate(libmesh_terminate_handler); + _old_terminate_handler = std::set_terminate(libmesh_terminate_handler); #endif @@ -795,7 +787,7 @@ LibMeshInit::~LibMeshInit() #ifdef LIBMESH_ENABLE_EXCEPTIONS // Reset the old terminate handler; maybe the user code wants to // keep doing C++ stuff after closing libMesh stuff. - std::set_terminate(old_terminate_handler); + std::set_terminate(_old_terminate_handler); #endif #ifdef LIBMESH_HAVE_NETGEN @@ -864,78 +856,9 @@ LibMeshInit::~LibMeshInit() } - -/** - * Toggle floating point exceptions -- courtesy of Cody Permann & MOOSE team - */ -void enableFPE(bool on) +PerfLog & LibMeshInit::perf_log() { -#if !defined(LIBMESH_HAVE_FEENABLEEXCEPT) && defined(LIBMESH_HAVE_XMMINTRIN_H) - static int flags = 0; -#endif - - if (on) - { -#ifdef LIBMESH_HAVE_FEENABLEEXCEPT - feenableexcept(FE_DIVBYZERO | FE_INVALID); -#elif LIBMESH_HAVE_XMMINTRIN_H - flags = _MM_GET_EXCEPTION_MASK(); // store the flags - _MM_SET_EXCEPTION_MASK(flags & ~_MM_MASK_INVALID); -#endif - -#if LIBMESH_HAVE_DECL_SIGACTION - struct sigaction new_action, old_action; - - // Set up the structure to specify the new action. - new_action.sa_sigaction = libmesh_handleFPE; - sigemptyset (&new_action.sa_mask); - new_action.sa_flags = SA_SIGINFO; - - sigaction (SIGFPE, nullptr, &old_action); - if (old_action.sa_handler != SIG_IGN) - sigaction (SIGFPE, &new_action, nullptr); -#endif - } - else - { -#ifdef LIBMESH_HAVE_FEDISABLEEXCEPT - fedisableexcept(FE_DIVBYZERO | FE_INVALID); -#elif LIBMESH_HAVE_XMMINTRIN_H - _MM_SET_EXCEPTION_MASK(flags); -#endif - signal(SIGFPE, SIG_DFL); - } -} - - -// Enable handling of SIGSEGV by libMesh -// (potentially instead of PETSc) -void enableSEGV(bool on) -{ -#if LIBMESH_HAVE_DECL_SIGACTION - static struct sigaction old_action; - static bool was_on = false; - - if (on) - { - struct sigaction new_action; - was_on = true; - - // Set up the structure to specify the new action. - new_action.sa_sigaction = libmesh_handleSEGV; - sigemptyset (&new_action.sa_mask); - new_action.sa_flags = SA_SIGINFO; - - sigaction (SIGSEGV, &new_action, &old_action); - } - else if (was_on) - { - was_on = false; - sigaction (SIGSEGV, &old_action, nullptr); - } -#else - libmesh_error_msg("System call sigaction not supported."); -#endif + return libMesh::perflog; } diff --git a/src/base/libmesh_exceptions.C b/src/base/libmesh_exceptions.C index 8d1ea16411e..7c13e77b98b 100644 --- a/src/base/libmesh_exceptions.C +++ b/src/base/libmesh_exceptions.C @@ -19,10 +19,11 @@ // Local includes #include "libmesh/libmesh_exceptions.h" +// libMesh includes +#include "libmesh/perf_log.h" + // C/C++ includes #include -#include -#include #ifdef LIBMESH_ENABLE_EXCEPTIONS #include @@ -33,7 +34,6 @@ #include #endif -#include "stdlib.h" // C, not C++ - we need setenv() from POSIX #include "signal.h" @@ -148,10 +148,6 @@ namespace libMesh // ------------------------------------------------------------ // libMesh functions -#ifdef LIBMESH_ENABLE_EXCEPTIONS -std::terminate_handler old_terminate_handler; -#endif - void libmesh_terminate_handler() { bool quiet = false; @@ -190,7 +186,7 @@ void libmesh_terminate_handler() if (exception_message) libMesh::err << ":\n" << *exception_message; #endif - libmesh::err << std::endl; + libMesh::err << std::endl; // If this got called then we're probably crashing; let's print a // stack trace. The trace files that are ultimately written depend on: @@ -221,13 +217,13 @@ void libmesh_terminate_handler() // We may care about performance data pre-crash; it would be sad to // throw that away. - libMesh::perflog.print_log(); + LibMeshInit::perf_log().print_log(); } #ifdef LIBMESH_ENABLE_EXCEPTIONS // The system terminate_handler may do useful things, or the user // may have set their own terminate handler that we want to call. - old_terminate_handler(); + LibMeshInit::_old_terminate_handler(); #endif libmesh_abort(); From abfc985d8c03c671d6bd3621eaaafe7601f02185 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 16:43:47 -0600 Subject: [PATCH 08/11] Move _old_terminate_handler() to libmesh_abort() This was a regression from the terminate_handler/abort refactoring; we don't want to hit the previous terminate handler before trying to MPI_Abort if applicable, because then we'll never get to the "better" parallel abort. --- include/base/libmesh.h | 1 + src/base/libmesh.C | 6 ++++++ src/base/libmesh_exceptions.C | 6 ------ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/base/libmesh.h b/include/base/libmesh.h index e726439a591..a1202b815ad 100644 --- a/include/base/libmesh.h +++ b/include/base/libmesh.h @@ -155,6 +155,7 @@ class LibMeshInit static PerfLog & perf_log(); + friend void libmesh_abort(); friend void libmesh_terminate_handler(); }; diff --git a/src/base/libmesh.C b/src/base/libmesh.C index 1c1c6566b1d..1cdc21a2ca0 100644 --- a/src/base/libmesh.C +++ b/src/base/libmesh.C @@ -339,6 +339,12 @@ void libmesh_abort() MPI_Abort(libMesh::GLOBAL_COMM_WORLD, 1); #endif +#ifdef LIBMESH_ENABLE_EXCEPTIONS + // The system terminate_handler may do useful things, or the user + // may have set their own terminate handler that we want to call. + LibMeshInit::_old_terminate_handler(); +#endif + // The last attempt to die if nothing else has killed us std::abort(); } diff --git a/src/base/libmesh_exceptions.C b/src/base/libmesh_exceptions.C index 7c13e77b98b..2c7cac92ff0 100644 --- a/src/base/libmesh_exceptions.C +++ b/src/base/libmesh_exceptions.C @@ -220,12 +220,6 @@ void libmesh_terminate_handler() LibMeshInit::perf_log().print_log(); } -#ifdef LIBMESH_ENABLE_EXCEPTIONS - // The system terminate_handler may do useful things, or the user - // may have set their own terminate handler that we want to call. - LibMeshInit::_old_terminate_handler(); -#endif - libmesh_abort(); } From 33305a2cc44e8e1ea777f12ebbc90bb6c57efc81 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 16:57:01 -0600 Subject: [PATCH 09/11] Add back the catch(...) block --- src/base/libmesh_exceptions.C | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/base/libmesh_exceptions.C b/src/base/libmesh_exceptions.C index 2c7cac92ff0..7cd554b8fc4 100644 --- a/src/base/libmesh_exceptions.C +++ b/src/base/libmesh_exceptions.C @@ -176,6 +176,11 @@ void libmesh_terminate_handler() { quiet = true; } + // We're just trying to detect exception types here, not + // actually rethrow + catch (...) + { + } } #endif From 79ceaf22e39b4254aa0efba273ab42b3923bd799 Mon Sep 17 00:00:00 2001 From: Logan Harbour Date: Tue, 27 Jan 2026 16:52:32 -0700 Subject: [PATCH 10/11] Add missing includes --- src/base/libmesh_exceptions.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/libmesh_exceptions.C b/src/base/libmesh_exceptions.C index 7cd554b8fc4..2dc9297399c 100644 --- a/src/base/libmesh_exceptions.C +++ b/src/base/libmesh_exceptions.C @@ -20,7 +20,9 @@ #include "libmesh/libmesh_exceptions.h" // libMesh includes +#include "libmesh/libmesh.h" #include "libmesh/perf_log.h" +#include "libmesh/print_trace.h" // C/C++ includes #include From 4b38f155977bf89a85994274a5acdf48c83e51c8 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 27 Jan 2026 17:56:41 -0600 Subject: [PATCH 11/11] Remove unneeded headers These got swept up in the fork from libmesh.C --- src/base/libmesh_exceptions.C | 49 ----------------------------------- 1 file changed, 49 deletions(-) diff --git a/src/base/libmesh_exceptions.C b/src/base/libmesh_exceptions.C index 2dc9297399c..83b45407546 100644 --- a/src/base/libmesh_exceptions.C +++ b/src/base/libmesh_exceptions.C @@ -25,20 +25,13 @@ #include "libmesh/print_trace.h" // C/C++ includes -#include - #ifdef LIBMESH_ENABLE_EXCEPTIONS #include #include #endif -#ifdef LIBMESH_HAVE_OPENMP -#include -#endif - #include "signal.h" - // floating-point exceptions #ifdef LIBMESH_HAVE_FENV_H # include @@ -47,48 +40,6 @@ # include #endif - -#if defined(LIBMESH_HAVE_MPI) -# include "libmesh/ignore_warnings.h" -# include -# include "libmesh/restore_warnings.h" -#endif // #if defined(LIBMESH_HAVE_MPI) - -#if defined(LIBMESH_HAVE_PETSC) -# include "libmesh/petsc_solver_exception.h" -# include -# include -# include "libmesh/petscdmlibmesh.h" -# if defined(LIBMESH_HAVE_SLEPC) -// Ignore unused variable warnings from SLEPc -# include "libmesh/ignore_warnings.h" -# include "libmesh/slepc_macro.h" -# include -# include "libmesh/restore_warnings.h" -# endif // #if defined(LIBMESH_HAVE_SLEPC) -#endif // #if defined(LIBMESH_HAVE_PETSC) - -#ifdef LIBMESH_HAVE_NETGEN -// We need the nglib namespace, because it's used everywhere in nglib -// and we don't get binary compatibility without it. -// -// We need the nglib namespace *here*, because somehow nobody ever -// figured out to just put it in nglib.h? -namespace nglib { -#include "netgen/nglib/nglib.h" -} -#endif - -// If we're using MPI and VTK has been detected, we need to do some -// MPI initialize/finalize stuff for VTK. -#if defined(LIBMESH_HAVE_MPI) && defined(LIBMESH_HAVE_VTK) -#include "libmesh/ignore_warnings.h" -# include "vtkMPIController.h" -#include "libmesh/restore_warnings.h" -#endif - -#include - // -------------------------------------------------------- // Local anonymous namespace to hold miscellaneous bits namespace {