Go to the documentation of this file.
20 #include "libmesh/libmesh.h"
21 #include "libmesh/libmesh_common.h"
22 #include "libmesh/print_trace.h"
25 #ifdef LIBMESH_HAVE_SYS_TYPES_H
26 #include <sys/types.h>
28 #ifdef LIBMESH_HAVE_UNISTD_H
32 #ifdef LIBMESH_HAVE_CSIGNAL
39 namespace MacroFunctions
41 void here(
const char * file,
int line,
const char * date,
const char * time)
46 <<
", compiled " << date
53 void stop(
const char * file,
int line,
const char * date,
const char * time)
58 #if defined(LIBMESH_HAVE_CSIGNAL) && defined(SIGSTOP)
59 libMesh::out <<
"Stopping process " << getpid() <<
"..." << std::endl;
61 libMesh::out <<
"Continuing process " << getpid() <<
"..." << std::endl;
63 libMesh::out <<
"WARNING: libmesh_stop() does not work; no operating system support." << std::endl;
69 void report_error(
const char * file,
int line,
const char * date,
const char * time)
73 static bool reporting_error =
false;
78 libMesh::err <<
"libMesh encountered an error while attempting to report_error." << std::endl;
81 reporting_error =
true;
90 reporting_error =
false;
processor_id_type global_n_processors()
The libMesh namespace provides an interface to certain functionality in the library.
void write_traceout()
Writes a stack trace to a uniquely named file if –enable-tracefiles has been set by configure,...
void stop(const char *file, int line, const char *date, const char *time)
void here(const char *file, int line, const char *date, const char *time)
void print_trace(std::ostream &out_stream=std::cerr)
Print a stack trace (for code compiled with gcc)
void report_error(const char *file, int line, const char *date, const char *time)
bool on_command_line(std::string arg)
processor_id_type global_processor_id()