PULSAR  1.0.0
Parallel Ultra Light Systolic Array Runtime
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
prt_assert.c
Go to the documentation of this file.
1 
11 #include "prt_assert.h"
12 
14 
23 void prt_assert_line_file(int cond, char *msg, int line, char *file)
24 {
25  if (!cond)
26  prt_error_line_file(msg, line, file);
27 }
28 
30 
37 void prt_error_line_file(char *msg, int line, char *file)
38 {
39  fprintf(stderr, "\nPRT ERROR: %s (in %s at line %d)\n\n", msg, file, line);
40  fflush(stderr);
41  MPI_Abort(MPI_COMM_WORLD, 0);
42 }
43 
45 
52 void prt_warning_line_file(char *msg, int line, char *file)
53 {
54  fprintf(stderr, "\nPRT WARNING: %s (in %s at line %d)\n\n", msg, file, line);
55  fflush(stderr);
56 }
void prt_assert_line_file(int cond, char *msg, int line, char *file)
Check an assertion and exit on error. Print an error message.
Definition: prt_assert.c:23
void prt_warning_line_file(char *msg, int line, char *file)
Print a warning and continue.
Definition: prt_assert.c:52
PRT exception handling.
void prt_error_line_file(char *msg, int line, char *file)
Print an error message and exit.
Definition: prt_assert.c:37