first part of LBL merge: h5core and H5Part
This commit is contained in:
+11
-3
@@ -21,8 +21,8 @@
|
||||
h5_file_t *
|
||||
H5OpenFile (
|
||||
const char * filename,
|
||||
const h5_int32_t oflag,
|
||||
const MPI_Comm comm
|
||||
h5_int32_t flag,
|
||||
MPI_Comm comm
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
@@ -42,7 +42,7 @@ H5GetStepNameFormat (
|
||||
h5_file_t *f,
|
||||
char *name,
|
||||
const h5_size_t l_name,
|
||||
h5_size_t *width
|
||||
int *width
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
@@ -105,4 +105,12 @@ H5GetErrno (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
#ifdef PARALLEL_IO
|
||||
h5_err_t
|
||||
H5SetThrottle (
|
||||
h5_file_t* f,
|
||||
int factor
|
||||
);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __H5_INQUIRY_H
|
||||
#define __H5_INQUIRY_H
|
||||
|
||||
h5_size_t
|
||||
int
|
||||
H5GetNumNodes (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "h5_openclose.h"
|
||||
#include "h5_readwrite.h"
|
||||
#include "h5u_readwrite.h"
|
||||
#include "h5u_model.h"
|
||||
|
||||
#include "h5t_core.h"
|
||||
|
||||
|
||||
@@ -23,15 +23,15 @@ h5_int64_t
|
||||
h5_set_stepname_fmt (
|
||||
h5_file_t * const f,
|
||||
const char *name,
|
||||
const h5_int64_t width
|
||||
int width
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_get_stepname_fmt (
|
||||
h5_file_t * const f,
|
||||
char *name,
|
||||
const h5_size_t l_name,
|
||||
h5_size_t *width
|
||||
int l_name,
|
||||
int *width
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
@@ -39,6 +39,16 @@ h5priv_close_step (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
int
|
||||
h5_get_num_procs (
|
||||
h5_file_t* const f
|
||||
);
|
||||
|
||||
h5_size_t
|
||||
h5_get_num_steps (
|
||||
h5_file_t* const f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5_has_step (
|
||||
h5_file_t * const f,
|
||||
@@ -59,4 +69,5 @@ h5_err_t
|
||||
h5_traverse_steps (
|
||||
h5_file_t * f /*!< file handle */
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,4 +37,26 @@ h5_has_index (
|
||||
h5_int64_t step /*!< [in] Step number to query */
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_normalize_dataset_name (
|
||||
const char *name,
|
||||
char *name2
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_set_throttle (
|
||||
h5_file_t *f,
|
||||
int factor
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_start_throttle (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_end_throttle (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,10 +12,13 @@
|
||||
H5_O_RDWR: dataset may exist
|
||||
*/
|
||||
|
||||
#define H5_O_RDWR 0
|
||||
#define H5_O_RDONLY 1
|
||||
#define H5_O_WRONLY 2
|
||||
#define H5_O_APPEND 3
|
||||
#define H5_O_RDWR 0x01
|
||||
#define H5_O_RDONLY 0x02
|
||||
#define H5_O_WRONLY 0x04
|
||||
#define H5_O_APPEND 0x08
|
||||
|
||||
#define H5_VFD_MPIPOSIX 0x10
|
||||
#define H5_VFD_INDEPENDENT 0x20
|
||||
|
||||
#define H5_ID_T H5T_NATIVE_INT64
|
||||
#define H5_FLOAT64_T H5T_NATIVE_DOUBLE
|
||||
@@ -51,6 +54,8 @@ typedef h5_float64_t h5_coord3d_t[3];
|
||||
|
||||
|
||||
struct h5_file;
|
||||
typedef struct h5_file h5_file_t;
|
||||
|
||||
typedef h5_err_t (*h5_errorhandler_t)(
|
||||
struct h5_file * const,
|
||||
const char*,
|
||||
@@ -69,49 +74,6 @@ typedef struct h5_idlist {
|
||||
struct h5_idmap;
|
||||
typedef struct h5_idmap h5_idmap_t;
|
||||
|
||||
/**
|
||||
\struct h5_file
|
||||
|
||||
This is an essentially opaque datastructure that
|
||||
acts as the filehandle for all practical purposes.
|
||||
It is created by H5PartOpenFile<xx>() and destroyed by
|
||||
H5PartCloseFile().
|
||||
*/
|
||||
struct h5_file {
|
||||
hid_t file; /* file id -> fid */
|
||||
unsigned mode; /* file access mode */
|
||||
int empty;
|
||||
|
||||
h5_err_t __errno; /* error number */
|
||||
const char * __funcname; /* H5Block/Fed/Part API function*/
|
||||
|
||||
/* MPI */
|
||||
|
||||
MPI_Comm comm; /* MPI communicator */
|
||||
int nprocs; /* number of processors */
|
||||
int myproc; /* The index of the processor
|
||||
this process is running on. */
|
||||
|
||||
/* HDF5 */
|
||||
hid_t xfer_prop; /* file transfer properties */
|
||||
hid_t create_prop; /* file create properties */
|
||||
hid_t access_prop; /* file access properties */
|
||||
hid_t root_gid; /* id of root group */
|
||||
hid_t step_gid; /* id of current step */
|
||||
|
||||
/* step internal data */
|
||||
char prefix_step_name[256]; /* Prefix of step name */
|
||||
int width_step_idx; /* pad step index with 0 up to this */
|
||||
char step_name[128]; /* full step name */
|
||||
h5_int64_t step_idx; /* step index */
|
||||
int is_new_step;
|
||||
|
||||
struct h5u_fdata *u;
|
||||
struct h5b_fdata *b;
|
||||
struct h5t_fdata *t;
|
||||
};
|
||||
|
||||
typedef struct h5_file h5_file_t;
|
||||
|
||||
enum h5_oid {
|
||||
H5_OID_VERTEX = 1,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef __H5T_CORE_H
|
||||
#define __H5T_CORE_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "h5t_adjacencies.h"
|
||||
#include "h5t_inquiry.h"
|
||||
#include "h5t_map.h"
|
||||
|
||||
@@ -15,13 +15,13 @@ h5t_get_num_levels (
|
||||
h5_size_t
|
||||
h5t_get_num_elems (
|
||||
h5_file_t * const f,
|
||||
const h5_id_t cnode_id
|
||||
const h5_id_t cnode
|
||||
);
|
||||
|
||||
h5_size_t
|
||||
h5t_get_num_vertices (
|
||||
h5_file_t * const f,
|
||||
const h5_id_t cnode_id
|
||||
const h5_id_t cnode
|
||||
);
|
||||
|
||||
h5_id_t
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
#ifndef __H5U_MODEL_H
|
||||
#define __H5U_MODEL_H
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_num_particles (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_num_particles (
|
||||
h5_file_t *f,
|
||||
h5_int64_t nparticles,
|
||||
h5_int64_t stride
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_has_view (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_reset_view (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_view (
|
||||
h5_file_t *f,
|
||||
h5_int64_t start,
|
||||
h5_int64_t end
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_view_indices (
|
||||
h5_file_t *f,
|
||||
const h5_int64_t *indices,
|
||||
h5_int64_t nelems
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_view (
|
||||
h5_file_t *f,
|
||||
h5_int64_t *start,
|
||||
h5_int64_t *end
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_canonical_view (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_num_datasets (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_dataset_info (
|
||||
h5_file_t *f,
|
||||
const h5_int64_t idx,
|
||||
char *dataset_name,
|
||||
const h5_int64_t len_dataset_name,
|
||||
h5_int64_t *type,
|
||||
h5_int64_t *nelem
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5u_set_chunk (
|
||||
h5_file_t *f,
|
||||
h5_size_t size
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,24 +2,13 @@
|
||||
#define __H5U_READWRITE_H
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_num_elems (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_read_elems (
|
||||
h5u_read_data (
|
||||
h5_file_t *f,
|
||||
const char *name,
|
||||
void *array,
|
||||
const hid_t type
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_num_elements (
|
||||
h5_file_t *f,
|
||||
h5_int64_t nparticles
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_write_data (
|
||||
h5_file_t *f,
|
||||
@@ -28,42 +17,5 @@ h5u_write_data (
|
||||
const hid_t type
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_has_view (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_reset_view (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_view (
|
||||
h5_file_t *f,
|
||||
h5_int64_t start,
|
||||
h5_int64_t end
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_view (
|
||||
h5_file_t *f,
|
||||
h5_int64_t *start,
|
||||
h5_int64_t *end
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_set_canonical_view (
|
||||
h5_file_t *f
|
||||
);
|
||||
|
||||
h5_int64_t
|
||||
h5u_get_dataset_info (
|
||||
h5_file_t *f,
|
||||
const h5_int64_t idx,
|
||||
char *dataset_name,
|
||||
const h5_int64_t len_dataset_name,
|
||||
h5_int64_t *type,
|
||||
h5_int64_t *nelem
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user