Compare commits

..

1 Commits

Author SHA1 Message Date
Marc Howison 39cee80bc7 1.6.5 release: Fixed several build errors reported by Iuri Prilepov on Ubuntu 11.04. 2011-09-23 14:47:11 +00:00
17 changed files with 971 additions and 978 deletions
-1
View File
@@ -77,7 +77,6 @@ test/H5test.cc -text
test/H5testF.f -text
test/H5testFpar.F90 -text
test/Makefile.am -text
test/coords.F90 -text
test/params.h -text
test/read.c -text
test/test.c -text
+1 -1
View File
@@ -8,4 +8,4 @@ John Shalf (NERSC/LBNL)
Cristina Siegerist (NERSC/LBNL)
Mark Howison (NERSC/LBNL)
Please use h5part@lists.psi.ch for communication.
Please use h5part@lists.psi.ch for communicaion.
-9
View File
@@ -1,12 +1,3 @@
#### H5PART 1.6.6 ############################################################
Fixed typo (Write instead of Read) in the h5bl_3d_read_scalar_field* Fortran
interface.
Added missing type normalization for int32 type.
Rewrite of h5pAttrib tool.
#### H5PART 1.6.5 ############################################################
Fixed several build errors reported by Iuri Prilepov on Ubuntu 11.04.
+1 -1
View File
@@ -1,6 +1,6 @@
# Every configure script must call AC_INIT before doing anything else.
# AC_INIT (package, version, [bug-report], [tarname])
AC_INIT([H5Part], [1.6.6], [h5part@lists.psi.ch], H5Part)
AC_INIT([H5Part], [1.6.5], [h5part@lists.psi.ch], H5Part)
# Ensure that a recent enough version of Autoconf is being used.
# If the version of Autoconf being used to create configure is earlier than version,
+1 -1
View File
@@ -4,7 +4,7 @@
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = H5Part
PROJECT_NUMBER = 1.6.6
PROJECT_NUMBER = 1.6.1
OUTPUT_DIRECTORY = ./ReferencePages
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
+4 -247
View File
@@ -269,16 +269,17 @@ static h5part_int64_t
_allgather (
const H5PartFile *f /*!< IN: file handle */
) {
struct H5BlockPartition *partition = &f->block->user_layout[f->myproc];
struct H5BlockPartition *layout = f->block->user_layout;
MPI_Datatype partition_m;
size_t n = sizeof (struct H5BlockPartition) / sizeof (h5part_int64_t);
MPI_Type_contiguous ( n, MPI_LONG_LONG, &partition_m );
MPI_Type_commit ( &partition_m );
MPI_Type_commit ( &partition_m );
MPI_Allgather ( MPI_IN_PLACE, 0, MPI_DATATYPE_NULL,
layout, 1, partition_m, f->comm );
MPI_Allgather ( partition, 1, partition_m, layout, 1, partition_m,
f->comm );
return H5PART_SUCCESS;
}
@@ -2009,250 +2010,6 @@ H5Block3dSetFieldSpacing (
3 );
}
/*!
\ingroup h5block_attrib
Get the explicit list of X coordinates for field \c field_name in the current
time step. The coordinates are read into the 1D array \c coords which has
length \c coords_len.
By convention, the \c coords array should have the same length as the X
dimension of the field, and a warning will be printed if they differ.
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5Block3dGetFieldXCoords(
H5PartFile *f, /*!< IN: file handle */
const char *field_name, /*!< IN: field name */
h5part_float64_t *coords, /*!< OUT: X coordinates */
const h5part_int64_t coords_len /*!< IN: length of coordinates */
) {
SET_FNAME ( "H5BlockGetFieldXCoords" );
BLOCK_INIT ( f );
CHECK_TIMEGROUP( f );
CHECK_LAYOUT( f );
struct H5BlockStruct *b = f->block;
if (coords_len != b->i_max + 1)
_H5Part_print_warn( "Coordinate array length (%lld) does not match X dimension (%lld)",
(long long)coords_len, (long long)b->i_max + 1);
return _read_field_attrib (
f,
field_name,
H5BLOCK_FIELD_XCOORD_NAME,
coords );
}
/*!
\ingroup h5block_attrib
Set an explicit list of X coordinates for field \c field_name in the current
time step. The coordinates are a 1D array of floating point values with
dimension \c coords_len.
By convention, the \c coords array should have the same length as the X
dimension of the field, and a warning will be printed if not.
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5Block3dSetFieldXCoords (
H5PartFile *f, /*!< IN: file handle */
const char *field_name, /*!< IN: field name */
const h5part_float64_t *coords, /*!< IN: X coordinates */
const h5part_int64_t coords_len /*!< IN: number of coordinates */
) {
SET_FNAME ( "H5BlockSetFieldXCoords" );
BLOCK_INIT ( f );
CHECK_WRITABLE_MODE( f );
CHECK_TIMEGROUP( f );
CHECK_LAYOUT( f );
struct H5BlockStruct *b = f->block;
if (coords_len != b->i_max + 1)
_H5Part_print_warn( "Coordinate array length (%lld) does not match X dimension (%lld)",
(long long)coords_len, (long long)b->i_max + 1);
return _write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_XCOORD_NAME,
(const hid_t)H5PART_FLOAT64,
coords,
coords_len
);
}
/*!
\ingroup h5block_attrib
Get the explicit list of Y coordinates for field \c field_name in the current
time step. The coordinates are read into the 1D array \c coords which has
length \c coords_len.
By convention, the \c coords array should have the same length as the Y
dimension of the field, and a warning will be printed if they differ.
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5Block3dGetFieldYCoords(
H5PartFile *f, /*!< IN: file handle */
const char *field_name, /*!< IN: field name */
h5part_float64_t *coords, /*!< OUT: Y coordinates */
const h5part_int64_t coords_len /*!< IN: length of coordinates */
) {
SET_FNAME ( "H5BlockGetFieldYCoords" );
BLOCK_INIT ( f );
CHECK_TIMEGROUP( f );
CHECK_LAYOUT( f );
struct H5BlockStruct *b = f->block;
if (coords_len != b->j_max + 1)
_H5Part_print_warn( "Coordinate array length (%lld) does not match Y dimension (%lld)",
(long long)coords_len, (long long)b->j_max + 1);
return _read_field_attrib (
f,
field_name,
H5BLOCK_FIELD_YCOORD_NAME,
coords );
}
/*!
\ingroup h5block_attrib
Set an explicit list of Y coordinates for field \c field_name in the current
time step. The coordinates are a 1D array of floating point values with
dimension \c coords_len.
By convention, the \c coords array should have the same length as the Y
dimension of the field, and a warning will be printed if not.
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5Block3dSetFieldYCoords (
H5PartFile *f, /*!< IN: file handle */
const char *field_name, /*!< IN: field name */
const h5part_float64_t *coords, /*!< IN: Y coordinates */
const h5part_int64_t coords_len /*!< IN: number of coordinates */
) {
SET_FNAME ( "H5BlockSetFieldYCoords" );
BLOCK_INIT ( f );
CHECK_WRITABLE_MODE( f );
CHECK_TIMEGROUP( f );
CHECK_LAYOUT( f );
struct H5BlockStruct *b = f->block;
if (coords_len != b->j_max + 1)
_H5Part_print_warn( "Coordinate array length (%lld) does not match X dimension (%lld)",
(long long)coords_len, (long long)b->j_max + 1);
return _write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_YCOORD_NAME,
(const hid_t)H5PART_FLOAT64,
coords,
coords_len
);
}
/*!
\ingroup h5block_attrib
Get the explicit list of Z coordinates for field \c field_name in the current
time step. The coordinates are read into the 1D array \c coords which has
length \c coords_len.
By convention, the \c coords array should have the same length as the Z
dimension of the field, and a warning will be printed if they differ.
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5Block3dGetFieldZCoords(
H5PartFile *f, /*!< IN: file handle */
const char *field_name, /*!< IN: field name */
h5part_float64_t *coords, /*!< OUT: Z coordinates */
const h5part_int64_t coords_len /*!< IN: length of coordinates */
) {
SET_FNAME ( "H5BlockGetFieldZCoords" );
BLOCK_INIT ( f );
CHECK_TIMEGROUP( f );
CHECK_LAYOUT( f );
struct H5BlockStruct *b = f->block;
if (coords_len != b->k_max + 1)
_H5Part_print_warn( "Coordinate array length (%lld) does not match Z dimension (%lld)",
(long long)coords_len, (long long)b->k_max + 1);
return _read_field_attrib (
f,
field_name,
H5BLOCK_FIELD_ZCOORD_NAME,
coords );
}
/*!
\ingroup h5block_attrib
Set an explicit list of Z coordinates for field \c field_name in the current
time step. The coordinates are a 1D array of floating point values with
dimension \c coords_len.
By convention, the \c coords array should have the same length as the Z
dimension of the field, and a warning will be printed if not.
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5Block3dSetFieldZCoords (
H5PartFile *f, /*!< IN: file handle */
const char *field_name, /*!< IN: field name */
const h5part_float64_t *coords, /*!< IN: Z coordinates */
const h5part_int64_t coords_len /*!< IN: number of coordinates */
) {
SET_FNAME ( "H5BlockSetFieldZCoords" );
BLOCK_INIT ( f );
CHECK_WRITABLE_MODE( f );
CHECK_TIMEGROUP( f );
CHECK_LAYOUT( f );
struct H5BlockStruct *b = f->block;
if (coords_len != b->k_max + 1)
_H5Part_print_warn( "Coordinate array length (%lld) does not match X dimension (%lld)",
(long long)coords_len, (long long)b->k_max + 1);
return _write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_ZCOORD_NAME,
(const hid_t)H5PART_FLOAT64,
coords,
coords_len
);
}
/*!
\ingroup h5block_model
-65
View File
@@ -232,69 +232,4 @@ INTEGER*8 FUNCTION h5bl_3d_set_field_origin ( filehandle, name, x, y, z )
REAL*8, INTENT(IN) :: z
END FUNCTION
!> \ingroup h5blockf_attrib
!! See \ref H5Block3dGetFieldXCoords
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5bl_3d_get_field_xcoords ( filehandle, name, coords )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
REAL*8, INTENT(OUT) :: coords(*)
INTEGER*8, INTENT(IN) :: coords_len
END FUNCTION
!> \ingroup h5blockf_attrib
!! See \ref H5Block3dSetFieldXCoords
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5bl_3d_set_field_xcoords ( filehandle, name, coords )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
REAL*8, INTENT(IN) :: coords(*)
INTEGER*8, INTENT(IN) :: coords_len
END FUNCTION
!> \ingroup h5blockf_attrib
!! See \ref H5Block3dGetFieldYCoords
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5bl_3d_get_field_ycoords ( filehandle, name, coords )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
REAL*8, INTENT(OUT) :: coords(*)
INTEGER*8, INTENT(IN) :: coords_len
END FUNCTION
!> \ingroup h5blockf_attrib
!! See \ref H5Block3dSetFieldYCoords
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5bl_3d_set_field_ycoords ( filehandle, name, coords )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
REAL*8, INTENT(IN) :: coords(*)
INTEGER*8, INTENT(IN) :: coords_len
END FUNCTION
!> \ingroup h5blockf_attrib
!! See \ref H5Block3dGetFieldZCoords
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5bl_3d_get_field_zcoords ( filehandle, name, coords )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
REAL*8, INTENT(OUT) :: coords(*)
INTEGER*8, INTENT(IN) :: coords_len
END FUNCTION
!> \ingroup h5blockf_attrib
!! See \ref H5Block3dSetFieldZCoords
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5bl_3d_set_field_zcoords ( filehandle, name, coords )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
REAL*8, INTENT(IN) :: coords(*)
INTEGER*8, INTENT(IN) :: coords_len
END FUNCTION
-51
View File
@@ -13,9 +13,6 @@ extern "C" {
#define H5BLOCK_FIELD_ORIGIN_NAME "__Origin__"
#define H5BLOCK_FIELD_SPACING_NAME "__Spacing__"
#define H5BLOCK_FIELD_XCOORD_NAME "__X_Coordinates__"
#define H5BLOCK_FIELD_YCOORD_NAME "__Y_Coordinates__"
#define H5BLOCK_FIELD_ZCOORD_NAME "__Z_Coordinates__"
/*!
Interface for block structured field data.
@@ -141,54 +138,6 @@ H5Block3dSetFieldSpacing (
const h5part_float64_t z_spacing
);
h5part_int64_t
H5Block3dGetFieldXCoords (
H5PartFile *f,
const char *field_name,
h5part_float64_t *coords,
const h5part_int64_t coords_len
);
h5part_int64_t
H5Block3dSetFieldXCoords (
H5PartFile *f,
const char *field_name,
const h5part_float64_t *coords,
const h5part_int64_t coords_len
);
h5part_int64_t
H5Block3dGetFieldYCoords (
H5PartFile *f,
const char *field_name,
h5part_float64_t *coords,
const h5part_int64_t coords_len
);
h5part_int64_t
H5Block3dSetFieldYCoords (
H5PartFile *f,
const char *field_name,
const h5part_float64_t *coords,
const h5part_int64_t coords_len
);
h5part_int64_t
H5Block3dGetFieldZCoords (
H5PartFile *f,
const char *field_name,
h5part_float64_t *coords,
const h5part_int64_t coords_len
);
h5part_int64_t
H5Block3dSetZCoords (
H5PartFile *f,
const char *field_name,
const h5part_float64_t *coords,
const h5part_int64_t coords_len
);
h5part_int64_t
H5BlockWriteFieldAttrib (
H5PartFile *f,
-138
View File
@@ -68,24 +68,6 @@
#define h5bl_3d_get_field_origin F77NAME ( \
h5bl_3d_get_field_origin_, \
H5BL_3D_GET_FIELD_origin )
#define h5bl_3d_get_field_xcoords F77NAME ( \
h5bl_3d_get_field_xcoords_, \
H5BL_3D_GET_FIELD_XCOORDS )
#define h5bl_3d_set_field_xcoords F77NAME ( \
h5bl_3d_set_field_xcoords_, \
H5BL_3D_SET_FIELD_XCOORDS )
#define h5bl_3d_get_field_ycoords F77NAME ( \
h5bl_3d_get_field_ycoords_, \
H5BL_3D_GET_FIELD_YCOORDS )
#define h5bl_3d_set_field_ycoords F77NAME ( \
h5bl_3d_set_field_ycoords_, \
H5BL_3D_SET_FIELD_YCOORDS )
#define h5bl_3d_get_field_zcoords F77NAME ( \
h5bl_3d_get_field_zcoords_, \
H5BL_3D_GET_FIELD_ZCOORDS )
#define h5bl_3d_set_field_zcoords F77NAME ( \
h5bl_3d_set_field_zcoords_, \
H5BL_3D_SET_FIELD_ZCOORDS )
#endif
h5part_int64_t
@@ -465,123 +447,3 @@ h5bl_3d_set_field_origin (
free ( field_name2 );
return herr;
}
h5part_int64_t
h5bl_3d_set_field_xcoords (
h5part_int64_t *f,
const char *field_name,
const h5part_float64_t *coords,
const h5part_int64_t *coords_len,
const int l_field_name
) {
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dSetFieldXCoords (
filehandle, field_name2, coords, *coords_len );
free ( field_name2 );
return herr;
}
h5part_int64_t
h5bl_3d_get_field_xcoords (
h5part_int64_t *f,
const char *field_name,
h5part_float64_t *coords,
const h5part_int64_t *coords_len,
const int l_field_name
) {
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dGetFieldXCoords (
filehandle, field_name2, coords, *coords_len );
free ( field_name2 );
return herr;
}
h5part_int64_t
h5bl_3d_set_field_ycoords (
h5part_int64_t *f,
const char *field_name,
const h5part_float64_t *coords,
const h5part_int64_t *coords_len,
const int l_field_name
) {
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dSetFieldYCoords (
filehandle, field_name2, coords, *coords_len );
free ( field_name2 );
return herr;
}
h5part_int64_t
h5bl_3d_get_field_ycoords (
h5part_int64_t *f,
const char *field_name,
h5part_float64_t *coords,
const h5part_int64_t *coords_len,
const int l_field_name
) {
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dGetFieldYCoords (
filehandle, field_name2, coords, *coords_len );
free ( field_name2 );
return herr;
}
h5part_int64_t
h5bl_3d_set_field_zcoords (
h5part_int64_t *f,
const char *field_name,
const h5part_float64_t *coords,
const h5part_int64_t *coords_len,
const int l_field_name
) {
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dSetFieldZCoords (
filehandle, field_name2, coords, *coords_len );
free ( field_name2 );
return herr;
}
h5part_int64_t
h5bl_3d_get_field_zcoords (
h5part_int64_t *f,
const char *field_name,
h5part_float64_t *coords,
const h5part_int64_t *coords_len,
const int l_field_name
) {
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dGetFieldZCoords (
filehandle, field_name2, coords, *coords_len );
free ( field_name2 );
return herr;
}
+4 -4
View File
@@ -57,7 +57,7 @@ h5bl_3d_read_scalar_field_r8 (
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dReadScalarFieldFloat64 (
h5part_int64_t herr = H5Block3dWriteScalarFieldFloat64 (
filehandle, field_name2, data );
free ( field_name2 );
@@ -161,7 +161,7 @@ h5bl_3d_read_scalar_field_r4 (
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dReadScalarFieldFloat32 (
h5part_int64_t herr = H5Block3dWriteScalarFieldFloat32 (
filehandle, field_name2, data );
free ( field_name2 );
@@ -265,7 +265,7 @@ h5bl_3d_read_scalar_field_i8 (
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dReadScalarFieldInt64 (
h5part_int64_t herr = H5Block3dWriteScalarFieldInt64 (
filehandle, field_name2, data );
free ( field_name2 );
@@ -369,7 +369,7 @@ h5bl_3d_read_scalar_field_i4 (
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block3dReadScalarFieldInt32 (
h5part_int64_t herr = H5Block3dWriteScalarFieldInt32 (
filehandle, field_name2, data );
free ( field_name2 );
+16 -7
View File
@@ -291,15 +291,15 @@ _H5Part_open_file (
if ( align != 0 ) {
_H5Part_print_info (
"Setting HDF5 alignment to %lld bytes with threshold at half that many bytes",
(long long)align );
"Setting HDF5 alignment to %ld bytes with threshold at half that many bytes",
align );
if (H5Pset_alignment ( f->access_prop, align/2, align ) < 0) {
HANDLE_H5P_SET_FAPL_ERR;
goto error_cleanup;
}
_H5Part_print_info (
"Setting HDF5 meta block to %lld bytes",
(long long)align );
"Setting HDF5 meta block to %ld bytes",
align );
if (H5Pset_meta_block_size ( f->access_prop, align ) < 0) {
HANDLE_H5P_SET_FAPL_ERR;
goto error_cleanup;
@@ -1314,9 +1314,6 @@ _H5Part_normalize_h5_type (
if ( size==8 ) {
return H5PART_INT64;
}
else if ( size==4 ) {
return H5PART_INT32;
}
else if ( size==1 ) {
return H5PART_CHAR;
}
@@ -1346,7 +1343,9 @@ _H5Part_read_attrib (
) {
herr_t herr;
h5part_int64_t h5err;
hid_t attrib_id;
hid_t space_id;
hid_t type_id;
#ifdef H5PART_HAVE_HDF5_18
@@ -1362,9 +1361,15 @@ _H5Part_read_attrib (
type_id = H5Aget_type ( attrib_id );
if ( type_id < 0 ) return HANDLE_H5A_GET_TYPE_ERR;
space_id = H5Aget_space ( attrib_id );
if ( space_id < 0 ) return HANDLE_H5A_GET_SPACE_ERR;
herr = H5Aread ( attrib_id, type_id, attrib_value );
if ( herr < 0 ) return HANDLE_H5A_READ_ERR;
herr = H5Sclose ( space_id );
if ( herr < 0 ) return HANDLE_H5S_CLOSE_ERR;
herr = H5Tclose ( type_id );
if ( herr < 0 ) return HANDLE_H5T_CLOSE_ERR;
@@ -2081,6 +2086,9 @@ _H5Part_iteration_operator2 (
void *operator_data /*!< [in,out] data passed to the iterator */
) {
struct _iter_op_data *data = (struct _iter_op_data*)operator_data;
herr_t herr = 0;
switch (linfo->type) {
case H5L_TYPE_HARD: {
@@ -3206,6 +3214,7 @@ _read_data (
"elements selected (%lld) than are available "
"in memory (%lld).",
name2, (long long)nread, (long long)nmem );
memspace_id == H5S_ALL;
}
}
+1 -2
View File
@@ -115,10 +115,9 @@ END FUNCTION
!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver
!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode
!!
!! See \ref H5PartOpenFileParallelAlign
!! \return 0 on success or error code
!<
INTEGER*8 FUNCTION h5pt_openr_par_align ( filename, mpi_communicator, align, flags )
INTEGER*8 FUNCTION h5pt_openr_par_align ( filename, mpi_communicator, align )
CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading
INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program
INTEGER*8, INTENT(IN) :: align !< alignment value in bytes
+2 -2
View File
@@ -16,10 +16,10 @@ extern "C" {
#include "H5MultiBlock.h"
#endif
#define H5PART_VER_STRING "1.6.6"
#define H5PART_VER_STRING "1.6.5"
#define H5PART_VER_MAJOR 1
#define H5PART_VER_MINOR 6
#define H5PART_VER_RELEASE 6
#define H5PART_VER_RELEASE 5
/* error values */
#define H5PART_SUCCESS 0
+1 -1
View File
@@ -214,7 +214,7 @@ h5bl_#DIM#d_read_scalar_field_#TYPE_F90_ABV# (
char *field_name2 = _H5Part_strdupfor2c ( field_name, l_field_name );
h5part_int64_t herr = H5Block#DIM#dReadScalarField#TYPE_ABV# (
h5part_int64_t herr = H5Block#DIM#dWriteScalarField#TYPE_ABV# (
filehandle, field_name2, data );
free ( field_name2 );
-97
View File
@@ -1,97 +0,0 @@
program H5BlockCoordsTest
implicit none
#ifdef PARALLEL_IO
include 'mpif.h'
#endif
include 'H5PartF.h'
#ifdef PARALLEL_IO
integer :: ierr, comm
#endif
integer*8 :: file_id, status, i
real*8, allocatable :: r8buf(:,:,:), r8buf3(:,:,:,:), coords(:)
real*8 :: x, y, z
#ifdef PARALLEL_IO
call MPI_INIT(ierr)
comm = MPI_COMM_WORLD
#endif
! this enables level 4 ("debug") messages to be
! printed by the H5Part library
! (4_8 is the literal for an integer*8 with value 4)
status = h5pt_set_verbosity_level (4_8)
! open the a file called 'test.h5' in parallel for writing
#ifdef PARALLEL_IO
file_id = h5pt_openw_par_align ('test.h5', comm, 1048576_8, "vfd_mpiposix")
#else
file_id = h5pt_openw_align ('test.h5', 1048576_8, "vfd_mpiposix")
#endif
status = h5bl_define3dlayout(file_id, 1_8, 30_8, 1_8, 30_8, 1_8, 30_8)
! in the Fortran API, steps start at 1
status = h5pt_setstep (file_id, 1_8)
! create fake data
allocate(r8buf(30,30,30))
allocate(r8buf3(30,30,30,3))
allocate(coords(30))
x = 1.0
y = 2.0
z = 3.0
! write the data
status = h5bl_3d_write_scalar_field_r8(file_id, "x", r8buf(1,1,1))
status = h5bl_3d_set_field_origin(file_id, "x", x, y, z)
status = h5bl_3d_set_field_spacing(file_id, "x", x, y, z)
status = h5bl_3d_write_3dvector_field_r8(file_id, "v", r8buf3(1,1,1,1), r8buf3(1,1,1,2), r8buf3(1,1,1,3))
status = h5bl_3d_set_field_origin(file_id, "v", x, y, z)
status = h5bl_3d_set_field_spacing(file_id, "v", x, y, z)
! create fake coordinates
do i = 1, 30
coords(i) = 3*i
enddo
status = h5bl_3d_set_field_xcoords(file_id, "v", coords, 30_8)
do i = 1, 30
coords(i) = 3*i + 1
enddo
status = h5bl_3d_set_field_ycoords(file_id, "v", coords, 30_8)
do i = 1, 30
coords(i) = 3*i + 2
enddo
status = h5bl_3d_set_field_zcoords(file_id, "v", coords, 30_8)
! read fake coordinates
do i = 1, 30
coords(i) = -1
enddo
status = h5bl_3d_get_field_xcoords(file_id, "v", coords, 30_8)
write(*, *) coords
!write(*, "I3") ( coords(i), i=1, 30 )
do i = 1, 30
coords(i) = -1
enddo
status = h5bl_3d_get_field_ycoords(file_id, "v", coords, 30_8)
write(*, *) coords
!write(*, "I3") ( coords(i), i=1, 30 )
do i = 1, 30
coords(i) = -1
enddo
status = h5bl_3d_get_field_zcoords(file_id, "v", coords, 30_8)
write(*, *) coords
!write(*, "I3") ( coords(i), i=1, 30 )
! close the file
status = h5pt_close (file_id)
#ifdef PARALLEL_IO
call MPI_FINALIZE(ierr)
#endif
end program H5BlockCoordsTest
+1 -1
View File
@@ -661,7 +661,7 @@ test_open_objects(H5PartFile *file, int max_objects)
"at line %4d in %s\n", nopen, max_objects,
(int)__LINE__, __FILE__ );
hid_t *list = (hid_t)malloc(sizeof(hid_t)*nopen);
hid_t *list = malloc(sizeof(hid_t)*nopen);
H5Fget_obj_ids(file->file, H5F_OBJ_ALL, nopen, list);
H5O_info_t info;
+939 -350
View File
File diff suppressed because it is too large Load Diff