SIONlib
1.7.6
Scalable I/O library for parallel access to task-local files
src
lib
sion_debug.h
Go to the documentation of this file.
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
14
#ifndef SION_SION_DEBUG_H
15
#define SION_SION_DEBUG_H
16
17
#include <stdio.h>
18
19
#define _SION_DEFAULT_RANK -1
20
#ifdef DPRINTF
21
#undef ONLY_DEBUG
22
#undef DPRINTF
23
#undef DPRINTFP
24
#undef DPRINTTS
25
#undef DPRINTFTS2
26
#endif
27
#ifdef SION_DEBUG
28
#define ONLY_DEBUG(A) A
29
#define DPRINTF(A) sion_dprintf A
30
#define DPRINTFP(A) sion_dprintfp A
31
#define DPRINTFTS(rank,desc) sion_dprintfp(128,"TIMING",rank," step=%-40s timestamp=%18.8f\n",desc,_sion_get_time())
32
#define DPRINTFTS2(rank,desc) sion_dprintfp(256,"TIMING",rank," step=%-40s timestamp=%18.8f\n",desc,_sion_get_time())
33
#else
34
#define ONLY_DEBUG(A)
35
#define DPRINTF(A)
36
#define DPRINTFP(A)
37
#define DPRINTFTS(A,B)
38
#define DPRINTFTS2(A,B)
39
#endif
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
45
int
_sion_debug_init
(
void
);
46
int
sion_dprintf
(
int
mask,
const
char
*format, ...);
47
int
sion_dprintfp
(
int
mask,
const
char
*callfunction,
int
rank,
const
char
*format, ...);
48
int
sion_isdebug(
void
);
49
void
sion_debug_on
(
int
mask,
const
char
*filename);
50
void
sion_debug_off(
void
);
51
FILE *
sion_get_dfile
(
void
);
52
void
sion_dclose
(
void
);
53
54
void
_sion_debug_set_lock_cb(
void
(*set_lock)(
void
),
void
(*unset_lock)(
void
));
55
56
int
_sion_debug_set_query_thread_num_function(
int
(*get_thread_num)(
void
) );
57
58
#ifdef __cplusplus
59
}
60
#endif
61
62
#endif
sion_debug_on
void sion_debug_on(int mask, const char *filename)
sets debug mode.
Definition:
sion_debug.c:314
sion_get_dfile
FILE * sion_get_dfile(void)
Definition:
sion_debug.c:276
sion_dprintf
int sion_dprintf(int mask, const char *format,...)
Print debugging info formating the message like printf.
Definition:
sion_debug.c:178
sion_dprintfp
int sion_dprintfp(int mask, const char *callfunction, int rank, const char *format,...)
Print debugging info formating the message like printf and including the name of the calling function...
Definition:
sion_debug.c:204
_sion_debug_init
int _sion_debug_init(void)
initialize the debug environment
Definition:
sion_debug.c:370
sion_dclose
void sion_dclose(void)
Definition:
sion_debug.c:288
Generated by
1.8.16