- several API changes

- refactoring
- ... and more
This commit is contained in:
2009-01-30 14:57:13 +00:00
parent caeefd811d
commit 253708eab7
13 changed files with 807 additions and 699 deletions
+1
View File
@@ -358,6 +358,7 @@ src/H5Fed_map.c -text
src/H5Fed_map.h -text
src/H5Fed_retrieve.c -text
src/H5Fed_store.c -text
src/H5Fed_store.h -text
src/H5Part.c -text
src/H5Part.h -text
src/H5_inquiry.c -text
+27 -31
View File
@@ -31,12 +31,9 @@
*/
/*!
\defgroup h5_c_api H5Fed C API
*/
/*!
\ingroup h5_c_api
\defgroup h5_general
\defgroup h5_c_api_general
*/
@@ -48,7 +45,7 @@
/****** General routines *****************************************************/
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Open file with name \c filename. This function is available in the paralell
and serial version. In the serial case \c comm may have any value.
@@ -62,52 +59,51 @@
h5_file_t *
H5OpenFile (
const char * filename, /*!< file name */
const h5_int32_t oflag, /*!< file open flags */
const MPI_Comm comm /*!< MPI communicator */
) {
SET_FNAME ( __func__ );
return h5_open_file( filename, H5_O_RDWR, comm );
return h5_open_file( filename, H5_O_RDWR, comm, __func__ );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Close file.
\return value \c >=0 on success
\return -1 on error
\return \c H5_SUCCESS or error code
*/
h5_err_t
H5CloseFile (
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
return h5_close_file ( fh );
SET_FNAME ( f, __func__ );
return h5_close_file ( f );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Define format of the step names.
Example: ==H5FedDefineStepNameFormat( f, "Step", 6 )== defines step names
like ==Step#000042==.
\return value \c >=0 on success
\return -1 on error
\return \c H5_SUCCESS or error code
*/
h5_err_t
H5DefineStepNameFormat (
h5_file_t *f, /*!< Handle to file */
const char *name, /*!< Prefix */
const h5_int64_t width /*!< Width of the number */
const h5_int64_t width /*!< Width of the number */
) {
SET_FNAME ( "H5PartDefineStepNameFormat" );
SET_FNAME ( f, __func__ );
return h5_define_stepname_fmt( f, name, width );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Get format of the step names.
@@ -121,13 +117,13 @@ H5GetStepNameFormat (
const h5_size_t l_name, /*!< length of buffer name */
h5_size_t *width /*!< OUT: Width of the number */
) {
SET_FNAME ( "H5PartDefineStepNameFormat" );
SET_FNAME ( f, __func__ );
return h5_get_stepname_fmt( f, name, l_name, width );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Set the current step.
@@ -139,28 +135,28 @@ H5SetStep (
const h5_int64_t step /*!< [in] Step to set. */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5_set_step ( f, step );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Get current step.
\return \c H5_SUCCESS or error code
*/
h5_int64_t
h5_id_t
H5GetStep (
h5_file_t *f /*!< Handle to open file */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5_get_step ( f );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Start traversing steps.
@@ -171,13 +167,13 @@ H5StartTraverseSteps (
h5_file_t *f /*!< Handle to open file */
) {
SET_FNAME ( "H5FedStartTraverseSteps" );
SET_FNAME ( f, __func__ );
return -1;
return h5_start_traverse_steps( f );
}
/*!
\ingroup h5_general
\ingroup h5_c_api_general
Traverse steps.
@@ -188,7 +184,7 @@ H5TraverseSteps (
h5_file_t * f /*!< Handle to open file */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return -1;
return h5_traverse_steps( f );
}
+441 -272
View File
File diff suppressed because it is too large Load Diff
+3 -12
View File
@@ -1,5 +1,5 @@
/*
Copyright 2007-2008
Copyright 2007-2009
Paul Scherrer Institut, Villigen, Switzerland;
Benedikt Oswald;
Achim Gsell
@@ -25,24 +25,15 @@ H5FedOpenMesh (
const h5_id_t id,
const h5_oid_t type
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_open_mesh ( f, id, type );
}
h5_id_t
H5FedAddMesh (
h5_file_t * f,
const h5_oid_t type
) {
SET_FNAME ( __func__ );
return h5t_open_mesh ( f, -1, type );
}
h5_err_t
H5FedSetLevel (
h5_file_t * f,
const h5_id_t id
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_open_level ( f, id );
}
+1 -44
View File
@@ -22,6 +22,7 @@
#include "H5.h"
#include "H5Fed_boundaries.h"
#include "H5Fed_map.h"
#include "H5Fed_store.h"
/****** General routines *****************************************************/
@@ -37,12 +38,6 @@ H5FedOpenMesh (
const h5_id_t id,
const h5_oid_t type
);
h5_id_t
H5FedAddMesh (
h5_file_t * f,
const h5_oid_t type
);
h5_size_t
H5FedGetNumLevels (
h5_file_t * f
@@ -59,22 +54,6 @@ H5FedGetLevel (
h5_file_t * f
);
h5_id_t
H5FedAddLevel (
h5_file_t * f
);
h5_err_t
H5FedAddNumVertices (
h5_file_t * f,
const h5_size_t num
);
h5_err_t
H5FedAddNumEntities (
h5_file_t * f,
const h5_size_t num
);
/****** INQUIRY routines *****************************************************/
@@ -139,13 +118,6 @@ H5FedGetNumTetrahedraCnode (
/* vertices */
h5_id_t
H5FedStoreVertex (
h5_file_t * f,
const h5_id_t id,
const h5_float64_t P[3]
);
h5_err_t
H5FedStartTraverseVertices (
h5_file_t * f
@@ -164,14 +136,6 @@ H5FedGetNumTriangles (
h5_file_t * f
);
h5_id_t
H5FedStoreTriangle (
h5_file_t * f,
const h5_id_t id,
const h5_id_t parent_id,
h5_id_t vertex_ids[3]
);
h5_err_t
H5FedStartTraverseTriangles (
h5_file_t * f
@@ -186,13 +150,6 @@ H5FedTraverseTriangles (
);
/* tetrahedra */
h5_id_t
H5FedStoreTetrahedron (
h5_file_t * f,
const h5_id_t id,
const h5_id_t parent_id,
const h5_id_t vertex_ids[4]
);
h5_err_t
H5FedStartTraverseTetrahedra (
+9 -9
View File
@@ -23,7 +23,7 @@ h5_err_t
H5FedAddBoundary (
h5_file_t * const f
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_open_boundary ( f, -1 );
}
@@ -32,7 +32,7 @@ H5FedOpenBoundary (
h5_file_t * const f,
const h5_id_t boundary_id
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_open_boundary ( f, boundary_id );
}
@@ -40,7 +40,7 @@ h5_err_t
H5FedCloseBoundary (
h5_file_t * const f
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_close_boundary ( f );
}
@@ -49,7 +49,7 @@ H5FedAddNumBoundaryfaces (
h5_file_t * const f,
const h5_id_t num_boundaryfaces
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_add_num_boundaryfaces ( f, num_boundaryfaces );
}
@@ -58,7 +58,7 @@ H5FedStoreBoundaryface (
h5_file_t *f,
h5_id_t *global_vids
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_store_boundaryface ( f, global_vids );
}
@@ -67,7 +67,7 @@ H5FedStoreBoundaryfaceGlobalID (
h5_file_t *f,
h5_id_t global_fid
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_store_boundaryface_global_id ( f, global_fid );
}
@@ -76,7 +76,7 @@ H5FedStoreBoundaryfaceLocalID (
h5_file_t *f,
h5_id_t local_fid
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_store_boundaryface_local_id ( f, local_fid );
}
@@ -84,7 +84,7 @@ h5_err_t
H5FedStartTraverseBoundaryfaces (
h5_file_t * const f
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_start_traverse_boundary_faces( f );
}
@@ -96,6 +96,6 @@ H5FedTraverseBoundaryfaces (
\c >0 else \c -1 */
h5_id_t vertex_ids[3] /*!< OUT: vertex id's */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_traverse_boundary_faces( f, id, parent_id, vertex_ids );
}
+54 -29
View File
@@ -27,7 +27,7 @@ H5FedGetNumMeshes (
h5_file_t * f, /*!< file handle */
const h5_oid_t type
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_get_num_meshes ( f, type );
}
@@ -41,26 +41,30 @@ H5FedGetNumMeshes (
*/
h5_size_t
H5FedGetNumLevels (
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
return h5t_get_num_levels ( fh );
SET_FNAME ( f, __func__ );
return h5t_get_num_levels ( f );
}
h5_id_t
H5FedGetLevel (
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
return h5t_get_level ( fh );
SET_FNAME ( f, __func__ );
return h5t_get_level ( f );
}
/*!
Get number of local vertices on current level.
*/
h5_size_t
H5FedGetNumVertices (
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
return h5t_get_num_vertices_on_level ( fh );
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_vertices ( f, f->myproc, cur_level );
}
/*!
@@ -74,10 +78,11 @@ H5FedGetNumVertices (
*/
h5_size_t
H5FedGetNumVerticesTotal(
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
return h5t_get_num_vertices_on_level ( fh );
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_vertices ( f, -1, cur_level );
}
/*!
@@ -90,19 +95,23 @@ H5FedGetNumVerticesTotal(
q \return \c -1 on error.
*/
h5_size_t H5FedGetNumVerticesCnode (
h5_file_t * fh, /*!< file handle */
h5_file_t * const f, /*!< file handle */
const h5_id_t cnode /*!< compute node */
) {
return -1;
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_vertices ( f, cnode, cur_level );
}
/****** TRIANGLE statistics routines *****************************************/
h5_size_t
H5FedGetNumTriangles (
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
return h5t_get_num_entities_on_level ( fh );
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_entities ( f, f->myproc, cur_level );
}
/*!
@@ -116,9 +125,11 @@ H5FedGetNumTriangles (
*/
h5_size_t
H5FedGetNumTrianglesTotal (
h5_file_t * fh /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
return h5t_get_num_entities_on_level ( fh );
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_entities ( f, -1, cur_level );
}
@@ -133,10 +144,12 @@ H5FedGetNumTrianglesTotal (
*/
h5_size_t
H5FedGetNumTrianglesCnode (
h5_file_t * fh, /*!< file handle */
h5_file_t * const f, /*!< file handle */
const h5_id_t cnode /*!< compute node to query */
) {
return -1;
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_entities ( f, cnode, cur_level );
}
/****** TETRAHEDRON statistics routines **************************************/
@@ -145,17 +158,27 @@ H5FedGetNumTrianglesCnode (
\ingroup h5fed_mesh_inquiry
Returns the number of tetrahedral elements present in the mesh at
level \c level in current step summed up over all compute nodes.
current \c level summed up over all compute nodes.
\return number of tetrahedra
\return \c -1 on error.
*/
h5_size_t
H5FedGetNumTetrahedraTotal(
h5_file_t * fh /*!< file handle */
H5FedGetNumTetrahedra (
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
return h5t_get_num_entities_on_level ( fh );
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_entities ( f, f->myproc, cur_level );
}
h5_size_t
H5FedGetNumTetrahedraTotal (
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_entities ( f, -1, cur_level );
}
/*!
@@ -168,10 +191,12 @@ H5FedGetNumTetrahedraTotal(
\return \c -1 on error.
*/
h5_size_t H5FedGetNumTetrahedraCnode (
h5_file_t * fh, /*!< file handle */
const h5_id_t level /*!< mesh level to query */
h5_file_t * const f, /*!< file handle */
const h5_id_t cnode /*!< compute node to query */
) {
return -1;
SET_FNAME ( f, __func__ );
h5_id_t cur_level = h5t_get_level( f );
return h5t_get_num_entities ( f, cnode, cur_level );
}
+4 -4
View File
@@ -24,19 +24,19 @@
h5_id_t
H5FedMapTet2GlobalID (
h5_file_t *f,
h5_file_t * const f,
h5_id_t * const global_vids
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_get_global_entity_id ( f, global_vids );
}
h5_id_t
H5FedMapTriangle2GlobalID (
h5_file_t *f,
h5_file_t * const f,
h5_id_t * const global_vids
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_get_global_triangle_id ( f, global_vids );
}
+12 -12
View File
@@ -21,9 +21,9 @@
h5_err_t
H5FedStartTraverseVertices (
h5_file_t * f /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_start_traverse_vertices ( f );
}
@@ -38,11 +38,11 @@ H5FedStartTraverseVertices (
*/
h5_id_t
H5FedTraverseVertices (
h5_file_t * f, /*!< file handle */
h5_file_t * const f, /*!< file handle */
h5_id_t * const id, /*!< OUT: global id */
h5_float64_t P[3] /*!< OUT: coordinates */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_traverse_vertices ( f, id, P );
}
@@ -50,30 +50,30 @@ H5FedTraverseVertices (
h5_err_t
H5FedStartTraverseTriangles (
h5_file_t * f /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_start_traverse_triangles ( f );
}
h5_id_t
H5FedTraverseTriangles (
h5_file_t * f, /*!< file handle */
h5_file_t * const f, /*!< file handle */
h5_id_t * const id, /*!< OUT: global tetrahedron id */
h5_id_t * const parent_id, /*!< OUT: parent id if level
\c >0 else \c -1 */
h5_id_t vertex_ids[3] /*!< OUT: vertex id's */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_traverse_triangles ( f, id, parent_id, vertex_ids );
}
h5_err_t
H5FedStartTraverseTetrahedra (
h5_file_t * f /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_start_traverse_tets ( f );
}
@@ -90,13 +90,13 @@ H5FedStartTraverseTetrahedra (
*/
h5_id_t
H5FedTraverseTetrahedra (
h5_file_t * f, /*!< file handle */
h5_file_t * const f, /*!< file handle */
h5_id_t * const id, /*!< OUT: global tetrahedron id */
h5_id_t * const parent_id, /*!< OUT: parent id if level
\c >0 else \c -1 */
h5_id_t vertex_ids[4] /*!< OUT: vertex id's */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_traverse_tets ( f, id, parent_id, vertex_ids );
}
+43 -89
View File
@@ -18,9 +18,31 @@
#include "h5_core/h5_core.h"
#include "H5Fed.h"
h5_id_t
H5FedAddTetMesh (
h5_file_t * const f,
) {
SET_FNAME ( f, __func__ );
return h5t_open_mesh ( f, -1, H5_OID_TETRAHEDRON );
}
h5_id_t
H5FedAddTriangleMesh (
h5_file_t * const f
) {
SET_FNAME ( f, __func__ );
return h5t_open_mesh ( f, -1, H5_OID_TRIANGLE );
}
/*!
\ingroup h5fed_c_api
Add a new level.
\return ID of new level.
\note
values for f->t.num_levels:
\c -1 unknown: after opening the file. This is equivalent to
@@ -28,53 +50,15 @@
\c 0 no levels: HDF5 group for meshes may already exist but must not!
\c > 0 number of mesh levels
\note
write new level:
H5FedAddLevel( f );
H5FedAddNumVertices( f, nv );
H5FedAddNumEntities( f, ne );
*/
h5_id_t
H5FedAddLevel (
h5_file_t * f /*!< file handle */
h5_file_t * const f /*!< file handle */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
return h5t_add_level ( f );
}
#if 0
/*!
\ingroup h5fed_c_api
Set number of additional vertices in current step and level
ERRORS:
H5_ERR_INVAL: It is not possible to add vertices to an existing mesh due
to limitation of the library
H5_ERR_NOMEM: Couldn't allocate enough memory.
\return number of vertices
\return errno on error
*/
h5_err_t
H5FedAddNumVertices (
h5_file_t * f, /*!< file handle */
const h5_size_t num /*!< number of additional vertices */
) {
SET_FNAME ( __func__ );
if ( h5t_get_level ( f ) != 0 ) {
return h5_error (
H5_ERR_INVAL,
"Vertices can be added to level 0 only!" );
}
return h5t_add_num_vertices ( f, num );
}
#endif
/*!
\ingroup h5fed_c_api
@@ -86,40 +70,29 @@ H5FedAddNumVertices (
*/
h5_id_t
H5FedStoreVertex (
h5_file_t * f, /*!< file handle */
const h5_id_t id, /*!< global vertex id or -1 */
h5_file_t * const f, /*!< file handle */
const h5_id_t id, /*!< id from mesher or -1 */
const h5_float64_t P[3] /*!< coordinates */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
if ( h5t_get_level ( f ) != 0 ) {
return h5_error (
f,
H5_ERR_INVAL,
"Vertices can be added to level 0 only!" );
}
return h5t_store_vertex ( f, id, P );
}
/*** T E T R A H E D R A ****************************************************/
h5_err_t
H5FedAddNumTets (
h5_file_t * f, /*!< file handle */
H5FedAddNumElements (
h5_file_t * const f, /*!< file handle */
const h5_size_t num /*!< number of additional
tets on current level */
) {
SET_FNAME ( __func__ );
return h5t_add_num_tets ( f, num );
}
h5_err_t
H5FedAddNumTriangles (
h5_file_t * f, /*!< file handle */
const h5_size_t num /*!< number of additional
triangle on current level */
) {
SET_FNAME ( __func__ );
return h5t_add_num_triangles ( f, num );
SET_FNAME ( f, __func__ );
return h5t_add_num_elements ( f, num );
}
/*!
@@ -137,44 +110,25 @@ H5FedAddNumTriangles (
\return \c errno on error
*/
h5_id_t
H5FedStoreTetrahedron (
h5_file_t * f, /*!< file handle */
const h5_id_t id, /*!< global tetrahedron id */
const h5_id_t parent_id, /*!< global parent id
if level \c >0 else \c -1 */
const h5_id_t vertex_ids[4] /*!< tuple with vertex id's */
H5FedStoreElement (
h5_file_t * const f, /*!< file handle */
const h5_id_t local_vids[] /*!< tuple with vertex id's */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
if ( h5t_get_level ( f ) != 0 ) {
return h5_error (
f,
H5_ERR_INVAL,
"Tetrahedra can be added to level 0 only!" );
}
return h5t_store_tet ( f, id, parent_id, vertex_ids );
return h5t_store_element ( f, -1, local_vids );
}
h5_id_t
H5FedRefineTetrahedron (
h5_file_t * f, /*!< file handle */
const h5_id_t id /*!< global tetrahedron id */
H5FedRefineElement (
h5_file_t * const f, /*!< file handle */
const h5_id_t local_cid /*!< local element id */
) {
SET_FNAME ( __func__ );
return h5t_refine_tet ( f, id );
}
h5_id_t
H5FedStoreTriangle (
h5_file_t * f, /*!< file handle */
const h5_id_t id, /*!< global tetrahedron id */
const h5_id_t parent_id, /*!< global parent id
if level \c >0 else \c -1 */
h5_id_t vertex_ids[3] /*!< tuple with vertex id's */
) {
SET_FNAME ( __func__ );
if ( h5t_get_level ( f ) != 0 ) {
return h5_error (
H5_ERR_INVAL,
"Triangles can be added to level 0 only!" );
}
return h5t_store_triangle ( f, id, parent_id, vertex_ids );
SET_FNAME ( f, __func__ );
return h5t_refine_element ( f, local_cid );
}
+63
View File
@@ -0,0 +1,63 @@
/*
Header file for declaring the H5Fed application programming
interface (API) in the C language.
Copyright 2006-2009
Paul Scherrer Institut, Villigen, Switzerland;
Benedikt Oswald;
Achim Gsell
All rights reserved.
Authors
Achim Gsell
Warning
This code is under development.
*/
#ifndef __H5FED_STORE_H
#define __H5FED_STORE_H
h5_id_t
H5FedAddTetMesh (
h5_file_t * const f
);
h5_id_t
H5FedAddTriangleMesh (
h5_file_t * const f
);
h5_id_t
H5FedAddLevel (
h5_file_t * f
);
h5_err_t
H5FedAddNumVertices (
h5_file_t * f,
const h5_size_t num
);
h5_err_t
H5FedAddNumElements (
h5_file_t * f,
const h5_size_t num
);
h5_id_t
H5FedStoreVertex (
h5_file_t * f,
const h5_id_t id,
const h5_float64_t P[3]
);
h5_id_t
H5FedStoreElement (
h5_file_t * f,
h5_id_t *vertex_ids
);
#endif
+144 -190
View File
@@ -1,78 +1,3 @@
/*! \mainpage H5Part: A Portable High Performance Parallel Data Interface to HDF5
Particle based simulations of accelerator beam-lines, especially in
six dimensional phase space, generate vast amounts of data. Even
though a subset of statistical information regarding phase space or
analysis needs to be preserved, reading and writing such enormous
restart files on massively parallel supercomputing systems remains
challenging.
H5Part consists of Particles and Block structured Fields.
Developed by:
<UL>
<LI> Andreas Adelmann (PSI) </LI>
<LI> Achim Gsell (PSI) </LI>
<LI> Benedikt Oswald (PSI) </LI>
<LI> Wes Bethel (NERSC/LBNL)</LI>
<LI> John Shalf (NERSC/LBNL)</LI>
<LI> Cristina Siegerist (NERSC/LBNL)</LI>
</UL>
Papers:
<UL>
<LI> A. Adelmann, R.D. Ryne, C. Siegerist, J. Shalf,"From Visualization to Data Mining with Large Data Sets," <i>
<a href="http://www.sns.gov/pac05">Particle Accelerator Conference (PAC05)</a></i>, Knoxville TN., May 16-20, 2005. (LBNL-57603)
<a href="http://vis.lbl.gov/Publications/2005/FPAT082.pdf">FPAT082.pdf</a>
</LI>
<LI> A. Adelmann, R.D. Ryne, J. Shalf, C. Siegerist,"H5Part: A Portable High Performance Parallel Data Interface for Particle Simulations," <i>
<a href="http://www.sns.gov/pac05">Particle Accelerator Conference (PAC05)</a></i>, Knoxville TN., May 16-20, 2005.
<a href="http://vis.lbl.gov/Publications/2005/FPAT083.pdf">FPAT083.pdf</a>
</LI>
</UL>
For further information contact: <a href="mailto:h5part@lists.psi.ch">h5part</a>
Last modified on April 19, 2007.
*/
/*!
\defgroup h5part_c_api H5Part C API
*/
/*!
\ingroup h5part_c_api
\defgroup h5part_openclose File Opening and Closing
*/
/*!
\ingroup h5part_c_api
\defgroup h5part_write File Writing
*/
/*!
\ingroup h5part_c_api
\defgroup h5part_read File Reading
*/
/*!
\ingroup h5part_c_api
\defgroup h5part_attrib Reading and Writing Attributes
*/
/*!
\ingroup h5part_c_api
\defgroup h5part_errhandle Error Handling
*/
/*!
\internal
\defgroup h5partkernel H5Part private functions
*/
#include <stdio.h>
#include <stdlib.h>
@@ -102,9 +27,13 @@ Last modified on April 19, 2007.
/*========== File Opening/Closing ===============*/
/*!
\ingroup h5part_c_api
\defgroup h5part_c_api_openclose File Opening and Closing
*/
/*!
\ingroup h5part_openclose
\ingroup h5part_c_api_openclose
Opens file with specified filename.
@@ -129,11 +58,11 @@ H5PartOpenFileParallel (
unsigned flags, /*!< [in] The access mode for the file. */
MPI_Comm comm /*!< [in] MPI communicator */
) {
return h5_open_file ( filename, flags, comm );
return h5_open_file ( filename, flags, comm, __func__ );
}
/*!
\ingroup h5part_openclose
\ingroup h5part_c_api_openclose
Opens file with specified filename.
@@ -159,15 +88,13 @@ H5PartOpenFile (
unsigned flags /*!< [in] The access mode for the file. */
) {
SET_FNAME ( "H5PartOpenFile" );
MPI_Comm comm = 0; /* dummy */
return h5_open_file ( filename, flags, comm );
return h5_open_file ( filename, flags, comm, __func__ );
}
/*!
\ingroup h5part_openclose
\ingroup h5part_c_api_openclose
Closes an open file.
@@ -178,26 +105,31 @@ H5PartCloseFile (
h5_file_t *f /*!< [in] filehandle of the file to close */
) {
SET_FNAME ( "H5PartCloseFile" );
SET_FNAME ( f, __func__ );
return h5_close_file( f );
}
/*============== File Writing Functions ==================== */
/*!
\ingroup h5part_c_api
\defgroup h5part_c_api_write File Writing
*/
h5_int64_t
H5PartDefineStepName (
h5_file_t *f,
const char *name,
const h5_int64_t width
) {
SET_FNAME ( "H5PartDefineStepName" );
SET_FNAME ( f, __func__ );
return h5_define_stepname_fmt( f, name, width );
}
/*!
\ingroup h5part_write
\ingroup h5part_c_api_write
Set number of particles for current time-step.
@@ -216,13 +148,13 @@ H5PartSetNumParticles (
h5_int64_t nparticles /*!< [in] Number of particles */
) {
SET_FNAME ( "H5PartSetNumParticles" );
SET_FNAME ( f, __func__ );
return H5U_set_num_elements( f, nparticles );
return h5u_set_num_elements( f, nparticles );
}
/*!
\ingroup h5part_write
\ingroup h5part_c_api_write
Write array of 64 bit floating point data to file.
@@ -254,13 +186,13 @@ H5PartWriteDataFloat64 (
const h5_float64_t *array /*!< [in] Array to commit to disk */
) {
SET_FNAME ( "H5PartWriteDataFloat64" );
SET_FNAME ( f, __func__ );
return H5U_write_data ( f, name, (void*)array, H5T_NATIVE_DOUBLE );
return h5u_write_data ( f, name, (void*)array, H5T_NATIVE_DOUBLE );
}
/*!
\ingroup h5part_write
\ingroup h5part_c_api_write
Write array of 64 bit integer data to file.
@@ -292,9 +224,9 @@ H5PartWriteDataInt64 (
const h5_int64_t *array /*!< [in] Array to commit to disk */
) {
SET_FNAME ( "H5PartOpenWriteDataInt64" );
SET_FNAME ( f, __func__ );
return H5U_write_data ( f, name, (void*)array, H5T_NATIVE_INT64 );
return h5u_write_data ( f, name, (void*)array, H5T_NATIVE_INT64 );
}
/********************** reading and writing attribute ************************/
@@ -305,7 +237,12 @@ H5PartWriteDataInt64 (
/********************** attribute API ****************************************/
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api
\defgroup h5part_c_api_attrib Reading and Writing Attributes
*/
/*!
\ingroup h5part_c_api_attrib
Writes a string attribute bound to a file.
@@ -325,12 +262,13 @@ H5PartWriteFileAttribString (
const char *attrib_value/*!< [in] Value of attribute */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_write_attrib (
f,
f->root_gid,
attrib_name,
H5T_NATIVE_CHAR,
@@ -339,7 +277,7 @@ H5PartWriteFileAttribString (
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Writes a string attribute bound to the current time-step.
@@ -360,12 +298,13 @@ H5PartWriteStepAttribString (
const char *attrib_value/*!< [in] Value of attribute */
) {
SET_FNAME ( "H5PartWriteStepAttribString" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_write_attrib (
f,
f->step_gid,
attrib_name,
H5T_NATIVE_CHAR,
@@ -374,7 +313,7 @@ H5PartWriteStepAttribString (
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Writes a attribute bound to the current time-step.
@@ -401,12 +340,13 @@ H5PartWriteStepAttrib (
const h5_int64_t attrib_nelem/*!< [in] Number of elements */
){
SET_FNAME ( "H5PartWriteStepAttrib" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_write_attrib (
f,
f->step_gid,
attrib_name,
(const hid_t)attrib_type,
@@ -415,7 +355,7 @@ H5PartWriteStepAttrib (
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Writes a attribute bound to a file.
@@ -442,12 +382,13 @@ H5PartWriteFileAttrib (
const h5_int64_t attrib_nelem/*!< [in] Number of elements */
) {
SET_FNAME ( "H5PartWriteFileAttrib" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_write_attrib (
f,
f->root_gid,
attrib_name,
(const hid_t)attrib_type,
@@ -456,7 +397,7 @@ H5PartWriteFileAttrib (
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Gets the number of attributes bound to the current step.
@@ -467,16 +408,16 @@ H5PartGetNumStepAttribs (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartGetNumStepAttribs" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_get_num_attribs ( f, f->step_gid );
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Gets the number of attributes bound to the file.
@@ -487,16 +428,16 @@ H5PartGetNumFileAttribs (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartGetNumFileAttribs" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_get_num_attribs ( f, f->root_gid );
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Gets the name, type and number of elements of the step attribute
specified by its index.
@@ -521,12 +462,13 @@ H5PartGetStepAttribInfo (
h5_int64_t *attrib_nelem /*!< [out] Number of elements */
) {
SET_FNAME ( "H5PartGetStepAttribInfo" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno( f );
return h5_get_attrib_info (
f,
f->step_gid,
attrib_idx,
attrib_name,
@@ -536,7 +478,7 @@ H5PartGetStepAttribInfo (
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Gets the name, type and number of elements of the file attribute
specified by its index.
@@ -561,12 +503,13 @@ H5PartGetFileAttribInfo (
h5_int64_t *attrib_nelem /*!< [out] Number of elements */
) {
SET_FNAME ( "H5PartGetFileAttribInfo" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_get_attrib_info (
f,
f->root_gid,
attrib_idx,
attrib_name,
@@ -576,7 +519,7 @@ H5PartGetFileAttribInfo (
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Reads an attribute bound to current time-step.
@@ -589,16 +532,16 @@ H5PartReadStepAttrib (
void *attrib_value /*!< [out] Value of attribute */
) {
SET_FNAME ( "H5PartReadStepAttrib" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_read_attrib ( f->step_gid, attrib_name, attrib_value );
return h5_read_attrib ( f, f->step_gid, attrib_name, attrib_value );
}
/*!
\ingroup h5part_attrib
\ingroup h5part_c_api_attrib
Reads an attribute bound to file \c f.
@@ -611,16 +554,22 @@ H5PartReadFileAttrib (
void *attrib_value
) {
SET_FNAME ( "H5PartReadFileAttrib" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_read_attrib ( f->root_gid, attrib_name, attrib_value );
return h5_read_attrib ( f, f->root_gid, attrib_name, attrib_value );
}
/*================== File Reading Routines =================*/
/*!
\ingroup h5part_c_api
\defgroup h5part_c_api_read File Reading
*/
/*
H5PartSetStep:
@@ -633,7 +582,7 @@ H5PartReadFileAttrib (
*/
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Set the current time-step.
@@ -654,10 +603,10 @@ H5PartSetStep (
const h5_int64_t step /*!< [in] Time-step to set. */
) {
SET_FNAME ( "H5PartSetStep" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_set_step ( f, step );
}
@@ -666,7 +615,7 @@ H5PartSetStep (
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Query whether a particular step already exists in the file
\c f.
@@ -681,16 +630,16 @@ H5PartHasStep (
h5_int64_t step /*!< [in] Step number to query */
) {
SET_FNAME ( "H5PartHasStep" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_has_step( f, step );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Get the number of time-steps that are currently stored in the file
\c f.
@@ -705,12 +654,12 @@ H5PartGetNumSteps (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartGetNumSteps" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_get_num_objects_matching_pattern (
return hdf5_get_num_objects_matching_pattern (
f->file,
"/",
H5G_UNKNOWN,
@@ -718,7 +667,7 @@ H5PartGetNumSteps (
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Get the number of datasets that are stored at the current time-step.
@@ -730,16 +679,16 @@ H5PartGetNumDatasets (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartGetNumDatasets" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_get_num_objects ( f->file, f->step_name, H5G_DATASET );
return hdf5_get_num_objects ( f->file, f->step_name, H5G_DATASET );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
This reads the name of a dataset specified by it's index in the current
time-step.
@@ -756,12 +705,12 @@ H5PartGetDatasetName (
const h5_int64_t len_of_name/*!< [in] Size of buffer \c name */
) {
SET_FNAME ( "H5PartGetDatasetName" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return h5_get_object_name (
return hdf5_get_object_name (
f->file,
f->step_name,
H5G_DATASET,
@@ -771,7 +720,7 @@ H5PartGetDatasetName (
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Gets the name, type and number of elements of a dataset specified by it's
index in the current time-step.
@@ -791,17 +740,17 @@ H5PartGetDatasetInfo (
h5_int64_t *nelem /*!< [out] Number of elements. */
) {
SET_FNAME ( "H5PartGetDatasetInfo" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
return H5U_get_dataset_info ( f, idx,
dataset_name, len_dataset_name, type, nelem );
return h5u_get_dataset_info (
f, idx, dataset_name, len_dataset_name, type, nelem );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
This gets the number of particles stored in the current step.
It will arbitrarily select a time-step if you haven't already set
@@ -815,44 +764,44 @@ H5PartGetNumParticles (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartGetNumParticles" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
if ( f->step_gid < 0 ) {
h5_int64_t herr = h5_set_step ( f, 0 );
if ( herr < 0 ) return herr;
}
return H5U_get_num_elems ( f );
return h5u_get_num_elems ( f );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
*/
h5_int64_t
H5PartResetView (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartResetView" );
SET_FNAME ( f, __func__ );
if ( h5_check_filehandle ( f ) != H5_SUCCESS )
return h5_get_errno();
return h5_get_errno ( f );
CHECK_READONLY_MODE ( f );
return H5U_reset_view ( f );
return h5u_reset_view ( f );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
*/
h5_int64_t
H5PartHasView (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( __func__ );
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE( f );
CHECK_READONLY_MODE ( f );
@@ -862,7 +811,7 @@ H5PartHasView (
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
For parallel I/O or for subsetting operations on the datafile, the
\c H5PartSetView() function allows you to define a subset of the total
@@ -887,7 +836,7 @@ H5PartSetView (
const h5_int64_t end /*!< [in] End particle */
) {
SET_FNAME ( "H5PartSetView" );
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE( f );
CHECK_READONLY_MODE ( f );
@@ -897,11 +846,11 @@ H5PartSetView (
if ( herr < 0 ) return herr;
}
return H5U_set_view ( f, start, end );
return h5u_set_view ( f, start, end );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Allows you to query the current view. Start and End
will be \c -1 if there is no current view established.
@@ -917,7 +866,7 @@ H5PartGetView (
h5_int64_t *end /*!< [out] End particle */
) {
SET_FNAME ( "H5PartGetView" );
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE( f );
@@ -925,11 +874,11 @@ H5PartGetView (
h5_int64_t herr = h5_set_step ( f, 0 );
if ( herr < 0 ) return herr;
}
return H5U_get_view( f, start, end );
return h5u_get_view( f, start, end );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
If it is too tedious to manually set the start and end coordinates
for a view, the \c H5SetCanonicalView() will automatically select an
@@ -950,7 +899,7 @@ H5PartSetCanonicalView (
h5_file_t *f /*!< [in] Handle to open file */
) {
SET_FNAME ( "H5PartSetCanonicalView" );
SET_FNAME ( f, __func__ );
h5_int64_t herr;
@@ -962,11 +911,11 @@ H5PartSetCanonicalView (
if ( herr < 0 ) return herr;
}
return H5U_set_canonical_view ( f );
return h5u_set_canonical_view ( f );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Read array of 64 bit floating point data from file.
@@ -984,15 +933,15 @@ H5PartReadDataFloat64 (
h5_float64_t *array /*!< [out] Array of data */
) {
SET_FNAME ( "H5PartReadDataFloat64" );
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE( f );
return H5U_read_elems ( f, name, array, H5T_NATIVE_DOUBLE );
return h5u_read_elems ( f, name, array, H5T_NATIVE_DOUBLE );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
Read array of 64 bit floating point data from file.
@@ -1010,15 +959,15 @@ H5PartReadDataInt64 (
h5_int64_t *array /*!< [out] Array of data */
) {
SET_FNAME ( "H5PartReadDataInt64" );
SET_FNAME ( f, __func__ );
CHECK_FILEHANDLE( f );
return H5U_read_elems ( f, name, array, H5T_NATIVE_INT64 );
return h5u_read_elems ( f, name, array, H5T_NATIVE_INT64 );
}
/*!
\ingroup h5part_read
\ingroup h5part_c_api_read
This is the mongo read function that pulls in all of the data for a
given step in one shot. It also takes the step as an argument
@@ -1044,7 +993,7 @@ H5PartReadParticleStep (
h5_int64_t *id /*!< [out] Buffer for dataset named "id" */
) {
SET_FNAME ( "H5PartReadParticleStep" );
SET_FNAME ( f, __func__ );
h5_int64_t herr;
CHECK_FILEHANDLE( f );
@@ -1052,25 +1001,25 @@ H5PartReadParticleStep (
herr = h5_set_step ( f, step );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "x", (void*)x, H5T_NATIVE_DOUBLE );
herr = h5u_read_elems ( f, "x", (void*)x, H5T_NATIVE_DOUBLE );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "y", (void*)y, H5T_NATIVE_DOUBLE );
herr = h5u_read_elems ( f, "y", (void*)y, H5T_NATIVE_DOUBLE );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "z", (void*)z, H5T_NATIVE_DOUBLE );
herr = h5u_read_elems ( f, "z", (void*)z, H5T_NATIVE_DOUBLE );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "px", (void*)px, H5T_NATIVE_DOUBLE );
herr = h5u_read_elems ( f, "px", (void*)px, H5T_NATIVE_DOUBLE );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "py", (void*)py, H5T_NATIVE_DOUBLE );
herr = h5u_read_elems ( f, "py", (void*)py, H5T_NATIVE_DOUBLE );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "pz", (void*)pz, H5T_NATIVE_DOUBLE );
herr = h5u_read_elems ( f, "pz", (void*)pz, H5T_NATIVE_DOUBLE );
if ( herr < 0 ) return herr;
herr = H5U_read_elems ( f, "id", (void*)id, H5T_NATIVE_INT64 );
herr = h5u_read_elems ( f, "id", (void*)id, H5T_NATIVE_INT64 );
if ( herr < 0 ) return herr;
return H5_SUCCESS;
@@ -1079,7 +1028,12 @@ H5PartReadParticleStep (
/****************** error handling ******************/
/*!
\ingroup h5part_errhandle
\ingroup h5part_c_api
\defgroup h5part_c_api_errhandling Error Handling
*/
/*!
\ingroup h5part_c_api_errhandling
Set verbosity level to \c level.
@@ -1094,7 +1048,7 @@ H5PartSetVerbosityLevel (
}
/*!
\ingroup h5part_errhandle
\ingroup h5part_c_api_errhandling
Set error handler to \c handler.
@@ -1102,20 +1056,20 @@ H5PartSetVerbosityLevel (
*/
h5_int64_t
H5PartSetErrorHandler (
h5_error_handler handler
h5_errorhandler_t handler
) {
return h5_set_errorhandler( handler );
}
/*!
\ingroup h5part_errhandle
\ingroup h5part_c_api_errhandling
Get current error handler.
\return Pointer to error handler.
*/
h5_error_handler
h5_errorhandler_t
H5PartGetErrorHandler (
void
) {
@@ -1123,7 +1077,7 @@ H5PartGetErrorHandler (
}
/*!
\ingroup h5part_errhandle
\ingroup h5part_c_api_errhandling
Get last error code.
@@ -1131,9 +1085,9 @@ H5PartGetErrorHandler (
*/
h5_int64_t
H5PartGetErrno (
void
h5_file_t * const f
) {
return h5_get_errno();
return h5_get_errno( f );
}
/*! @} */
+5 -7
View File
@@ -279,31 +279,29 @@ H5PartSetVerbosityLevel (
h5_int64_t
H5PartSetErrorHandler (
const h5_error_handler handler
const h5_errorhandler_t handler
);
h5_int64_t
H5PartGetErrno (
void
h5_file_t *f
);
h5_error_handler
h5_errorhandler_t
H5PartGetErrorHandler (
void
);
h5_int64_t
H5PartReportErrorHandler (
const char *funcname,
const h5_int64_t eno,
h5_file_t *f,
const char *fmt,
...
);
h5_int64_t
H5PartAbortErrorHandler (
const char *funcname,
const h5_int64_t eno,
h5_file_t *f,
const char *fmt,
...
);