Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
H5hut
src
Commits
2da69d10
Commit
2da69d10
authored
Sep 04, 2018
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error in logging/debug output fixed, see issue
#13
parent
15317a9b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
32 deletions
+65
-32
src/h5core/h5_err.c
src/h5core/h5_err.c
+3
-1
src/h5core/h5_log.c
src/h5core/h5_log.c
+21
-8
src/h5core/h5t_io.c
src/h5core/h5t_io.c
+6
-6
src/h5core/private/h5_log.h
src/h5core/private/h5_log.h
+3
-3
src/h5core/private/h5t_core_trim.c
src/h5core/private/h5t_core_trim.c
+1
-1
src/h5core/private/h5t_store_trim.c
src/h5core/private/h5t_store_trim.c
+1
-1
src/include/H5_log.h
src/include/H5_log.h
+6
-6
src/include/h5core/h5_log.h
src/include/h5core/h5_log.h
+24
-6
No files found.
src/h5core/h5_err.c
View file @
2da69d10
...
...
@@ -9,7 +9,9 @@
#include "h5core/h5_log.h"
#include "h5core/h5_err.h"
#include "private/h5_init.h"
extern
int
h5_myproc
;
#include <stdlib.h>
...
...
src/h5core/h5_log.c
View file @
2da69d10
...
...
@@ -9,9 +9,13 @@
#include "h5core/h5_log.h"
#include "h5core/h5_err.h"
#include "private/h5_init.h"
h5_int32_t
h5_log_level
=
H5_VERBOSE_ERROR
;
extern
int
h5_myproc
;
h5_int64_t
h5_log_level
=
H5_VERBOSE_ERROR
;
h5_int64_t
h5_debug_mask
=
0
;
struct
call_stack
h5_call_stack
;
char
*
h5_rfmts
[]
=
{
...
...
@@ -20,7 +24,10 @@ char *h5_rfmts[] = {
[
e_char_p
]
=
"%s"
,
[
e_void_p
]
=
"%p"
,
[
e_h5_err_t
]
=
"%lld"
,
[
e_h5_int32_t
]
=
"%ld"
,
[
e_h5_uint32_t
]
=
"%lu"
,
[
e_h5_int64_t
]
=
"%lld"
,
[
e_h5_uint64_t
]
=
"%llu"
,
[
e_h5_id_t
]
=
"%lld"
,
[
e_h5_ssize_t
]
=
"%lld"
,
[
e_h5_errorhandler_t
]
=
"%p"
,
...
...
@@ -56,12 +63,18 @@ char *h5_rfmts[] = {
*/
h5_err_t
h5_set_loglevel
(
const
h5_i
d_t
level
/*!< debu
g level */
const
h5_i
nt64_t
level
/*!< lo
g level */
)
{
if
(
level
<
0
)
h5_log_level
=
((
1
<<
20
)
-
1
)
&
~
0x7
;
else
h5_log_level
=
level
;
h5_log_level
=
level
&
0x7
;
return
H5_SUCCESS
;
}
h5_err_t
h5_set_debug_mask
(
const
h5_int64_t
mask
/*!< debug level */
)
{
h5_log_level
=
H5_VERBOSE_DEBUG
;
h5_debug_mask
=
mask
;
return
H5_SUCCESS
;
}
...
...
@@ -72,7 +85,7 @@ h5_set_loglevel (
\return current debug level
*/
h5_
err
_t
h5_
int64
_t
h5_get_loglevel
(
void
)
{
...
...
src/h5core/h5t_io.c
View file @
2da69d10
...
...
@@ -2002,7 +2002,7 @@ distribute_octree_parmetis (
TRY
(
vtxdist
=
h5_calloc
(
m
->
f
->
nprocs
+
1
,
sizeof
(
*
vtxdist
)));
vtxdist
[
0
]
=
0
;
#if !defined(NDEBUG)
if
(
h5_
log_level
&
(
1
<<
5
)
)
{
if
(
h5_
debug_mask
&
(
1
<<
5
)
)
{
h5_debug
(
"vtxdist[%d]: %d"
,
0
,
0
);
}
#endif
...
...
@@ -2014,7 +2014,7 @@ distribute_octree_parmetis (
vtxdist
[
i
]
=
vtxdist
[
i
-
1
]
+
n
;
}
#if !defined(NDEBUG)
if
(
h5_
log_level
&
(
1
<<
5
)
)
{
if
(
h5_
debug_mask
&
(
1
<<
5
)
)
{
h5_debug
(
"vtxdist[%d]: %d"
,
i
,
vtxdist
[
i
]);
}
#endif
...
...
@@ -2060,7 +2060,7 @@ distribute_octree_parmetis (
}
xadj
[
i
+
1
]
=
xadj
[
i
]
+
num_neigh
;
#if !defined(NDEBUG)
if
(
h5_
log_level
&
(
1
<<
5
)
)
{
if
(
h5_
debug_mask
&
(
1
<<
5
)
)
{
h5_debug
(
"xadj[%d]: %d"
,
i
+
1
,
xadj
[
i
+
1
]);
}
#endif
...
...
@@ -2070,7 +2070,7 @@ distribute_octree_parmetis (
if
(
new_numbering
[
j
]
==
neighbors
[
k
])
{
adjncy
[
counter
]
=
j
;
#if !defined(NDEBUG)
if
(
h5_
log_level
&
(
1
<<
5
)
)
{
if
(
h5_
debug_mask
&
(
1
<<
5
)
)
{
h5_debug
(
"adjncy[%d]: %d"
,
counter
,
adjncy
[
counter
]);
}
#endif
...
...
@@ -2139,7 +2139,7 @@ distribute_octree_parmetis (
TRY
(
h5_free
(
ubvec
));
#if !defined(NDEBUG)
if
(
h5_
log_level
&
(
1
<<
5
)
)
{
if
(
h5_
debug_mask
&
(
1
<<
5
)
)
{
for
(
i
=
0
;
i
<
num_interior_oct
;
i
++
)
{
h5_debug
(
"part[%d]: %llu"
,
i
,
(
unsigned
long
long
)
part
[
i
]);
}
...
...
@@ -2498,7 +2498,7 @@ read_chunked_elements (
#if NDEBUG == 0
if
(
h5_
log_level
&
(
1
<<
6
)
)
{
if
(
h5_
debug_mask
&
(
1
<<
6
)
)
{
sleep
(
m
->
f
->
myproc
*
2
);
for
(
int
i
=
0
;
i
<
num_interior_elems
;
i
++
)
{
h5_debug
(
"
\n
"
...
...
src/h5core/private/h5_log.h
View file @
2da69d10
...
...
@@ -23,8 +23,8 @@
#define __FUNC_ENTER(type, mask, fmt, ...) \
type ret_value = (type)H5_ERR; \
int __log__ = h5_
log_level
& mask; \
if (__log__
) { \
int __log__ = h5_
debug_mask
& mask; \
if (__log__) { \
h5_call_stack_push (__func__,e_##type); \
h5_debug ("(" fmt ")", __VA_ARGS__); \
}
...
...
@@ -33,7 +33,7 @@
#define H5_CORE_API_ENTER(type, fmt, ...) \
if (!h5_initialized) { \
h5
priv
_initialize(); \
h5_initialize(); \
} \
__FUNC_ENTER(type, H5_DEBUG_CORE_API, fmt, __VA_ARGS__)
...
...
src/h5core/private/h5t_core_trim.c
View file @
2da69d10
...
...
@@ -219,7 +219,7 @@ update_internal_structs (
// create index sets
#if (!defined(NDEBUG) && (h5_
log_level
& (1<<5)))
#if (!defined(NDEBUG) && (h5_
debug_mask
& (1<<5)))
if
(
!
m
->
is_chunked
)
{
h5t_adjacencies_t
*
adj
=
&
m
->
adjacencies
;
h5_loc_idx_t
idx
=
0
;
...
...
src/h5core/private/h5t_store_trim.c
View file @
2da69d10
...
...
@@ -202,7 +202,7 @@ compute_neighbor_of_face (
}
if
(
elem_idx
<
-
1
)
{
// this should only happen if we are on the boarder
// of a loaded chunk and the parent is on a different chunk
if
(
h5_
log_level
>=
6
)
{
if
(
h5_
debug_mask
>=
6
)
{
h5_debug
(
"Elem %d is on different proc than its parent %d
\n
"
"therefore neighborhood idx is not correct resolved"
,
old_elem_idx
,
elem_idx
);
}
...
...
src/include/H5_log.h
View file @
2da69d10
...
...
@@ -50,7 +50,7 @@ extern "C" {
*/
static
inline
h5_err_t
H5SetVerbosityLevel2
(
const
h5_i
d
_t
level
///< [in] verbosity level.
const
h5_i
nt32
_t
level
///< [in] verbosity level.
)
{
return
h5_set_loglevel
(
level
&
0x03
);
}
...
...
@@ -72,7 +72,7 @@ H5SetVerbosityLevel2 (
*/
static
inline
h5_err_t
H5SetVerbosityLevel1
(
const
h5_i
d
_t
level
///< [in] verbosity level.
const
h5_i
nt64
_t
level
///< [in] verbosity level.
)
{
return
h5_set_loglevel
(
level
);
}
...
...
@@ -84,7 +84,7 @@ H5SetVerbosityLevel1 (
\see H5SetVerbosityLevel()
*/
static
inline
h5_i
d
_t
static
inline
h5_i
nt64
_t
H5GetVerbosityLevel
(
void
)
{
...
...
@@ -123,9 +123,9 @@ H5GetVerbosityLevel (
*/
static
inline
h5_err_t
H5SetDebugMask
(
const
h5_i
d
_t
mask
///< [in] debug mask
const
h5_i
nt64
_t
mask
///< [in] debug mask
)
{
return
h5_set_
loglevel
(
mask
&
~
0x03
);
return
h5_set_
debug_mask
(
mask
);
}
/**
...
...
@@ -140,7 +140,7 @@ H5SetDebugMask (
| :------ | :----- |
| \c 1.99.15 | Function introduced in this release. |
*/
static
inline
h5_i
d
_t
static
inline
h5_i
nt32
_t
H5GetDebugMask
(
void
)
{
...
...
src/include/h5core/h5_log.h
View file @
2da69d10
...
...
@@ -22,6 +22,7 @@ extern const char* H5_VER_STRING;
#define H5_VERBOSE_ERROR (1)
#define H5_VERBOSE_WARN (2)
#define H5_VERBOSE_INFO (3)
#define H5_VERBOSE_DEBUG (4)
#define H5_VERBOSE_DEFAULT H5_VERBOSE_ERROR
...
...
@@ -45,7 +46,10 @@ enum h5_rtypes {
e_char_p
,
e_void_p
,
e_h5_err_t
,
e_h5_int32_t
,
e_h5_uint32_t
,
e_h5_int64_t
,
e_h5_uint64_t
,
e_h5_id_t
,
e_h5_ssize_t
,
e_h5_errorhandler_t
,
...
...
@@ -75,9 +79,15 @@ struct call_stack {
struct
call_stack_entry
entry
[
1024
];
};
extern
h5_int32_t
h5_log_level
;
extern
h5_int64_t
h5_log_level
;
extern
h5_int64_t
h5_debug_mask
;
extern
struct
call_stack
h5_call_stack
;
// :FIXME: Should go to another header file
h5_err_t
h5_initialize
(
void
);
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
@@ -182,9 +192,13 @@ __attribute__ ((format (printf, 1, 2)))
h5_err_t
h5_set_loglevel
(
const
h5_i
d
_t
);
const
h5_i
nt64
_t
);
h5_err_t
h5_set_debug_mask
(
const
h5_int64_t
);
h5_int64_t
h5_get_loglevel
(
void
);
...
...
@@ -198,15 +212,19 @@ h5_get_loglevel (
#define H5_API_ENTER(type, fmt, ...) \
type ret_value = (type)H5_ERR;
h5_initialize
();
h5_call_stack_reset
();
\
h5_call_stack_push
(
__func__
,
e_
##
type
);
\
#else // NDEBUG not defined
#define H5_API_ENTER(type, fmt, ...) \
h5_call_stack_reset (); \
type ret_value = (type)H5_ERR; \
int __log__ = h5_log_level & H5_DEBUG_API; \
h5_initialize(); \
h5_call_stack_reset (); \
h5_call_stack_push (__func__,e_##type); \
int __log__ = h5_debug_mask & H5_DEBUG_API; \
if (__log__) { \
h5_call_stack_push (__func__,e_##type); \
h5_debug ("(" fmt ")", __VA_ARGS__); \
}
...
...
@@ -220,7 +238,7 @@ h5_get_loglevel (
}
#define H5_RETURN_ERROR(errno, fmt, ...) { \
ret_value = h5_error (errno,
"(" fmt ")", __VA_ARGS__);
\
ret_value = h5_error (errno,
fmt, __VA_ARGS__);
\
goto done; \
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment