Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
H5hut
src
Commits
d368a602
Commit
d368a602
authored
Jul 28, 2010
by
Marc Howison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes in Fortran API for 1.6.2
parent
6b4b556f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
74 deletions
+70
-74
NEWS
NEWS
+13
-0
configure.ac
configure.ac
+1
-1
examples/simplef.F90
examples/simplef.F90
+7
-0
src/H5Part.c
src/H5Part.c
+14
-15
src/H5Part.f90
src/H5Part.f90
+0
-8
src/H5PartAttribF.c
src/H5PartAttribF.c
+30
-30
src/H5PartF.c
src/H5PartF.c
+0
-13
src/H5PartTypes.h
src/H5PartTypes.h
+1
-3
src/generate-attr.py
src/generate-attr.py
+4
-4
No files found.
NEWS
View file @
d368a602
#### 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 ############################################################
Chunking in the H5Part API
...
...
configure.ac
View file @
d368a602
# Every configure script must call AC_INIT before doing anything else.
# 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.
...
...
examples/simplef.F90
View file @
d368a602
...
...
@@ -8,12 +8,15 @@ program H5PartTest
integer
*
8
::
file_id
,
status
,
npoints
,
i
real
*
8
,
allocatable
::
particles
(:)
integer
*
8
,
allocatable
::
id
(:)
real
*
8
::
r8val
integer
*
8
::
i8val
comm
=
MPI_COMM_WORLD
call
mpi_init
(
ierr
)
call
mpi_comm_rank
(
comm
,
rank
,
ierr
)
! open the a file for parallel writing
file_id
=
h5pt_set_verbosity_level
(
5
)
file_id
=
h5pt_openw_par
(
'test.h5'
,
comm
)
! in the Fortran API, time steps start at 1
...
...
@@ -22,6 +25,10 @@ program H5PartTest
! write an attribute to the file
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
npoints
=
99
allocate
(
particles
(
npoints
),
id
(
npoints
))
...
...
src/H5Part.c
View file @
d368a602
...
...
@@ -199,7 +199,7 @@ _H5Part_open_file (
{
/* extend the btree size so that metadata pieces are
* close to the alignment value */
if
(
align
>
0
)
if
(
align
>
16384
)
{
unsigned
int
btree_ik
=
(
align
-
4096
)
/
96
;
unsigned
int
btree_bytes
=
64
+
96
*
btree_ik
;
...
...
@@ -1647,9 +1647,9 @@ H5PartWriteStepAttrib (
h5part_int64_t
herr
=
_H5Part_write_step_attrib
(
f
,
name
,
(
const
hid_t
)
type
,
(
hid_t
)
type
,
data
,
nelem
);
(
hsize_t
)
nelem
);
if
(
herr
<
0
)
return
herr
;
return
H5PART_SUCCESS
;
...
...
@@ -1691,9 +1691,9 @@ H5PartWriteFileAttrib (
h5part_int64_t
herr
=
_H5Part_write_file_attrib
(
f
,
name
,
(
const
hid_t
)
type
,
(
hid_t
)
type
,
data
,
nelem
);
(
hsize_t
)
nelem
);
if
(
herr
<
0
)
return
herr
;
return
H5PART_SUCCESS
;
...
...
@@ -2282,7 +2282,12 @@ _H5Part_get_num_objects_matching_pattern (
data
.
pattern
=
pattern
;
#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
;
herr
=
H5Literate
(
child_id
,
H5_INDEX_NAME
,
H5_ITER_INC
,
0
,
_H5Part_iteration_operator2
,
&
data
);
...
...
@@ -2785,10 +2790,7 @@ _set_view (
end==-1 to mean end of file
*/
total
=
(
hsize_t
)
_H5Part_get_num_particles
(
f
);
if
(
total
<
0
)
{
return
HANDLE_H5PART_GET_NUM_PARTICLES_ERR
(
total
);
}
else
if
(
total
==
0
)
{
if
(
total
==
0
)
{
/* No datasets have been created yet and no veiws are set.
* We have to leave the view empty because we don't know how
* many particles there should be! */
...
...
@@ -2867,10 +2869,7 @@ _set_view_indices (
end==-1 to mean end of file
*/
total
=
(
hsize_t
)
_H5Part_get_num_particles
(
f
);
if
(
total
<
0
)
{
return
HANDLE_H5PART_GET_NUM_PARTICLES_ERR
(
total
);
}
else
if
(
total
==
0
)
{
if
(
total
==
0
)
{
/* No datasets have been created yet and no veiws are set.
* We have to leave the view empty because we don't know how
* many particles there should be! */
...
...
@@ -3142,7 +3141,7 @@ _read_data (
)
{
h5part_int64_t
herr
;
hsize_t
ndisk
,
nread
,
nmem
;
hs
s
ize_t
ndisk
,
nread
,
nmem
;
hid_t
dataset_id
;
hid_t
space_id
;
hid_t
memspace_id
;
...
...
src/H5Part.f90
View file @
d368a602
...
...
@@ -265,14 +265,6 @@ INTEGER*8 FUNCTION h5pt_setview_indices (filehandle,indices,nelem)
INTEGER
*
8
,
INTENT
(
IN
)
::
nelem
!< number of particles in the list
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
!! See \ref H5PartResetView
!! \return 0 on success or error code
...
...
src/H5PartAttribF.c
View file @
d368a602
...
...
@@ -23,7 +23,7 @@ h5pt_writefileattrib_r8 (
h5part_int64_t
*
f
,
const
char
*
name
,
const
h5part_float64_t
*
data
,
const
h5part_
floa
t64_t
*
nelem
,
const
h5part_
in
t64_t
*
nelem
,
const
int
l_name
)
{
...
...
@@ -39,9 +39,9 @@ h5pt_writefileattrib_r8 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
fileattrib_r8 F77NAME ( \
h5pt_
write
fileattrib_r8_, \
H5PT_
WRITE
FILEATTRIB_R8 )
#define h5pt_
read
fileattrib_r8 F77NAME ( \
h5pt_
read
fileattrib_r8_, \
H5PT_
READ
FILEATTRIB_R8 )
#endif
h5part_int64_t
...
...
@@ -74,7 +74,7 @@ h5pt_writefileattrib_r4 (
h5part_int64_t
*
f
,
const
char
*
name
,
const
h5part_float32_t
*
data
,
const
h5part_
float32
_t
*
nelem
,
const
h5part_
int64
_t
*
nelem
,
const
int
l_name
)
{
...
...
@@ -90,9 +90,9 @@ h5pt_writefileattrib_r4 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
fileattrib_r4 F77NAME ( \
h5pt_
write
fileattrib_r4_, \
H5PT_
WRITE
FILEATTRIB_R4 )
#define h5pt_
read
fileattrib_r4 F77NAME ( \
h5pt_
read
fileattrib_r4_, \
H5PT_
READ
FILEATTRIB_R4 )
#endif
h5part_int64_t
...
...
@@ -141,9 +141,9 @@ h5pt_writefileattrib_i8 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
fileattrib_i8 F77NAME ( \
h5pt_
write
fileattrib_i8_, \
H5PT_
WRITE
FILEATTRIB_I8 )
#define h5pt_
read
fileattrib_i8 F77NAME ( \
h5pt_
read
fileattrib_i8_, \
H5PT_
READ
FILEATTRIB_I8 )
#endif
h5part_int64_t
...
...
@@ -176,7 +176,7 @@ h5pt_writefileattrib_i4 (
h5part_int64_t
*
f
,
const
char
*
name
,
const
h5part_int32_t
*
data
,
const
h5part_int
32
_t
*
nelem
,
const
h5part_int
64
_t
*
nelem
,
const
int
l_name
)
{
...
...
@@ -192,9 +192,9 @@ h5pt_writefileattrib_i4 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
fileattrib_i4 F77NAME ( \
h5pt_
write
fileattrib_i4_, \
H5PT_
WRITE
FILEATTRIB_I4 )
#define h5pt_
read
fileattrib_i4 F77NAME ( \
h5pt_
read
fileattrib_i4_, \
H5PT_
READ
FILEATTRIB_I4 )
#endif
h5part_int64_t
...
...
@@ -227,7 +227,7 @@ h5pt_writestepattrib_r8 (
h5part_int64_t
*
f
,
const
char
*
name
,
const
h5part_float64_t
*
data
,
const
h5part_
floa
t64_t
*
nelem
,
const
h5part_
in
t64_t
*
nelem
,
const
int
l_name
)
{
...
...
@@ -243,9 +243,9 @@ h5pt_writestepattrib_r8 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
stepattrib_r8 F77NAME ( \
h5pt_
write
stepattrib_r8_, \
H5PT_
WRITE
STEPATTRIB_R8 )
#define h5pt_
read
stepattrib_r8 F77NAME ( \
h5pt_
read
stepattrib_r8_, \
H5PT_
READ
STEPATTRIB_R8 )
#endif
h5part_int64_t
...
...
@@ -278,7 +278,7 @@ h5pt_writestepattrib_r4 (
h5part_int64_t
*
f
,
const
char
*
name
,
const
h5part_float32_t
*
data
,
const
h5part_
float32
_t
*
nelem
,
const
h5part_
int64
_t
*
nelem
,
const
int
l_name
)
{
...
...
@@ -294,9 +294,9 @@ h5pt_writestepattrib_r4 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
stepattrib_r4 F77NAME ( \
h5pt_
write
stepattrib_r4_, \
H5PT_
WRITE
STEPATTRIB_R4 )
#define h5pt_
read
stepattrib_r4 F77NAME ( \
h5pt_
read
stepattrib_r4_, \
H5PT_
READ
STEPATTRIB_R4 )
#endif
h5part_int64_t
...
...
@@ -345,9 +345,9 @@ h5pt_writestepattrib_i8 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
stepattrib_i8 F77NAME ( \
h5pt_
write
stepattrib_i8_, \
H5PT_
WRITE
STEPATTRIB_I8 )
#define h5pt_
read
stepattrib_i8 F77NAME ( \
h5pt_
read
stepattrib_i8_, \
H5PT_
READ
STEPATTRIB_I8 )
#endif
h5part_int64_t
...
...
@@ -380,7 +380,7 @@ h5pt_writestepattrib_i4 (
h5part_int64_t
*
f
,
const
char
*
name
,
const
h5part_int32_t
*
data
,
const
h5part_int
32
_t
*
nelem
,
const
h5part_int
64
_t
*
nelem
,
const
int
l_name
)
{
...
...
@@ -396,9 +396,9 @@ h5pt_writestepattrib_i4 (
}
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
stepattrib_i4 F77NAME ( \
h5pt_
write
stepattrib_i4_, \
H5PT_
WRITE
STEPATTRIB_I4 )
#define h5pt_
read
stepattrib_i4 F77NAME ( \
h5pt_
read
stepattrib_i4_, \
H5PT_
READ
STEPATTRIB_I4 )
#endif
h5part_int64_t
...
...
src/H5PartF.c
View file @
d368a602
...
...
@@ -100,9 +100,6 @@
#define h5pt_setview_indices F77NAME ( \
h5pt_setview_indices_, \
H5PT_SETVIEW_INDICES )
#define h5pt_setview_empty F77NAME ( \
h5pt_setview_empty_, \
H5PT_SETVIEW_EMPTY )
#define h5pt_resetview F77NAME ( \
h5pt_resetview_, \
H5PT_RESETVIEW )
...
...
@@ -641,16 +638,6 @@ h5pt_setview_indices (
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
h5pt_resetview
(
const
h5part_int64_t
*
f
...
...
src/H5PartTypes.h
View file @
d368a602
...
...
@@ -19,11 +19,9 @@ __attribute__ ((format (printf, 3, 4)))
#endif
;
#ifndef MPI_INCLUDED
#ifndef OPEN_MPI
#ifndef PARALLEL_IO
typedef
unsigned
long
MPI_Comm
;
#endif
#endif
#define H5PART_STEPNAME_LEN 64
#define H5PART_DATANAME_LEN 64
...
...
src/generate-attr.py
View file @
d368a602
...
...
@@ -113,7 +113,7 @@ h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV# (
h5part_int64_t *f,
const char *name,
const h5part_#TYPE_H5P#_t *data,
const h5part_
#TYPE_H5P#
_t *nelem,
const h5part_
int64
_t *nelem,
const int l_name
) {
...
...
@@ -143,9 +143,9 @@ END FUNCTION
read_attr_fc
=
"""
#if ! defined(F77_NO_UNDERSCORE)
#define h5pt_
write
#LEVELLC#attrib_#TYPE_F90_ABV# F77NAME (
\\
h5pt_
write
#LEVELLC#attrib_#TYPE_F90_ABV#_,
\\
H5PT_
WRITE
#LEVELUC#ATTRIB_#TYPE_F90_ABVC# )
#define h5pt_
read
#LEVELLC#attrib_#TYPE_F90_ABV# F77NAME (
\\
h5pt_
read
#LEVELLC#attrib_#TYPE_F90_ABV#_,
\\
H5PT_
READ
#LEVELUC#ATTRIB_#TYPE_F90_ABVC# )
#endif
h5part_int64_t
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment