Commit 52d44e3b authored by gsell's avatar gsell

- re-organize file hierarchy

- years in copyright changed
parent 3d623062
if ENABLE_C
# Header files that I wish to install in $(prefix)/include
include_HEADERS = \
$(top_srcdir)/src/include/H5Block_attribs.h \
$(top_srcdir)/src/include/H5Block_io.h \
......@@ -12,6 +11,7 @@ include_HEADERS = \
$(top_srcdir)/src/include/H5Fed_tags.h \
$(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_error.h \
$(top_srcdir)/src/include/H5_file.h \
......@@ -21,7 +21,6 @@ include_HEADERS = \
$(top_srcdir)/src/include/H5_step_attribs.h \
$(top_srcdir)/src/include/H5hut.h
# Listing of all possible headers that I may include
EXTRA_HEADERS =
endif
......
......@@ -9,9 +9,11 @@
#include "h5_private.h"
#include "h5core/h5.h"
#include "h5core/h5_init.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_model.h"
#include "h5core/h5_file.h"
#include <hdf5.h>
#define h5_createprop_file FC_MANGLING( \
h5_createprop_file, \
......
......@@ -10,6 +10,7 @@
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5b_model.h"
#include "h5core/h5b_io.h"
#define h5bl_hasfielddata FC_MANGLING ( \
h5bl_hasfielddata, \
......
......@@ -10,6 +10,7 @@
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5u_model.h"
#include "h5core/h5u_io.h"
#include "h5core/h5_syscall.h"
......
......@@ -10,7 +10,8 @@
#include "h5_private.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_attribs.h"
#include "h5core/h5_file_attribs.h"
#include "h5core/h5_step_attribs.h"
/*
__ _ _ _ _ _ _ _
......
......@@ -9,7 +9,7 @@
#include "h5_private.h"
#include "h5core/h5.h"
#include "h5core/h5_init.h"
#include "h5core/h5_debug.h"
#include "h5core/h5_model.h"
......
......@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include "h5core/h5.h"
#include "h5core/h5_init.h"
#if defined(FC_MANGLING_LOWERCASE_NO_UNDERSCORE)
# define FC_MANGLING(a,b) a
......
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/src/include @AM_CPPFLAGS@
EXTRA_HEADERS = \
h5_attribs_private.h \
h5_debug_private.h \
h5_errorhandling_private.h \
h5_fcmp_private.h \
h5_hdf5_private.h \
h5_hsearch_private.h \
h5_init_private.h \
h5_lustre_private.h \
h5_maps_private.h \
h5_model_private.h \
h5_mpi_private.h \
h5_private.h \
h5_qsort_private.h \
h5_readwrite_private.h \
h5_syscall_private.h \
h5_types_private.h \
h5_va_macros.h \
h5b_model_private.h \
h5b_readwrite_private.h \
h5b_types_private.h \
h5t_access_private.h \
h5t_adjacencies_private.h \
h5t_core_private.h \
h5t_errorhandling_private.h \
h5t_map_private.h \
h5t_model_private.h \
h5t_octree_private.h \
h5t_readwrite_private.h \
h5t_ref_elements_private.h \
h5t_retrieve_private.h \
h5t_store_private.h \
h5t_tags_private.h \
h5t_types_private.h \
h5u_readwrite_private.h \
h5u_types_private.h
private/h5_hdf5.h \
private/h5_hsearch.h \
private/h5_init.h \
private/h5_lustre.h \
private/h5_maps.h \
private/h5_model.h \
private/h5_mpi.h \
private/h5.h \
private/h5_qsort.h \
private/h5_io.h \
private/h5_types.h \
private/h5_va_macros.h \
private/h5b_model.h \
private/h5b_io.h \
private/h5b_types.h \
private/h5t_access.h \
private/h5t_adjacencies.h \
private/h5t_core.h \
private/h5t_errorhandling.h \
private/h5t_map.h \
private/h5t_model.h \
private/h5t_octree.h \
private/h5t_io.h \
private/h5t_ref_elements.h \
private/h5t_retrieve.h \
private/h5t_store.h \
private/h5t_tags.h \
private/h5t_types.h \
private/h5u_io.h \
private/h5u_types.h \
private/h5_attribs.h \
private/h5_debug.h \
private/h5_errorhandling.h \
private/h5_fcmp.h
# Extra files that I wish to include in the dist tar ball.
EXTRA_DIST = $(EXTRA_HEADERS)
......@@ -46,53 +46,53 @@ lib_LTLIBRARIES = libH5hut.la
# Listing of sources
libH5hut_la_SOURCES = \
h5_attach.c \
h5_attachments.c \
h5_attribs.c \
h5_debug.c \
h5_errorhandling.c \
h5_fcmp.c \
h5_init.c \
h5_hdf5.c \
h5_hsearch.c \
h5_maps.c \
h5_model.c \
h5_openclose.c \
h5_qsort.c \
h5_qsort_r.c \
h5_readwrite.c \
h5_syscall.c \
h5_lustre.c \
h5u_readwrite.c \
h5b_readwrite.c \
h5_file.c \
h5u_io.c \
h5b_io.c \
h5u_model.c \
h5b_model.c \
h5b_attribs.c
h5b_attribs.c \
private/h5_hdf5.c \
private/h5_hsearch.c \
private/h5_maps.c \
private/h5_fcmp.c \
private/h5_qsort.c \
private/h5_qsort_r.c \
private/h5_io.c \
private/h5_lustre.c
# grid stuff
libH5hut_la_SOURCES += \
h5t_access_tetm.c \
h5t_access_trim.c \
h5t_adjacencies.c \
h5t_adjacencies_tetm.c \
h5t_adjacencies_trim.c \
h5t_core.c \
h5t_core_trim.c \
h5t_core_tetm.c \
h5t_map.c \
h5t_model.c \
h5t_model_tetm.c \
h5t_model_trim.c \
h5t_octree.c \
h5t_readwrite.c \
h5t_readwrite_trim.c \
h5t_readwrite_tetm.c \
h5t_ref_elements.c \
h5t_io.c \
h5t_retrieve.c \
h5t_retrieve_tetm.c \
h5t_retrieve_trim.c \
h5t_store.c \
h5t_store_tetm.c \
h5t_store_trim.c \
h5t_tags.c
h5t_tags.c \
private/h5t_core.c \
private/h5t_core_trim.c \
private/h5t_core_tetm.c \
private/h5t_access_tetm.c \
private/h5t_access_trim.c \
private/h5t_adjacencies_tetm.c \
private/h5t_adjacencies_trim.c \
private/h5t_model_tetm.c \
private/h5t_model_trim.c \
private/h5t_retrieve_tetm.c \
private/h5t_retrieve_trim.c \
private/h5t_io_trim.c \
private/h5t_io_tetm.c \
private/h5t_ref_elements.c \
private/h5t_store_tetm.c \
private/h5t_store_trim.c
libH5hut_la_DEPENDENCIES = $(EXTRA_HEADERS)
......
/*
Copyright (c) 2006-2015, The Regents of the University of California,
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
......@@ -7,14 +7,14 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5.h"
#include "h5_types_private.h"
#include "h5core/h5_init.h"
#include "private/h5_types.h"
#include "h5_errorhandling_private.h"
#include "h5_hdf5_private.h"
#include "h5_model_private.h"
#include "private/h5_errorhandling.h"
#include "private/h5_hdf5.h"
#include "private/h5_model.h"
#include "h5core/h5_syscall.h"
#include "h5_va_macros.h"
#include "private/h5_va_macros.h"
#include <string.h>
#include <sys/stat.h>
......
/*
Copyright (c) 2006-2015, The Regents of the University of California,
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
......@@ -7,64 +7,16 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5.h"
#include "h5_types_private.h"
#include "h5core/h5_init.h"
#include "h5core/h5_debug.h"
#include "h5_private.h"
#include "h5_readwrite_private.h"
#include "h5_hdf5_private.h"
#include "private/h5_types.h"
#include "private/h5.h"
#include "private/h5_io.h"
#include "private/h5_hdf5.h"
#include "private/h5_attribs.h"
static inline h5_err_t
get_attrib_info (
hid_t attrib_id,
h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */
h5_size_t* attrib_nelem /*!< OUT: number of elements */
) {
H5_INLINE_FUNC_ENTER (h5_err_t);
hid_t mytype;
TRY (mytype = hdf5_get_attribute_type (attrib_id));
H5T_class_t type_class;
TRY (type_class = hdf5_get_class_type (mytype));
if (attrib_nelem) {
if (type_class == H5T_STRING) {
*attrib_nelem = H5Tget_size(mytype);
} else {
hid_t space_id;
TRY (space_id = hdf5_get_attribute_dataspace (attrib_id));
TRY (*attrib_nelem = hdf5_get_npoints_of_dataspace (space_id));
TRY (hdf5_close_dataspace (space_id));
}
}
if (attrib_type) {
TRY (*attrib_type = h5priv_normalize_h5_type (mytype));
}
TRY (hdf5_close_type (mytype));
TRY (hdf5_close_attribute (attrib_id));
H5_INLINE_FUNC_RETURN (H5_SUCCESS);
}
h5_err_t
h5priv_get_attrib_info_by_name (
const hid_t id, /*!< IN: HDF5 object ID */
const char* const attrib_name, /*!< IN: name of attribute */
h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */
h5_size_t* attrib_nelem /*!< OUT: number of elements */
) {
H5_PRIV_API_ENTER (h5_err_t,
"id=%lld, "
"attrib_name=%s,"
"attrib_type=%p, attrib_nelem=%p",
(long long int)id,
attrib_name,
attrib_type,
attrib_nelem);
hid_t attrib_id;
TRY (attrib_id = hdf5_open_attribute (id, attrib_name));
H5_PRIV_API_RETURN (get_attrib_info (attrib_id, attrib_type, attrib_nelem));
}
h5_err_t
h5priv_get_attrib_info_by_idx (
......
/*
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5_init.h"
#include "private/h5_init.h"
h5_int32_t h5_debug_level = H5_VERBOSE_ERROR;
struct call_stack h5_call_stack;
char *h5_rfmts[] = {
[e_int] "%d",
[e_ssize_t] "%ld",
[e_char_p] "%s",
[e_void_p] "%p",
[e_h5_err_t] "%lld",
[e_h5_int64_t] "%lld",
[e_h5_id_t] "%lld",
[e_h5_ssize_t] "%lld",
[e_h5_errorhandler_t] "%p",
[e_h5_file_p] "%p",
[e_h5_file_t] "0x%08x",
[e_h5_lvl_idx_t] "%d",
[e_h5t_iterator_p] "%p",
[e_h5_loc_id_t] "%ld",
[e_h5_loc_idx_t] "%ld",
[e_hid_t] "%lld",
[e_H5O_type_t] "%ld",
[e_h5_glb_elem_p] "%p",
[e_h5_prop_p] "%p",
[e_h5_prop_t] "0x%08x",
[e_h5_prop_file_p] "%p",
[e_h5_prop_file_t] "0x%08x",
[e_herr_t] "%ld"
};
/*!
\ingroup h5_core_errorhandling
Set debug/verbosity level. On level 0 all output will be supressed (even
error messages). On level 1 error messages, on level 2 warning messages
and on level 3 informational messages will be printed. On level 4 debug
messages will be printed.
Values less than 0 are equivalent to 0. Values greater than 4 are equivalent
to 4.
\return \c H5_SUCCESS on success.
\return \c H5_ERR_INVAL if debug level is invalid.
*/
h5_err_t
h5_set_debuglevel (
const h5_id_t level /*!< debug level */
) {
if (level < 0)
h5_debug_level = ((1 << 20) - 1) & ~0x7;
else
h5_debug_level = level;
return H5_SUCCESS;
}
/*!
\ingroup h5_core_errorhandling
Get current debug/verbosity level.
\return current debug level
*/
h5_err_t
h5_get_debuglevel (
void
) {
return h5_debug_level;
}
/*
Copyright (c) 2006-2015, The Regents of the University of California,
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
......@@ -7,39 +7,11 @@
License: see file COPYING in top level of source distribution.
*/
#include "h5core/h5.h"
#include "h5_init_private.h"
#include "h5core/h5_init.h"
#include "private/h5_init.h"
static h5_errorhandler_t h5_errhandler = h5_report_errorhandler;
h5_err_t h5_errno;
h5_int32_t h5_debug_level = H5_VERBOSE_ERROR;
struct call_stack h5_call_stack;
char *h5_rfmts[] = {
[e_int] "%d",
[e_ssize_t] "%ld",
[e_char_p] "%s",
[e_void_p] "%p",
[e_h5_err_t] "%lld",
[e_h5_int64_t] "%lld",
[e_h5_id_t] "%lld",
[e_h5_ssize_t] "%lld",
[e_h5_errorhandler_t] "%p",
[e_h5_file_p] "%p",
[e_h5_file_t] "0x%08x",
[e_h5_lvl_idx_t] "%d",
[e_h5t_iterator_p] "%p",
[e_h5_loc_id_t] "%ld",
[e_h5_loc_idx_t] "%ld",
[e_hid_t] "%lld",
[e_H5O_type_t] "%ld",
[e_h5_glb_elem_p] "%p",
[e_h5_prop_p] "%p",
[e_h5_prop_t] "0x%08x",
[e_h5_prop_file_p] "%p",
[e_h5_prop_file_t] "0x%08x",
[e_herr_t] "%ld"
};
/*!
\ingroup h5_core
......@@ -59,45 +31,6 @@ const char* const H5_O_MODES[] = {
"H5_O_APPENDONLY"
};
/*!
\ingroup h5_core_errorhandling
Set debug/verbosity level. On level 0 all output will be supressed (even
error messages). On level 1 error messages, on level 2 warning messages
and on level 3 informational messages will be printed. On level 4 debug
messages will be printed.
Values less than 0 are equivalent to 0. Values greater than 4 are equivalent
to 4.
\return \c H5_SUCCESS on success.
\return \c H5_ERR_INVAL if debug level is invalid.
*/
h5_err_t
h5_set_debuglevel (
const h5_id_t level /*!< debug level */
) {
if (level < 0)
h5_debug_level = ((1 << 20) - 1) & ~0x7;
else
h5_debug_level = level;
return H5_SUCCESS;
}
/*!
\ingroup h5_core_errorhandling
Get current debug/verbosity level.
\return current debug level
*/
h5_err_t
h5_get_debuglevel (
void
) {
return h5_debug_level;
}
/*!
\ingroup h5_core_errorhandling
......
/*
Copyright (c) 2006-2015, The Regents of the University of California,
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
......@@ -11,15 +11,16 @@
#include <errno.h>
#include <fcntl.h>
#include "h5core/h5.h"
#include "h5core/h5_init.h"
#include "h5core/h5_debug.h"
#include "h5_private.h"
#include "h5_hdf5_private.h"
#include "private/h5.h"
#include "private/h5_hdf5.h"
#include "h5_model_private.h"
#include "h5_mpi_private.h"
#include "h5u_readwrite_private.h"
#include "h5b_readwrite_private.h"
#include "private/h5_model.h"
#include "private/h5_mpi.h"
#include "private/h5u_io.h"
#include "private/h5b_io.h"
#include "h5core/h5_errorhandling.h"
#include "h5core/h5_syscall.h"
......@@ -49,6 +50,15 @@ h5_check_filehandle (
return H5_SUCCESS;
}
hid_t
h5_get_hdf5_file(
const h5_file_t f_ /*!< file handle */
) {
h5_file_p f = (h5_file_p)f_;
H5_CORE_API_ENTER (hid_t, "f=%p", f);
H5_CORE_API_RETURN (f->file);
}
/*!
Initialize H5Part
*/
......@@ -680,22 +690,6 @@ h5_get_num_procs (
H5_CORE_API_RETURN (f->nprocs);
}
/*!
\ingroup h5_core_filehandling
Provides access to the underlying HDF5 file handle.
\return Number of steps or error code
*/
hid_t
h5_get_hdf5_file(
const h5_file_t f_ /*!< file handle */
) {
h5_file_p f = (h5_file_p)f_;
H5_CORE_API_ENTER (hid_t, "f=%p", f);
H5_CORE_API_RETURN (f->file);
}
/*!
\ingroup h5_core_filehandling
......
/*
Copyright (c) 2006-2015, The Regents of the University of California,
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
......@@ -14,12 +14,12 @@
#include "config.h"
#include "h5core/h5.h"
#include "h5_hdf5_private.h"
#include "h5core/h5_init.h"
#include "private/h5_hdf5.h"
#include "h5_mpi_private.h"
#include "h5t_types_private.h"
#include "h5t_tags_private.h"
#include "private/h5_mpi.h"
#include "private/h5t_types.h"
#include "private/h5t_tags.h"
......
/*
Copyright (c) 2006-2015, The Regents of the University of California,
Copyright (c) 2006-2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
......@@ -9,13 +9,13 @@
#include <string.h>
#include "h5core/h5.h"
#include "h5_types_private.h"
#include "h5_hdf5_private.h"
#include "h5_model_private.h"
#include "h5_mpi_private.h"
#include "h5_readwrite_private.h"
#include "h5_va_macros.h"
#include "h5core/h5_init.h"
#include "private/h5_types.h"
#include "private/h5_hdf5.h"
#include "private/h5_model.h"
#include "private/h5_mpi.h"
#include "private/h5_io.h"
#include "private/h5_va_macros.h"
h5_err_t
h5priv_close_step (
......
#ifndef __H5_PRIVATE_H
#define __H5_PRIVATE_H
#include "h5_types_private.h"
#include "h5_errorhandling_private.h"
#define UNUSED_ARGUMENT(x) (void)x
static inline h5_err_t
check_filehandle (
const h5_file_p f
) {
if (f == NULL || f->file < 0 || f->u == NULL || f->b == NULL) {
return h5_error (
H5_ERR_BADF,
"Called with bad filehandle.");
}
return H5_SUCCESS;
}