Skip to content

Commit

Permalink
Update sn3d.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Nov 11, 2024
1 parent 177fe35 commit d953813
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sn3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@

#ifdef ENABLE_STACKTRACE
#include <stacktrace>
#define STACKTRACEIFSUPPORTED std::stacktrace::current()
#define STACKTRACEIFSUPPORTED << std::stacktrace::current() << "\n"
#else
#define STACKTRACEIFSUPPORTED ""
#define STACKTRACEIFSUPPORTED << "std::stacktrace not supported\n"
#endif

#ifdef STDPAR_ON
Expand Down Expand Up @@ -136,13 +136,11 @@ __attribute__((__format__(__printf__, 1, 2))) inline auto printout(const char *f
if (!assertpass) [[unlikely]] { \
if (output_file) { \
output_file << "\n[rank " << globals::my_rank << "] " << __FILE__ << ":" << __LINE__ << ": failed assertion `" \
<< #e << "` in function " << __PRETTY_FUNCTION__ << "\n" \
<< STACKTRACEIFSUPPORTED; \
<< #e << "` in function " << __PRETTY_FUNCTION__ << "\n" STACKTRACEIFSUPPORTED; \
output_file.flush(); \
} \
std::cerr << "\n[rank " << globals::my_rank << "] " << __FILE__ << ":" << __LINE__ << ": failed assertion `" \
<< #e << "` in function " << __PRETTY_FUNCTION__ << "\n" \
<< STACKTRACEIFSUPPORTED; \
<< #e << "` in function " << __PRETTY_FUNCTION__ << "\n" STACKTRACEIFSUPPORTED; \
} \
assert(assertpass); \
}
Expand Down

0 comments on commit d953813

Please sign in to comment.