Skip to content

Commit

Permalink
Update sn3d.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Oct 26, 2024
1 parent a11d36e commit db9b51e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sn3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ inline thread_local auto gslworkspace =
#endif

#ifdef __NVCOMPILER_CUDA_ARCH__
#define printout(...) printf(__VA_ARGS__)
#define printoutf(...) printf(__VA_ARGS__)

#define __artis_assert(e) \
{ \
Expand Down Expand Up @@ -193,7 +193,7 @@ inline void atomicadd(T &var, const T &val) {
inline void gsl_error_handler_printout(const char *reason, const char *file, int line, int gsl_errno) {
if (gsl_errno != 18) // roundoff error
{
printout("WARNING: gsl (%s:%d): %s (Error code %d)\n", file, line, reason, gsl_errno);
printoutf("WARNING: gsl (%s:%d): %s (Error code %d)\n", file, line, reason, gsl_errno);
// abort();
}
}
Expand All @@ -207,7 +207,7 @@ inline void gsl_error_handler_printout(const char *reason, const char *file, int

FILE *file = std::fopen(filename.c_str(), mode);
if (file == nullptr) {
printout("ERROR: Could not open file '%s' for mode '%s'.\n", filename.c_str(), mode);
printoutf("ERROR: Could not open file '%s' for mode '%s'.\n", filename.c_str(), mode);
std::abort();
}

Expand All @@ -221,7 +221,7 @@ inline void gsl_error_handler_printout(const char *reason, const char *file, int
}
auto file = std::fstream(filename, mode);
if (!file.is_open()) {
printout("ERROR: Could not open file '%s'\n", filename.c_str());
printoutf("ERROR: Could not open file '%s'\n", filename.c_str());
std::abort();
}
return file;
Expand Down

0 comments on commit db9b51e

Please sign in to comment.