Commit f75ef09c authored by gsell's avatar gsell
Browse files

consolidation of log/debug message interface

parent c831a90a
Pipeline #2 skipped
......@@ -12,7 +12,6 @@ include_HEADERS = \
$(top_srcdir)/src/include/H5Part_io.h \
$(top_srcdir)/src/include/H5Part_model.h \
$(top_srcdir)/src/include/H5_attachments.h \
$(top_srcdir)/src/include/H5_debug.h \
$(top_srcdir)/src/include/H5_err.h \
$(top_srcdir)/src/include/H5_file.h \
$(top_srcdir)/src/include/H5_file_attribs.h \
......
......@@ -9,7 +9,7 @@
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5_file.h"
#include <hdf5.h>
......@@ -248,7 +248,7 @@ h5_set_verbosity_level (
) {
H5_API_ENTER (h5_int64_t, "level=%lld", (long long)*level);
H5_API_RETURN(h5_set_debuglevel (*level));
H5_API_RETURN(h5_set_loglevel (*level));
}
#define h5_abort_on_error FC_MANGLING( \
......@@ -259,7 +259,7 @@ h5_abort_on_error (
void
) {
H5_API_ENTER (h5_int64_t, "%s", "");
h5_set_debuglevel (1);
h5_set_loglevel (1);
H5_API_RETURN (h5_set_errorhandler (h5_abort_errorhandler));
}
......
......@@ -8,7 +8,7 @@
*/
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5b_attribs.h"
#define H5_R8_T H5_FLOAT64
......
......@@ -8,7 +8,7 @@
*/
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5b_io.h"
#define h5bl_3d_write_scalar_field_r8 FC_MANGLING ( \
......
......@@ -8,7 +8,7 @@
*/
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5b_model.h"
#include "h5core/h5b_io.h"
......
......@@ -8,7 +8,7 @@
*/
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5u_io.h"
......
......@@ -8,7 +8,7 @@
*/
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5u_model.h"
#include "h5core/h5u_io.h"
......
......@@ -9,7 +9,7 @@
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5_file_attribs.h"
#include "h5core/h5_step_attribs.h"
......
......@@ -9,7 +9,7 @@
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5_model.h"
/* H5hut data model */
......
......@@ -9,7 +9,6 @@ F90_FILES = \
$(top_srcdir)/src/include/H5_model.f90 \
$(top_srcdir)/src/include/H5_file_attribs.f90 \
$(top_srcdir)/src/include/H5_step_attribs.f90 \
$(top_srcdir)/src/include/H5_debug.f90 \
$(top_srcdir)/src/include/H5_err.f90 \
$(top_srcdir)/src/include/H5_log.f90 \
$(top_srcdir)/src/include/H5Part_model.f90 \
......
......@@ -34,7 +34,7 @@ EXTRA_HEADERS = \
private/h5u_io.h \
private/h5u_types.h \
private/h5_attribs.h \
private/h5_debug.h \
private/h5_log.h \
private/h5_err.h \
private/h5_fcmp.h
......@@ -48,8 +48,8 @@ lib_LTLIBRARIES = libH5hut.la
libH5hut_la_SOURCES = \
h5_attachments.c \
h5_attribs.c \
h5_debug.c \
h5_errorhandling.c \
h5_log.c \
h5_err.c \
h5_init.c \
h5_model.c \
h5_file.c \
......
......@@ -7,7 +7,7 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "private/h5_hdf5.h"
#include "private/h5_attribs.h"
......
......@@ -7,7 +7,7 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "h5core/h5_err.h"
#include "private/h5_init.h"
......@@ -103,7 +103,7 @@ h5_report_errorhandler (
const char* fmt,
va_list ap
) {
if (h5_debug_level > 0) {
if (h5_log_level > 0) {
h5_verror (fmt, ap);
}
return h5_errno;
......@@ -120,7 +120,7 @@ h5_abort_errorhandler (
const char* fmt,
va_list ap
) {
if (h5_debug_level > 0) {
if (h5_log_level > 0) {
h5_verror (fmt, ap);
}
#ifdef PARALLEL_IO
......@@ -178,6 +178,6 @@ h5_verror (
const char* fmt,
va_list ap
) {
if (h5_debug_level == 0) return;
if (h5_log_level == 0) return;
h5priv_vprintf (stderr, "E", h5_call_stack.entry[0].name, fmt, ap);
}
......@@ -11,7 +11,7 @@
#include <errno.h>
#include <fcntl.h>
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "private/h5_file.h"
#include "private/h5_hdf5.h"
......@@ -67,7 +67,7 @@ hdf5_error_handler (
void* __f
) {
UNUSED_ARGUMENT (__f);
if (h5_get_debuglevel() >= 5) {
if (h5_get_loglevel() >= 5) {
H5Eprint (estack_id, stderr);
}
return 0;
......
......@@ -7,10 +7,10 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "private/h5_init.h"
h5_int32_t h5_debug_level = H5_VERBOSE_ERROR;
h5_int32_t h5_log_level = H5_VERBOSE_ERROR;
struct call_stack h5_call_stack;
char *h5_rfmts[] = {
......@@ -54,13 +54,13 @@ char *h5_rfmts[] = {
\return \c H5_ERR_INVAL if debug level is invalid.
*/
h5_err_t
h5_set_debuglevel (
h5_set_loglevel (
const h5_id_t level /*!< debug level */
) {
if (level < 0)
h5_debug_level = ((1 << 20) - 1) & ~0x7;
h5_log_level = ((1 << 20) - 1) & ~0x7;
else
h5_debug_level = level;
h5_log_level = level;
return H5_SUCCESS;
}
......@@ -72,8 +72,8 @@ h5_set_debuglevel (
\return current debug level
*/
h5_err_t
h5_get_debuglevel (
h5_get_loglevel (
void
) {
return h5_debug_level;
return h5_log_level;
}
......@@ -6,7 +6,7 @@
License: see file COPYING in top level of source distribution.
*/
#include "private/h5_debug.h"
#include "private/h5_log.h"
#include "private/h5_file.h"
#include "private/h5_hdf5.h"
......
......@@ -7,7 +7,7 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "private/h5_file.h"
#include "private/h5t_types.h"
......
......@@ -2019,7 +2019,7 @@ distribute_octree_parmetis (
TRY (vtxdist = h5_calloc (m->f->nprocs+1, sizeof (*vtxdist)));
vtxdist[0] = 0;
#if !defined(NDEBUG)
if (h5_debug_level & (1<<5) ) {
if (h5_log_level & (1<<5) ) {
h5_debug ("vtxdist[%d]: %d", 0, 0);
}
#endif
......@@ -2031,7 +2031,7 @@ distribute_octree_parmetis (
vtxdist[i] = vtxdist[i-1] + n;
}
#if !defined(NDEBUG)
if (h5_debug_level & (1<<5) ) {
if (h5_log_level & (1<<5) ) {
h5_debug ("vtxdist[%d]: %d", i, vtxdist[i]);
}
#endif
......@@ -2067,7 +2067,7 @@ distribute_octree_parmetis (
}
xadj[i+1] = xadj[i] + num_neigh;
#if !defined(NDEBUG)
if (h5_debug_level & (1<<5) ) {
if (h5_log_level & (1<<5) ) {
h5_debug ("xadj[%d]: %d", i+1, xadj[i+1]);
}
#endif
......@@ -2077,7 +2077,7 @@ distribute_octree_parmetis (
if (new_numbering[j] == neighbors[k]) {
adjncy[counter] = j;
#if !defined(NDEBUG)
if (h5_debug_level & (1<<5) ) {
if (h5_log_level & (1<<5) ) {
h5_debug ("adjncy[%d]: %d", counter, adjncy[counter]);
}
#endif
......@@ -2145,7 +2145,7 @@ distribute_octree_parmetis (
TRY (h5_free (ubvec));
#if !defined(NDEBUG)
if (h5_debug_level & (1<<5) ) {
if (h5_log_level & (1<<5) ) {
for (i = 0; i < num_interior_oct; i++) {
h5_debug ("part[%d]: %llu", i, (unsigned long long)part[i]);
}
......@@ -2633,7 +2633,7 @@ read_chunked_elements (
#if NDEBUG == 0
if (h5_debug_level & (1<<6) ) {
if (h5_log_level & (1<<6) ) {
sleep (m->f->myproc*2);
for (int i = 0; i < num_interior_elems;i++) {
h5_debug ("\n"
......
......@@ -7,7 +7,7 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "private/h5_file.h"
#include "private/h5_mpi.h"
......
......@@ -7,7 +7,7 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_debug.h"
#include "h5core/h5_log.h"
#include "private/h5_file.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment