1#ifndef AMREX_BL_BACKTRACE_H_
2#define AMREX_BL_BACKTRACE_H_
3#include <AMReX_Config.H>
9#if !defined(_CRAYC) && !defined(__INTEL_COMPILER) && !defined(__PGI) && !defined(__NVCOMPILER) && !defined(__FUJITSU)
10#define AMREX_BT_STACK_THREADPRIVATE 1
25#define BL_PASTE2(x, y) x##y
26#define BL_PASTE(x, y) BL_PASTE2(x, y)
37#define BL_BACKTRACE_PUSH( S ) \
38 AMREX_WARNING_PUSH_COUNTER \
39 amrex::BLBTer BL_PASTE( bl_bter, __COUNTER__ )( S, __FILE__, __LINE__ ) \
48#define BL_BACKTRACE_POP() amrex::BLBackTrace::bt_stack.pop()
70 static std::stack<std::pair<std::string, std::string> >
bt_stack;
71#ifdef AMREX_BT_STACK_THREADPRIVATE
72#pragma omp threadprivate(bt_stack)
86 BLBTer(
const std::string& s,
const char* file,
int line);
93 std::string line_file;
Compiler- and backend-specific extension macros (e.g., restrict, SIMD, inline).
Definition AMReX_BLBackTrace.H:77
~BLBTer()
Definition AMReX_BLBackTrace.cpp:412
BLBTer & operator=(BLBTer const &)=delete
BLBTer(BLBTer const &)=delete
Definition AMReX_Amr.cpp:50
Definition AMReX_BLBackTrace.H:53
static void handler(int s)
Signal handler that prints and aborts on fatal signals.
Definition AMReX_BLBackTrace.cpp:50
static void print_backtrace_info(FILE *f)
Print backtrace details to f for abort handling.
Definition AMReX_BLBackTrace.cpp:199
static std::stack< std::pair< std::string, std::string > > bt_stack
Definition AMReX_BLBackTrace.H:70