From d5fce5b2a02839954c24ed393a18e360492b532d Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 3 Sep 2015 17:24:37 +0200 Subject: [PATCH] examples/H5Part/write_{setviewf,stridedf}.f90: - bugfixes: take Fortran indexing into account --- examples/H5Part/write_setviewf.f90 | 4 ++-- examples/H5Part/write_stridedf.f90 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/H5Part/write_setviewf.f90 b/examples/H5Part/write_setviewf.f90 index 7efb2d4..e1d1858 100644 --- a/examples/H5Part/write_setviewf.f90 +++ b/examples/H5Part/write_setviewf.f90 @@ -37,12 +37,12 @@ program write_setview ! create fake data allocate (data (npoints)) do i = 1, npoints - data (i) = i + rank*npoints + data (i) = (i-1) + rank*npoints enddo ! open the a file for parallel writing and ceate step #0 file = h5_openfile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT) - status = h5_setstep(file, 0_8) + status = h5_setstep(file, 1_8) ! set the size of the 1D array status = h5pt_setnpoints (file, int8(npoints)) diff --git a/examples/H5Part/write_stridedf.f90 b/examples/H5Part/write_stridedf.f90 index 98a125e..51e354a 100644 --- a/examples/H5Part/write_stridedf.f90 +++ b/examples/H5Part/write_stridedf.f90 @@ -43,7 +43,7 @@ program write_stridedf ! open the a file for parallel writing and ceate step #0 file = h5_openfile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT) - status = h5_setstep(file, 0_8) + status = h5_setstep(file, 1_8) ! define number of items this processor will write and set the ! in-memory striding