SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_error_handler.h
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2019 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 #ifndef SION_SION_ERROR_HANDLER_H
10 #define SION_SION_ERROR_HANDLER_H
11 
12 #include <stdarg.h>
13 
14 #include "sion_const.h"
15 
16  /* Error types */
17 #define _SION_ERROR_RETURN -10001
18 #define _SION_ERROR_ABORT -10002
19 #define _SION_ERROR_WARN -10003
20 #define _SION_ERROR_UNKNOWN -10020
21 
22 
23 #define _SION_ERROR_FLAG_NONE 0
24 #define _SION_ERROR_FLAG_SUPPRESS_MSG 1
25 
26 int _sion_errorprint(int rc, int level, const char *format, ...);
27 int _sion_errorprint_on_rank(int rc, int level, int rank, const char *format, ...);
28 
29 int __sion_errorprint_vargs(int rc, int level, int rank, int thread, const char *format, va_list argp);
30 
31 int _sion_errorprint_set_flag( int flag);
32 
33 char* __sion_error_level_to_str (unsigned int flag);
34 
35 int _sion_error_set_query_thread_num_function( int (*get_thread_num)(void) );
36 
37 #endif