Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d368a60202 | |||
| 6b4b556ff1 | |||
| 0857443617 |
@@ -18,6 +18,9 @@ doc/Doxyfile -text
|
|||||||
doc/H5X_File_Format.txt -text
|
doc/H5X_File_Format.txt -text
|
||||||
doc/Makefile.am -text
|
doc/Makefile.am -text
|
||||||
doc/doxyfooter -text
|
doc/doxyfooter -text
|
||||||
|
examples/core_vfd.c -text
|
||||||
|
examples/fields.c -text
|
||||||
|
examples/particles.c -text
|
||||||
examples/simplef.F90 -text
|
examples/simplef.F90 -text
|
||||||
examples/stridedf.F90 -text
|
examples/stridedf.F90 -text
|
||||||
examples/write_setview.c -text
|
examples/write_setview.c -text
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
#### H5PART 1.6.2 ############################################################
|
||||||
|
|
||||||
|
Removed H5PartSetViewEmpty
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
An empty view can now be selected with:
|
||||||
|
H5PartSetNumParticles(file, 0);
|
||||||
|
|
||||||
|
Bug Fixes to Attribute Calls in Fortran API
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Fixed a problem where attribute values were reverting to zero.
|
||||||
|
|
||||||
#### H5PART 1.6.1 ############################################################
|
#### H5PART 1.6.1 ############################################################
|
||||||
|
|
||||||
Chunking in the H5Part API
|
Chunking in the H5Part API
|
||||||
@@ -12,7 +25,7 @@ on disk.
|
|||||||
All Steps Available on Write
|
All Steps Available on Write
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Previously, existing steps in a file were only accessable in read-only mode.
|
Previously, existing steps in a file were only accessible in read-only mode.
|
||||||
Now, all steps are available in all modes, including write-truncate and
|
Now, all steps are available in all modes, including write-truncate and
|
||||||
write-append. Thus, it is now possible to overwrite existing data in write
|
write-append. Thus, it is now possible to overwrite existing data in write
|
||||||
mode. To help alert the user to this possibility, a warning is issued every
|
mode. To help alert the user to this possibility, a warning is issued every
|
||||||
@@ -23,9 +36,9 @@ New Throttling Routine
|
|||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Previously, a throttle factor of N meant that for P processors, the total
|
Previously, a throttle factor of N meant that for P processors, the total
|
||||||
number of P writes were divided into N batchs of P/N writes.
|
number of P writes were divided into N batches of P/N writes.
|
||||||
|
|
||||||
To better accomodate round-robin lustre striping, the new policy is to
|
To better accommodate round-robin lustre striping, the new policy is to
|
||||||
execute P/N batches of N writes. Thus, matching N to the number of stripes
|
execute P/N batches of N writes. Thus, matching N to the number of stripes
|
||||||
results in the desirable 1-1 matching of writers to stripes.
|
results in the desirable 1-1 matching of writers to stripes.
|
||||||
|
|
||||||
@@ -160,7 +173,7 @@ calls.
|
|||||||
Previously, a user could overrun internal buffers for dataset names. Now, a
|
Previously, a user could overrun internal buffers for dataset names. Now, a
|
||||||
fixed limit of 64 chars is imposed. Dataset names that are longer than this are
|
fixed limit of 64 chars is imposed. Dataset names that are longer than this are
|
||||||
truncated and a warning is printed. We expect that most users are using
|
truncated and a warning is printed. We expect that most users are using
|
||||||
short canoncical names like x, px, id, etc.
|
short canonical names like x, px, id, etc.
|
||||||
|
|
||||||
Changes to Existing API
|
Changes to Existing API
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Every configure script must call AC_INIT before doing anything else.
|
# Every configure script must call AC_INIT before doing anything else.
|
||||||
# AC_INIT (package, version, [bug-report], [tarname])
|
# AC_INIT (package, version, [bug-report], [tarname])
|
||||||
AC_INIT([H5Part], [1.6.1], [h5part@lists.psi.ch], H5Part)
|
AC_INIT([H5Part], [1.6.2], [h5part@lists.psi.ch], H5Part)
|
||||||
|
|
||||||
|
|
||||||
# Ensure that a recent enough version of Autoconf is being used.
|
# Ensure that a recent enough version of Autoconf is being used.
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define DATASIZE 32
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int i, rank, nprocs;
|
||||||
|
h5part_int32_t data[DATASIZE];
|
||||||
|
h5part_int64_t stat;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
char filename[8];
|
||||||
|
sprintf (filename, "%d.h5", rank);
|
||||||
|
|
||||||
|
file = H5PartOpenFileParallel(
|
||||||
|
filename,
|
||||||
|
H5PART_WRITE | H5PART_VFD_CORE,
|
||||||
|
MPI_COMM_SELF);
|
||||||
|
assert (file != NULL);
|
||||||
|
|
||||||
|
stat = H5PartSetStep(file, 0);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
stat = H5PartSetNumParticles(file, DATASIZE);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
// create fake data
|
||||||
|
for (i=0; i<DATASIZE; i++) {
|
||||||
|
data[i] = i + rank * DATASIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// write the data
|
||||||
|
stat = H5PartWriteDataInt32(file, "data", data);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
H5PartCloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define XSIZE 8
|
||||||
|
#define YSIZE 8
|
||||||
|
#define ZSIZE 8
|
||||||
|
#define DATASIZE XSIZE*YSIZE*ZSIZE
|
||||||
|
#define H5OpenFileParallel H5PartOpenFileParallel
|
||||||
|
#define H5SetStep H5PartSetStep
|
||||||
|
#define H5Block3dSetLayout H5BlockDefine3DFieldLayout
|
||||||
|
#define H5CloseFile H5PartCloseFile
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int rank, nprocs;
|
||||||
|
h5part_float64_t ex[DATASIZE];
|
||||||
|
h5part_float64_t ey[DATASIZE];
|
||||||
|
h5part_float64_t ez[DATASIZE];
|
||||||
|
h5part_float64_t q[DATASIZE];
|
||||||
|
h5part_int64_t nparticles = DATASIZE;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
file = H5OpenFileParallel("fields.h5", H5PART_WRITE, MPI_COMM_WORLD);
|
||||||
|
H5SetStep(file, 0);
|
||||||
|
H5Block3dSetLayout(file,
|
||||||
|
rank*XSIZE, (rank+1)*XSIZE - 1,
|
||||||
|
0, YSIZE - 1,
|
||||||
|
0, ZSIZE - 1);
|
||||||
|
H5Block3dWriteScalarFieldFloat64(file, "Q", q);
|
||||||
|
H5Block3dWrite3dVectorFieldFloat64(file, "E", ex, ez, ey);
|
||||||
|
H5CloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define DATASIZE 32
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int rank, nprocs;
|
||||||
|
h5part_float64_t x[DATASIZE];
|
||||||
|
h5part_float64_t y[DATASIZE];
|
||||||
|
h5part_float64_t z[DATASIZE];
|
||||||
|
h5part_float64_t px[DATASIZE];
|
||||||
|
h5part_float64_t py[DATASIZE];
|
||||||
|
h5part_float64_t pz[DATASIZE];
|
||||||
|
h5part_int64_t nparticles = DATASIZE;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
file = H5PartOpenFileParallel("particles.h5", H5PART_WRITE, MPI_COMM_WORLD);
|
||||||
|
H5PartSetStep(file, 0);
|
||||||
|
H5PartSetNumParticles(file, nparticles);
|
||||||
|
H5PartWriteDataFloat64(file, "x", x);
|
||||||
|
H5PartWriteDataFloat64(file, "y", y);
|
||||||
|
H5PartWriteDataFloat64(file, "z", z);
|
||||||
|
H5PartWriteDataFloat64(file, "px", px);
|
||||||
|
H5PartWriteDataFloat64(file, "py", py);
|
||||||
|
H5PartWriteDataFloat64(file, "pz", pz);
|
||||||
|
H5PartCloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -8,12 +8,15 @@ program H5PartTest
|
|||||||
integer*8 :: file_id, status, npoints, i
|
integer*8 :: file_id, status, npoints, i
|
||||||
real*8, allocatable :: particles(:)
|
real*8, allocatable :: particles(:)
|
||||||
integer*8, allocatable :: id(:)
|
integer*8, allocatable :: id(:)
|
||||||
|
real*8 :: r8val
|
||||||
|
integer*8 :: i8val
|
||||||
|
|
||||||
comm = MPI_COMM_WORLD
|
comm = MPI_COMM_WORLD
|
||||||
call mpi_init(ierr)
|
call mpi_init(ierr)
|
||||||
call mpi_comm_rank(comm, rank, ierr)
|
call mpi_comm_rank(comm, rank, ierr)
|
||||||
|
|
||||||
! open the a file for parallel writing
|
! open the a file for parallel writing
|
||||||
|
file_id = h5pt_set_verbosity_level(5)
|
||||||
file_id = h5pt_openw_par('test.h5', comm)
|
file_id = h5pt_openw_par('test.h5', comm)
|
||||||
|
|
||||||
! in the Fortran API, time steps start at 1
|
! in the Fortran API, time steps start at 1
|
||||||
@@ -22,6 +25,10 @@ program H5PartTest
|
|||||||
! write an attribute to the file
|
! write an attribute to the file
|
||||||
status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.')
|
status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.')
|
||||||
|
|
||||||
|
r8val = 0.5
|
||||||
|
i8val = 1
|
||||||
|
status = h5pt_writefileattrib_r8(file_id, 'double', r8val, i8val)
|
||||||
|
|
||||||
! create fake data
|
! create fake data
|
||||||
npoints = 99
|
npoints = 99
|
||||||
allocate(particles(npoints), id(npoints))
|
allocate(particles(npoints), id(npoints))
|
||||||
|
|||||||
+40
-56
@@ -199,7 +199,7 @@ _H5Part_open_file (
|
|||||||
{
|
{
|
||||||
/* extend the btree size so that metadata pieces are
|
/* extend the btree size so that metadata pieces are
|
||||||
* close to the alignment value */
|
* close to the alignment value */
|
||||||
if ( align > 0 )
|
if ( align > 16384 )
|
||||||
{
|
{
|
||||||
unsigned int btree_ik = (align - 4096) / 96;
|
unsigned int btree_ik = (align - 4096) / 96;
|
||||||
unsigned int btree_bytes = 64 + 96*btree_ik;
|
unsigned int btree_bytes = 64 + 96*btree_ik;
|
||||||
@@ -252,7 +252,7 @@ _H5Part_open_file (
|
|||||||
}
|
}
|
||||||
} else if (flags & H5PART_VFD_CORE) {
|
} else if (flags & H5PART_VFD_CORE) {
|
||||||
_H5Part_print_info ( "Selecting CORE VFD" );
|
_H5Part_print_info ( "Selecting CORE VFD" );
|
||||||
if (H5Pset_fapl_core ( f->access_prop, comm, 0 ) < 0) {
|
if (H5Pset_fapl_core ( f->access_prop, align, 1 ) < 0) {
|
||||||
HANDLE_H5P_SET_FAPL_ERR;
|
HANDLE_H5P_SET_FAPL_ERR;
|
||||||
goto error_cleanup;
|
goto error_cleanup;
|
||||||
}
|
}
|
||||||
@@ -713,7 +713,11 @@ _set_num_particles (
|
|||||||
register int i;
|
register int i;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
if ( nparticles < 0 )
|
||||||
|
#else
|
||||||
if ( nparticles <= 0 )
|
if ( nparticles <= 0 )
|
||||||
|
#endif
|
||||||
return HANDLE_H5PART_INVALID_ERR ( "nparticles", nparticles );
|
return HANDLE_H5PART_INVALID_ERR ( "nparticles", nparticles );
|
||||||
|
|
||||||
/* prevent invalid stride value */
|
/* prevent invalid stride value */
|
||||||
@@ -726,6 +730,8 @@ _set_num_particles (
|
|||||||
stride = (hsize_t) _stride;
|
stride = (hsize_t) _stride;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( nparticles == 0 ) stride = 1;
|
||||||
|
|
||||||
#ifndef PARALLEL_IO
|
#ifndef PARALLEL_IO
|
||||||
/*
|
/*
|
||||||
if we are not using parallel-IO, there is enough information
|
if we are not using parallel-IO, there is enough information
|
||||||
@@ -751,11 +757,14 @@ _set_num_particles (
|
|||||||
|
|
||||||
f->nparticles = (hsize_t) nparticles;
|
f->nparticles = (hsize_t) nparticles;
|
||||||
|
|
||||||
/* declare local memory datasize with striding */
|
if ( f->nparticles > 0 )
|
||||||
count = f->nparticles * stride;
|
{
|
||||||
f->memshape = H5Screate_simple ( 1, &count, &dmax );
|
/* declare local memory datasize with striding */
|
||||||
if ( f->memshape < 0 )
|
count = f->nparticles * stride;
|
||||||
return HANDLE_H5S_CREATE_SIMPLE_ERR ( f->nparticles );
|
f->memshape = H5Screate_simple ( 1, &count, &dmax );
|
||||||
|
if ( f->memshape < 0 )
|
||||||
|
return HANDLE_H5S_CREATE_SIMPLE_ERR ( f->nparticles );
|
||||||
|
}
|
||||||
|
|
||||||
/* we need a hyperslab selection if there is striding
|
/* we need a hyperslab selection if there is striding
|
||||||
* (otherwise, the default H5S_ALL selection is ok)
|
* (otherwise, the default H5S_ALL selection is ok)
|
||||||
@@ -796,7 +805,7 @@ _set_num_particles (
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
ret = MPI_Allgather (
|
ret = MPI_Allgather (
|
||||||
&nparticles, 1, MPI_LONG_LONG,
|
(void*)&nparticles, 1, MPI_LONG_LONG,
|
||||||
f->pnparticles, 1, MPI_LONG_LONG,
|
f->pnparticles, 1, MPI_LONG_LONG,
|
||||||
f->comm );
|
f->comm );
|
||||||
if ( ret != MPI_SUCCESS) return HANDLE_MPI_ALLGATHER_ERR;
|
if ( ret != MPI_SUCCESS) return HANDLE_MPI_ALLGATHER_ERR;
|
||||||
@@ -833,12 +842,16 @@ _set_num_particles (
|
|||||||
|
|
||||||
count = nparticles;
|
count = nparticles;
|
||||||
stride = 1;
|
stride = 1;
|
||||||
herr = H5Sselect_hyperslab (
|
if ( count > 0 ) {
|
||||||
f->diskshape,
|
herr = H5Sselect_hyperslab (
|
||||||
H5S_SELECT_SET,
|
f->diskshape,
|
||||||
&start,
|
H5S_SELECT_SET,
|
||||||
&stride,
|
&start,
|
||||||
&count, NULL );
|
&stride,
|
||||||
|
&count, NULL );
|
||||||
|
} else {
|
||||||
|
herr = H5Sselect_none ( f->diskshape );
|
||||||
|
}
|
||||||
if ( herr < 0 ) return HANDLE_H5S_SELECT_HYPERSLAB_ERR;
|
if ( herr < 0 ) return HANDLE_H5S_SELECT_HYPERSLAB_ERR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1634,9 +1647,9 @@ H5PartWriteStepAttrib (
|
|||||||
h5part_int64_t herr = _H5Part_write_step_attrib (
|
h5part_int64_t herr = _H5Part_write_step_attrib (
|
||||||
f,
|
f,
|
||||||
name,
|
name,
|
||||||
(const hid_t)type,
|
(hid_t)type,
|
||||||
data,
|
data,
|
||||||
nelem );
|
(hsize_t)nelem );
|
||||||
if ( herr < 0 ) return herr;
|
if ( herr < 0 ) return herr;
|
||||||
|
|
||||||
return H5PART_SUCCESS;
|
return H5PART_SUCCESS;
|
||||||
@@ -1678,9 +1691,9 @@ H5PartWriteFileAttrib (
|
|||||||
h5part_int64_t herr = _H5Part_write_file_attrib (
|
h5part_int64_t herr = _H5Part_write_file_attrib (
|
||||||
f,
|
f,
|
||||||
name,
|
name,
|
||||||
(const hid_t)type,
|
(hid_t)type,
|
||||||
data,
|
data,
|
||||||
nelem );
|
(hsize_t)nelem );
|
||||||
if ( herr < 0 ) return herr;
|
if ( herr < 0 ) return herr;
|
||||||
|
|
||||||
return H5PART_SUCCESS;
|
return H5PART_SUCCESS;
|
||||||
@@ -2269,7 +2282,12 @@ _H5Part_get_num_objects_matching_pattern (
|
|||||||
data.pattern = pattern;
|
data.pattern = pattern;
|
||||||
|
|
||||||
#ifdef H5PART_HAVE_HDF5_18
|
#ifdef H5PART_HAVE_HDF5_18
|
||||||
hid_t child_id = H5Gopen( group_id, group_name, H5P_DEFAULT );
|
hid_t child_id = H5Gopen( group_id, group_name
|
||||||
|
#ifndef H5_USE_16_API
|
||||||
|
, H5P_DEFAULT
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
if ( child_id < 0 ) return child_id;
|
if ( child_id < 0 ) return child_id;
|
||||||
herr = H5Literate( child_id, H5_INDEX_NAME, H5_ITER_INC, 0,
|
herr = H5Literate( child_id, H5_INDEX_NAME, H5_ITER_INC, 0,
|
||||||
_H5Part_iteration_operator2, &data );
|
_H5Part_iteration_operator2, &data );
|
||||||
@@ -2772,10 +2790,7 @@ _set_view (
|
|||||||
end==-1 to mean end of file
|
end==-1 to mean end of file
|
||||||
*/
|
*/
|
||||||
total = (hsize_t) _H5Part_get_num_particles ( f );
|
total = (hsize_t) _H5Part_get_num_particles ( f );
|
||||||
if ( total < 0 ) {
|
if ( total == 0 ) {
|
||||||
return HANDLE_H5PART_GET_NUM_PARTICLES_ERR ( total );
|
|
||||||
}
|
|
||||||
else if ( total == 0 ) {
|
|
||||||
/* No datasets have been created yet and no veiws are set.
|
/* No datasets have been created yet and no veiws are set.
|
||||||
* We have to leave the view empty because we don't know how
|
* We have to leave the view empty because we don't know how
|
||||||
* many particles there should be! */
|
* many particles there should be! */
|
||||||
@@ -2854,10 +2869,7 @@ _set_view_indices (
|
|||||||
end==-1 to mean end of file
|
end==-1 to mean end of file
|
||||||
*/
|
*/
|
||||||
total = (hsize_t) _H5Part_get_num_particles ( f );
|
total = (hsize_t) _H5Part_get_num_particles ( f );
|
||||||
if ( total < 0 ) {
|
if ( total == 0 ) {
|
||||||
return HANDLE_H5PART_GET_NUM_PARTICLES_ERR ( total );
|
|
||||||
}
|
|
||||||
else if ( total == 0 ) {
|
|
||||||
/* No datasets have been created yet and no veiws are set.
|
/* No datasets have been created yet and no veiws are set.
|
||||||
* We have to leave the view empty because we don't know how
|
* We have to leave the view empty because we don't know how
|
||||||
* many particles there should be! */
|
* many particles there should be! */
|
||||||
@@ -2982,34 +2994,6 @@ H5PartSetViewIndices (
|
|||||||
return _set_view_indices ( f, indices, nelems );
|
return _set_view_indices ( f, indices, nelems );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup h5part_model
|
|
||||||
|
|
||||||
In MPI-IO collective mode, all MPI tasks must participate in I/O
|
|
||||||
operations. \c H5PartSetViewEmpty() allows a task to participate
|
|
||||||
but with an empty view of the file, so that it contributes no data
|
|
||||||
to the I/O operation.
|
|
||||||
|
|
||||||
\return \c H5PART_SUCCESS or error code
|
|
||||||
*/
|
|
||||||
h5part_int64_t
|
|
||||||
H5PartSetViewEmpty (
|
|
||||||
H5PartFile *f /*!< [in] Handle to open file */
|
|
||||||
) {
|
|
||||||
|
|
||||||
SET_FNAME ( "H5PartSetViewEmpty" );
|
|
||||||
|
|
||||||
CHECK_FILEHANDLE( f );
|
|
||||||
|
|
||||||
if ( f->timegroup < 0 ) {
|
|
||||||
h5part_int64_t herr = _H5Part_set_step ( f, 0 );
|
|
||||||
if ( herr < 0 ) return herr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* using a null indices list will set an empty view */
|
|
||||||
return _set_view_indices ( f, NULL, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5part_model
|
\ingroup h5part_model
|
||||||
|
|
||||||
@@ -3157,7 +3141,7 @@ _read_data (
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
h5part_int64_t herr;
|
h5part_int64_t herr;
|
||||||
hsize_t ndisk, nread, nmem;
|
hssize_t ndisk, nread, nmem;
|
||||||
hid_t dataset_id;
|
hid_t dataset_id;
|
||||||
hid_t space_id;
|
hid_t space_id;
|
||||||
hid_t memspace_id;
|
hid_t memspace_id;
|
||||||
|
|||||||
@@ -265,14 +265,6 @@ INTEGER*8 FUNCTION h5pt_setview_indices (filehandle,indices,nelem)
|
|||||||
INTEGER*8, INTENT(IN) :: nelem !< number of particles in the list
|
INTEGER*8, INTENT(IN) :: nelem !< number of particles in the list
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
!> \ingroup h5partf_model
|
|
||||||
!! See \ref H5PartSetViewEmpty
|
|
||||||
!! \return 0 on success or error code
|
|
||||||
!<
|
|
||||||
INTEGER*8 FUNCTION h5pt_setview_empty (filehandle)
|
|
||||||
INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open
|
|
||||||
END FUNCTION
|
|
||||||
|
|
||||||
!> \ingroup h5partf_model
|
!> \ingroup h5partf_model
|
||||||
!! See \ref H5PartResetView
|
!! See \ref H5PartResetView
|
||||||
!! \return 0 on success or error code
|
!! \return 0 on success or error code
|
||||||
|
|||||||
@@ -220,11 +220,6 @@ H5PartSetViewIndices (
|
|||||||
h5part_int64_t nelems /*!< [in] Size of list */
|
h5part_int64_t nelems /*!< [in] Size of list */
|
||||||
);
|
);
|
||||||
|
|
||||||
h5part_int64_t
|
|
||||||
H5PartSetViewEmpty (
|
|
||||||
H5PartFile *f
|
|
||||||
);
|
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
H5PartGetView (
|
H5PartGetView (
|
||||||
H5PartFile *f,
|
H5PartFile *f,
|
||||||
|
|||||||
+30
-30
@@ -23,7 +23,7 @@ h5pt_writefileattrib_r8 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float64_t *data,
|
const h5part_float64_t *data,
|
||||||
const h5part_float64_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -39,9 +39,9 @@ h5pt_writefileattrib_r8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_r8 F77NAME ( \
|
#define h5pt_readfileattrib_r8 F77NAME ( \
|
||||||
h5pt_writefileattrib_r8_, \
|
h5pt_readfileattrib_r8_, \
|
||||||
H5PT_WRITEFILEATTRIB_R8 )
|
H5PT_READFILEATTRIB_R8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -74,7 +74,7 @@ h5pt_writefileattrib_r4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float32_t *data,
|
const h5part_float32_t *data,
|
||||||
const h5part_float32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -90,9 +90,9 @@ h5pt_writefileattrib_r4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_r4 F77NAME ( \
|
#define h5pt_readfileattrib_r4 F77NAME ( \
|
||||||
h5pt_writefileattrib_r4_, \
|
h5pt_readfileattrib_r4_, \
|
||||||
H5PT_WRITEFILEATTRIB_R4 )
|
H5PT_READFILEATTRIB_R4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -141,9 +141,9 @@ h5pt_writefileattrib_i8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_i8 F77NAME ( \
|
#define h5pt_readfileattrib_i8 F77NAME ( \
|
||||||
h5pt_writefileattrib_i8_, \
|
h5pt_readfileattrib_i8_, \
|
||||||
H5PT_WRITEFILEATTRIB_I8 )
|
H5PT_READFILEATTRIB_I8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -176,7 +176,7 @@ h5pt_writefileattrib_i4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_int32_t *data,
|
const h5part_int32_t *data,
|
||||||
const h5part_int32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -192,9 +192,9 @@ h5pt_writefileattrib_i4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_i4 F77NAME ( \
|
#define h5pt_readfileattrib_i4 F77NAME ( \
|
||||||
h5pt_writefileattrib_i4_, \
|
h5pt_readfileattrib_i4_, \
|
||||||
H5PT_WRITEFILEATTRIB_I4 )
|
H5PT_READFILEATTRIB_I4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -227,7 +227,7 @@ h5pt_writestepattrib_r8 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float64_t *data,
|
const h5part_float64_t *data,
|
||||||
const h5part_float64_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -243,9 +243,9 @@ h5pt_writestepattrib_r8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_r8 F77NAME ( \
|
#define h5pt_readstepattrib_r8 F77NAME ( \
|
||||||
h5pt_writestepattrib_r8_, \
|
h5pt_readstepattrib_r8_, \
|
||||||
H5PT_WRITESTEPATTRIB_R8 )
|
H5PT_READSTEPATTRIB_R8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -278,7 +278,7 @@ h5pt_writestepattrib_r4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float32_t *data,
|
const h5part_float32_t *data,
|
||||||
const h5part_float32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -294,9 +294,9 @@ h5pt_writestepattrib_r4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_r4 F77NAME ( \
|
#define h5pt_readstepattrib_r4 F77NAME ( \
|
||||||
h5pt_writestepattrib_r4_, \
|
h5pt_readstepattrib_r4_, \
|
||||||
H5PT_WRITESTEPATTRIB_R4 )
|
H5PT_READSTEPATTRIB_R4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -345,9 +345,9 @@ h5pt_writestepattrib_i8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_i8 F77NAME ( \
|
#define h5pt_readstepattrib_i8 F77NAME ( \
|
||||||
h5pt_writestepattrib_i8_, \
|
h5pt_readstepattrib_i8_, \
|
||||||
H5PT_WRITESTEPATTRIB_I8 )
|
H5PT_READSTEPATTRIB_I8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -380,7 +380,7 @@ h5pt_writestepattrib_i4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_int32_t *data,
|
const h5part_int32_t *data,
|
||||||
const h5part_int32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -396,9 +396,9 @@ h5pt_writestepattrib_i4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_i4 F77NAME ( \
|
#define h5pt_readstepattrib_i4 F77NAME ( \
|
||||||
h5pt_writestepattrib_i4_, \
|
h5pt_readstepattrib_i4_, \
|
||||||
H5PT_WRITESTEPATTRIB_I4 )
|
H5PT_READSTEPATTRIB_I4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
|
|||||||
@@ -100,9 +100,6 @@
|
|||||||
#define h5pt_setview_indices F77NAME ( \
|
#define h5pt_setview_indices F77NAME ( \
|
||||||
h5pt_setview_indices_, \
|
h5pt_setview_indices_, \
|
||||||
H5PT_SETVIEW_INDICES )
|
H5PT_SETVIEW_INDICES )
|
||||||
#define h5pt_setview_empty F77NAME ( \
|
|
||||||
h5pt_setview_empty_, \
|
|
||||||
H5PT_SETVIEW_EMPTY )
|
|
||||||
#define h5pt_resetview F77NAME ( \
|
#define h5pt_resetview F77NAME ( \
|
||||||
h5pt_resetview_, \
|
h5pt_resetview_, \
|
||||||
H5PT_RESETVIEW )
|
H5PT_RESETVIEW )
|
||||||
@@ -641,16 +638,6 @@ h5pt_setview_indices (
|
|||||||
return H5PartSetViewIndices ( filehandle, indices, *nelem );
|
return H5PartSetViewIndices ( filehandle, indices, *nelem );
|
||||||
}
|
}
|
||||||
|
|
||||||
h5part_int64_t
|
|
||||||
h5pt_setview_empty (
|
|
||||||
const h5part_int64_t *f
|
|
||||||
) {
|
|
||||||
|
|
||||||
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
|
|
||||||
|
|
||||||
return H5PartSetViewEmpty ( filehandle );
|
|
||||||
}
|
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
h5pt_resetview (
|
h5pt_resetview (
|
||||||
const h5part_int64_t *f
|
const h5part_int64_t *f
|
||||||
|
|||||||
+1
-3
@@ -19,11 +19,9 @@ __attribute__ ((format (printf, 3, 4)))
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
#ifndef MPI_INCLUDED
|
#ifndef PARALLEL_IO
|
||||||
#ifndef OPEN_MPI
|
|
||||||
typedef unsigned long MPI_Comm;
|
typedef unsigned long MPI_Comm;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#define H5PART_STEPNAME_LEN 64
|
#define H5PART_STEPNAME_LEN 64
|
||||||
#define H5PART_DATANAME_LEN 64
|
#define H5PART_DATANAME_LEN 64
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV# (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_#TYPE_H5P#_t *data,
|
const h5part_#TYPE_H5P#_t *data,
|
||||||
const h5part_#TYPE_H5P#_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -143,9 +143,9 @@ END FUNCTION
|
|||||||
|
|
||||||
read_attr_fc = """
|
read_attr_fc = """
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV# F77NAME ( \\
|
#define h5pt_read#LEVELLC#attrib_#TYPE_F90_ABV# F77NAME ( \\
|
||||||
h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV#_, \\
|
h5pt_read#LEVELLC#attrib_#TYPE_F90_ABV#_, \\
|
||||||
H5PT_WRITE#LEVELUC#ATTRIB_#TYPE_F90_ABVC# )
|
H5PT_READ#LEVELUC#ATTRIB_#TYPE_F90_ABVC# )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
|
|||||||
Reference in New Issue
Block a user