fortran problem with "h5ltget_dataset_info_f"

Hi,

I try to use the function "h5ltget_dataset_info_f" of the Lite API and
it doesn't work.
Unfortunatly, there is no example of this function in the hl/test directory.

I use GNU Fortran 95 (GCC) 4.1.1 20060724 (prerelease)
(4.1.1-3.1mdv2007.0) on Linux.

The signature of h5ltget_dataset_info_f is
- file id,
- dataset name,
- dataset dims,
- type class,
- type size,
- hdferr

The HDF5 file contains only a "/nodes" dataset of 15x3 real
dims is a (1 rank, dimension 2) array of integers.

With a static dims array (integer, dimension(2) :: dims), file_id seems
corrupted since HDF5 can't close the file correctly and the error output
is :
""""
HDF5-DIAG: Error detected in HDF5 (1.8.2) thread 0:
  #000: H5F.c line 2085 in H5Fclose(): not a file ID
    major: Invalid arguments to routine
    minor: Inappropriate type
h5fclose_f KO
make: *** [test_get_dataset_info] Erreur 4
""""

if dims is dynamic (integer, dimension(:), allocatable :: dims;
allocate(dims(2)),
the program crashes :
""""
        Dims : 15 3
*** glibc detected *** ./get_dataset_info: free(): invalid next size
(fast): 0x08071f78 ***
======= Backtrace: =========
/lib/i686/libc.so.6[0x40618d9d]
/lib/i686/libc.so.6(__libc_free+0x83)[0x40618f23]
/usr/lib/libgfortran.so.1(_gfortran_deallocate+0x32)[0x40516f82]
./get_dataset_info[0x8048e3e]
./get_dataset_info[0x8048f17]
/lib/i686/libc.so.6(__libc_start_main+0xdc)[0x405c975c]
./get_dataset_info[0x8048a81]
======= Memory map: ========
08048000-0804a000 r-xp 00000000 08:06 9385383
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/fortran_language/macro/get_dataset_info
0804a000-0804b000 rwxp 00001000 08:06 9385383
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/fortran_language/macro/get_dataset_info
0804b000-0808d000 rwxp 0804b000 00:00 0 [heap]
40000000-40018000 r-xp 00000000 08:01 939023 /lib/ld-2.4.so
40018000-40019000 r-xp 00017000 08:01 939023 /lib/ld-2.4.so
40019000-4001a000 rwxp 00018000 08:01 939023 /lib/ld-2.4.so
4001a000-4001b000 rwxp 4001a000 00:00 0
4001b000-4004d000 r-xp 00000000 08:06 8462742
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
4004d000-4004f000 rwxp 00031000 08:06 8462742
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
4004f000-40488000 r-xp 00000000 08:06 8462732
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5.so.6.0.1
40488000-4048d000 rwxp 00439000 08:06 8462732
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5.so.6.0.1
4048d000-4048e000 rwxp 4048d000 00:00 0
4048e000-4049a000 r-xp 00000000 08:06 8462757
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
4049a000-4049b000 rwxp 0000c000 08:06 8462757
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
4049b000-404b9000 r-xp 00000000 08:06 8462747
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_hl.so.0.0.0
404b9000-404ba000 rwxp 0001e000 08:06 8462747
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_hl.so.0.0.0
404ba000-404cc000 rwxp 404ba000 00:00 0
404cc000-404ee000 r-xp 00000000 08:06 8462762
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libmed.so.1.0.1
404ee000-404ef000 rwxp 00021000 08:06 8462762
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libmed.so.1.0.1
4050b000-40583000 r-xp 00000000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
40583000-40584000 rwxp 00078000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
40584000-405a7000 r-xp 00000000 08:01 939015 /lib/i686/libm-2.4.so
405a7000-405a9000 rwxp 00023000 08:01 939015 /lib/i686/libm-2.4.so
405a9000-405b3000 r-xp 00000000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
405b3000-405b4000 rwxp 0000a000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
405b4000-406db000 r-xp 00000000 08:01 939458 /lib/i686/libc-2.4.so
406db000-406dc000 r-xp 00126000 08:01 939458 /lib/i686/libc-2.4.so
406dc000-406de000 rwxp 00127000 08:01 939458 /lib/i686/libc-2.4.so
406de000-406e1000 rwxp 406de000 00:00 0
406e1000-406f3000 r-xp 00000000 08:01 939064 /lib/libz.so.1.2.3
406f3000-406f4000 rwxp 00011000 08:01 939064 /lib/libz.so.1.2.3
406f4000-406f5000 rwxp 406f4000 00:00 0
406f5000-40712000 r-xp 00000000 08:01 195607 /usr/lib/libg2c.so.0.0.0
40712000-40713000 rwxp 0001c000 08:01 195607 /usr/lib/libg2c.so.0.0.0
40713000-40758000 rwxp 40713000 00:00 0
40800000-40821000 rwxp 40800000 00:00 0
40821000-40900000 ---p 40821000 00:00 0
bfc35000-bfc4a000 rw-p bfc35000 00:00 0 [stack]
bfffe000-bffff000 r-xp bfffe000 00:00 0
make: *** [test_get_dataset_info] Abandon (vidange m�moire)
"""

Is there any known problems with this function ?

Thanks a lot,

Cyril.

Below is the fortran 90 program produces such results.

···

##############################
program get_dataset_info

! General hdf5 module
use hdf5
! API Lite module
use h5lt
! Table manipulation module
use h5tb
! Group manapulation module
use h5g

implicit none

integer :: hdferr
character(len=*), parameter :: filename = "mesh.h5"
integer(hid_t) :: file_id
integer :: type_class
integer(size_t) :: type_size

integer(hsize_t), dimension(:), allocatable :: dyn_dims
integer(hsize_t), dimension(2) :: stat_dims

! Library initialization (native types handling)
call h5open_f(hdferr)
if (hdferr < 0) then
    print *, "h5open_f KO"
    call exit(1)
end if

! Open the file in read only mode
call h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, hdferr, H5P_DEFAULT_F)
if (hdferr < 0) then
    print *, "h5fopen_f KO"
    call exit(2)
end if

! Read stat_dims
stat_dims = 0
call h5ltget_dataset_info_f(file_id, "nodes", stat_dims, &
                            type_class, type_size, hdferr)
if (hdferr < 0) then
    print *, "h5ltget_dataset_info_f ko"
    call exit(3)
end if
! print *, "\tstatic dims :", stat_dims

! Read dyn_dims
!allocate(dyn_dims(2))
!dyn_dims = 0
!call h5ltget_dataset_info_f(file_id, "nodes", dyn_dims, &
! type_class, type_size, hdferr)
! if (hdferr < 0) then
! print *, "h5ltget_dataset_info_f ko"
! call exit(3)
! end if
!print *, "\tDims :", dyn_dims
!deallocate(dyn_dims)

! Close the file
call h5fclose_f(file_id, hdferr)
if (hdferr < 0) then
    print *, "h5fclose_f KO"
    call exit(4)
end if

end program get_dataset_info

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

that function has a bug, the dimension arrays are not transposed (because of C-FORTRAN storage order, the FORTRAN function calls the C function with the same name)

I'll let you know when we have a HDF5 release snapshot for you to download (in the next couple of days), that will include examples of how to use the function

Pedro

Note to hdf-forum subscribers: when reporting bugs please send email also to help@hdfgroup.org

···

At 10:15 AM 3/19/2009, cyril giraudon wrote:

Hi,

I try to use the function "h5ltget_dataset_info_f" of the Lite API and
it doesn't work.
Unfortunatly, there is no example of this function in the hl/test directory.

I use GNU Fortran 95 (GCC) 4.1.1 20060724 (prerelease)
(4.1.1-3.1mdv2007.0) on Linux.

The signature of h5ltget_dataset_info_f is
- file id,
- dataset name,
- dataset dims,
- type class,
- type size,
- hdferr

The HDF5 file contains only a "/nodes" dataset of 15x3 real
dims is a (1 rank, dimension 2) array of integers.

With a static dims array (integer, dimension(2) :: dims), file_id seems
corrupted since HDF5 can't close the file correctly and the error output
is :
""""
HDF5-DIAG: Error detected in HDF5 (1.8.2) thread 0:
#000: H5F.c line 2085 in H5Fclose(): not a file ID
   major: Invalid arguments to routine
   minor: Inappropriate type
h5fclose_f KO
make: *** [test_get_dataset_info] Erreur 4
""""

if dims is dynamic (integer, dimension(:), allocatable :: dims;
allocate(dims(2)),
the program crashes :
""""
       Dims : 15 3
*** glibc detected *** ./get_dataset_info: free(): invalid next size
(fast): 0x08071f78 ***
======= Backtrace: =========
/lib/i686/libc.so.6[0x40618d9d]
/lib/i686/libc.so.6(__libc_free+0x83)[0x40618f23]
/usr/lib/libgfortran.so.1(_gfortran_deallocate+0x32)[0x40516f82]
./get_dataset_info[0x8048e3e]
./get_dataset_info[0x8048f17]
/lib/i686/libc.so.6(__libc_start_main+0xdc)[0x405c975c]
./get_dataset_info[0x8048a81]
======= Memory map: ========
08048000-0804a000 r-xp 00000000 08:06 9385383
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/fortran_language/macro/get_dataset_info
0804a000-0804b000 rwxp 00001000 08:06 9385383
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/fortran_language/macro/get_dataset_info
0804b000-0808d000 rwxp 0804b000 00:00 0 [heap]
40000000-40018000 r-xp 00000000 08:01 939023 /lib/ld-2.4.so
40018000-40019000 r-xp 00017000 08:01 939023 /lib/ld-2.4.so
40019000-4001a000 rwxp 00018000 08:01 939023 /lib/ld-2.4.so
4001a000-4001b000 rwxp 4001a000 00:00 0
4001b000-4004d000 r-xp 00000000 08:06 8462742
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
4004d000-4004f000 rwxp 00031000 08:06 8462742
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
4004f000-40488000 r-xp 00000000 08:06 8462732
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5.so.6.0.1
40488000-4048d000 rwxp 00439000 08:06 8462732
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5.so.6.0.1
4048d000-4048e000 rwxp 4048d000 00:00 0
4048e000-4049a000 r-xp 00000000 08:06 8462757
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
4049a000-4049b000 rwxp 0000c000 08:06 8462757
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
4049b000-404b9000 r-xp 00000000 08:06 8462747
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_hl.so.0.0.0
404b9000-404ba000 rwxp 0001e000 08:06 8462747
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_hl.so.0.0.0
404ba000-404cc000 rwxp 404ba000 00:00 0
404cc000-404ee000 r-xp 00000000 08:06 8462762
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libmed.so.1.0.1
404ee000-404ef000 rwxp 00021000 08:06 8462762
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libmed.so.1.0.1
4050b000-40583000 r-xp 00000000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
40583000-40584000 rwxp 00078000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
40584000-405a7000 r-xp 00000000 08:01 939015 /lib/i686/libm-2.4.so
405a7000-405a9000 rwxp 00023000 08:01 939015 /lib/i686/libm-2.4.so
405a9000-405b3000 r-xp 00000000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
405b3000-405b4000 rwxp 0000a000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
405b4000-406db000 r-xp 00000000 08:01 939458 /lib/i686/libc-2.4.so
406db000-406dc000 r-xp 00126000 08:01 939458 /lib/i686/libc-2.4.so
406dc000-406de000 rwxp 00127000 08:01 939458 /lib/i686/libc-2.4.so
406de000-406e1000 rwxp 406de000 00:00 0
406e1000-406f3000 r-xp 00000000 08:01 939064 /lib/libz.so.1.2.3
406f3000-406f4000 rwxp 00011000 08:01 939064 /lib/libz.so.1.2.3
406f4000-406f5000 rwxp 406f4000 00:00 0
406f5000-40712000 r-xp 00000000 08:01 195607 /usr/lib/libg2c.so.0.0.0
40712000-40713000 rwxp 0001c000 08:01 195607 /usr/lib/libg2c.so.0.0.0
40713000-40758000 rwxp 40713000 00:00 0
40800000-40821000 rwxp 40800000 00:00 0
40821000-40900000 ---p 40821000 00:00 0
bfc35000-bfc4a000 rw-p bfc35000 00:00 0 [stack]
bfffe000-bffff000 r-xp bfffe000 00:00 0
make: *** [test_get_dataset_info] Abandon (vidange mémoire)
"""

Is there any known problems with this function ?

Thanks a lot,

Cyril.

Below is the fortran 90 program produces such results.

##############################
program get_dataset_info

! General hdf5 module
use hdf5
! API Lite module
use h5lt
! Table manipulation module
use h5tb
! Group manapulation module
use h5g

implicit none

integer :: hdferr
character(len=*), parameter :: filename = "mesh.h5"
integer(hid_t) :: file_id
integer :: type_class
integer(size_t) :: type_size

integer(hsize_t), dimension(:), allocatable :: dyn_dims
integer(hsize_t), dimension(2) :: stat_dims

! Library initialization (native types handling)
call h5open_f(hdferr)
if (hdferr < 0) then
   print *, "h5open_f KO"
   call exit(1)
end if

! Open the file in read only mode
call h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, hdferr, H5P_DEFAULT_F)
if (hdferr < 0) then
   print *, "h5fopen_f KO"
   call exit(2)
end if

! Read stat_dims
stat_dims = 0
call h5ltget_dataset_info_f(file_id, "nodes", stat_dims, &
                           type_class, type_size, hdferr)
if (hdferr < 0) then
   print *, "h5ltget_dataset_info_f ko"
   call exit(3)
end if
! print *, "\tstatic dims :", stat_dims

! Read dyn_dims
!allocate(dyn_dims(2))
!dyn_dims = 0
!call h5ltget_dataset_info_f(file_id, "nodes", dyn_dims, &
! type_class, type_size, hdferr)
! if (hdferr < 0) then
! print *, "h5ltget_dataset_info_f ko"
! call exit(3)
! end if
!print *, "\tDims :", dyn_dims
!deallocate(dyn_dims)

! Close the file
call h5fclose_f(file_id, hdferr)
if (hdferr < 0) then
   print *, "h5fclose_f KO"
   call exit(4)
end if

end program get_dataset_info

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

--------------------------------------------------------------
Pedro Vicente (T) 217.265-0311
pvn@hdfgroup.org
The HDF Group. 1901 S. First. Champaign, IL 61820

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

I use HDF5 1.8.2.

Cyril.

···

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Thanks a lot Pedro.

Regards.

Cyril.

···

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Cyril

that bug has been fixed

we provide snapshots between releases. To get them, please go to

http://www.hdfgroup.org/HDF5/

then click on "snapshots" at the very end, or direct link

ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots/

you can either choose v18 or v19 (this is the development branch)

these snapshots are automatically made every weekend, so this latest fix is *not* yet there, but it should be this weekend (check the file date)

I added an example of use of the function to the Fortran Lite test program, in

/hdf5/hl/fortran/test/tstlite.f90

the documentation is also available at

http://www.hdfgroup.org/HDF5/doc/HL/RM_H5LT.html

let us know if you have any problems getting the snapshot or using the function

Pedro

···

At 10:15 AM 3/19/2009, cyril giraudon wrote:

Hi,

I try to use the function "h5ltget_dataset_info_f" of the Lite API and
it doesn't work.
Unfortunatly, there is no example of this function in the hl/test directory.

I use GNU Fortran 95 (GCC) 4.1.1 20060724 (prerelease)
(4.1.1-3.1mdv2007.0) on Linux.

The signature of h5ltget_dataset_info_f is
- file id,
- dataset name,
- dataset dims,
- type class,
- type size,
- hdferr

The HDF5 file contains only a "/nodes" dataset of 15x3 real
dims is a (1 rank, dimension 2) array of integers.

With a static dims array (integer, dimension(2) :: dims), file_id seems
corrupted since HDF5 can't close the file correctly and the error output
is :
""""
HDF5-DIAG: Error detected in HDF5 (1.8.2) thread 0:
#000: H5F.c line 2085 in H5Fclose(): not a file ID
   major: Invalid arguments to routine
   minor: Inappropriate type
h5fclose_f KO
make: *** [test_get_dataset_info] Erreur 4
""""

if dims is dynamic (integer, dimension(:), allocatable :: dims;
allocate(dims(2)),
the program crashes :
""""
       Dims : 15 3
*** glibc detected *** ./get_dataset_info: free(): invalid next size
(fast): 0x08071f78 ***
======= Backtrace: =========
/lib/i686/libc.so.6[0x40618d9d]
/lib/i686/libc.so.6(__libc_free+0x83)[0x40618f23]
/usr/lib/libgfortran.so.1(_gfortran_deallocate+0x32)[0x40516f82]
./get_dataset_info[0x8048e3e]
./get_dataset_info[0x8048f17]
/lib/i686/libc.so.6(__libc_start_main+0xdc)[0x405c975c]
./get_dataset_info[0x8048a81]
======= Memory map: ========
08048000-0804a000 r-xp 00000000 08:06 9385383
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/fortran_language/macro/get_dataset_info
0804a000-0804b000 rwxp 00001000 08:06 9385383
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/fortran_language/macro/get_dataset_info
0804b000-0808d000 rwxp 0804b000 00:00 0 [heap]
40000000-40018000 r-xp 00000000 08:01 939023 /lib/ld-2.4.so
40018000-40019000 r-xp 00017000 08:01 939023 /lib/ld-2.4.so
40019000-4001a000 rwxp 00018000 08:01 939023 /lib/ld-2.4.so
4001a000-4001b000 rwxp 4001a000 00:00 0
4001b000-4004d000 r-xp 00000000 08:06 8462742
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
4004d000-4004f000 rwxp 00031000 08:06 8462742
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
4004f000-40488000 r-xp 00000000 08:06 8462732
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5.so.6.0.1
40488000-4048d000 rwxp 00439000 08:06 8462732
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5.so.6.0.1
4048d000-4048e000 rwxp 4048d000 00:00 0
4048e000-4049a000 r-xp 00000000 08:06 8462757
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
4049a000-4049b000 rwxp 0000c000 08:06 8462757
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
4049b000-404b9000 r-xp 00000000 08:06 8462747
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_hl.so.0.0.0
404b9000-404ba000 rwxp 0001e000 08:06 8462747
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libhdf5_hl.so.0.0.0
404ba000-404cc000 rwxp 404ba000 00:00 0
404cc000-404ee000 r-xp 00000000 08:06 8462762
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libmed.so.1.0.1
404ee000-404ef000 rwxp 00021000 08:06 8462762
/home/cyril/affaires/quercy_toolkit/hdf5_amelet/macrocompat_local/lib/libmed.so.1.0.1
4050b000-40583000 r-xp 00000000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
40583000-40584000 rwxp 00078000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
40584000-405a7000 r-xp 00000000 08:01 939015 /lib/i686/libm-2.4.so
405a7000-405a9000 rwxp 00023000 08:01 939015 /lib/i686/libm-2.4.so
405a9000-405b3000 r-xp 00000000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
405b3000-405b4000 rwxp 0000a000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
405b4000-406db000 r-xp 00000000 08:01 939458 /lib/i686/libc-2.4.so
406db000-406dc000 r-xp 00126000 08:01 939458 /lib/i686/libc-2.4.so
406dc000-406de000 rwxp 00127000 08:01 939458 /lib/i686/libc-2.4.so
406de000-406e1000 rwxp 406de000 00:00 0
406e1000-406f3000 r-xp 00000000 08:01 939064 /lib/libz.so.1.2.3
406f3000-406f4000 rwxp 00011000 08:01 939064 /lib/libz.so.1.2.3
406f4000-406f5000 rwxp 406f4000 00:00 0
406f5000-40712000 r-xp 00000000 08:01 195607 /usr/lib/libg2c.so.0.0.0
40712000-40713000 rwxp 0001c000 08:01 195607 /usr/lib/libg2c.so.0.0.0
40713000-40758000 rwxp 40713000 00:00 0
40800000-40821000 rwxp 40800000 00:00 0
40821000-40900000 ---p 40821000 00:00 0
bfc35000-bfc4a000 rw-p bfc35000 00:00 0 [stack]
bfffe000-bffff000 r-xp bfffe000 00:00 0
make: *** [test_get_dataset_info] Abandon (vidange mémoire)
"""

Is there any known problems with this function ?

Thanks a lot,

Cyril.

Below is the fortran 90 program produces such results.

##############################
program get_dataset_info

! General hdf5 module
use hdf5
! API Lite module
use h5lt
! Table manipulation module
use h5tb
! Group manapulation module
use h5g

implicit none

integer :: hdferr
character(len=*), parameter :: filename = "mesh.h5"
integer(hid_t) :: file_id
integer :: type_class
integer(size_t) :: type_size

integer(hsize_t), dimension(:), allocatable :: dyn_dims
integer(hsize_t), dimension(2) :: stat_dims

! Library initialization (native types handling)
call h5open_f(hdferr)
if (hdferr < 0) then
   print *, "h5open_f KO"
   call exit(1)
end if

! Open the file in read only mode
call h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, hdferr, H5P_DEFAULT_F)
if (hdferr < 0) then
   print *, "h5fopen_f KO"
   call exit(2)
end if

! Read stat_dims
stat_dims = 0
call h5ltget_dataset_info_f(file_id, "nodes", stat_dims, &
                           type_class, type_size, hdferr)
if (hdferr < 0) then
   print *, "h5ltget_dataset_info_f ko"
   call exit(3)
end if
! print *, "\tstatic dims :", stat_dims

! Read dyn_dims
!allocate(dyn_dims(2))
!dyn_dims = 0
!call h5ltget_dataset_info_f(file_id, "nodes", dyn_dims, &
! type_class, type_size, hdferr)
! if (hdferr < 0) then
! print *, "h5ltget_dataset_info_f ko"
! call exit(3)
! end if
!print *, "\tDims :", dyn_dims
!deallocate(dyn_dims)

! Close the file
call h5fclose_f(file_id, hdferr)
if (hdferr < 0) then
   print *, "h5fclose_f KO"
   call exit(4)
end if

end program get_dataset_info

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

--------------------------------------------------------------
Pedro Vicente (T) 217.265-0311
pvn@hdfgroup.org
The HDF Group. 1901 S. First. Champaign, IL 61820

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Pedro,

I thank you for the link, I will try very soon.
However, I'm afraid there is another problem with the function
"h5ltget_attribute_info_f " (in 1.8.2)
I receive the same type of error message (see below).

Regards,

Cyril.

"""
*** glibc detected *** /yyyy/read-attribute: malloc(): memory corruption
(fast): 0x08074538 ***
======= Backtrace: =========
/lib/i686/libc.so.6[0xb794ad3d]
/lib/i686/libc.so.6(malloc+0x85)[0xb794bcf5]
/xxxxx/macrocompat_local/lib/libhdf5.so.6[0xb7c307cb]
/yyyy/read-attribute[0x8048d02]
/yyyy/read-attribute[0x8048d47]
/lib/i686/libc.so.6(__libc_start_main+0xdc)[0xb78fa75c]
/yyyy/read-attribute[0x8048a91]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:06 13554556 /yyyy/read-attribute
08049000-0804a000 rwxp 00001000 08:06 13554556 /yyyy/read-attribute
0804a000-0808c000 rwxp 0804a000 00:00 0 [heap]
b7700000-b7721000 rwxp b7700000 00:00 0
b7721000-b7800000 ---p b7721000 00:00 0
b788f000-b78d2000 rwxp b788f000 00:00 0
b78d2000-b78e4000 r-xp 00000000 08:01 939064 /lib/libz.so.1.2.3
b78e4000-b78e5000 rwxp 00011000 08:01 939064 /lib/libz.so.1.2.3
b78e5000-b7a0c000 r-xp 00000000 08:01 939458 /lib/i686/libc-2.4.so
b7a0c000-b7a0d000 r-xp 00126000 08:01 939458 /lib/i686/libc-2.4.so
b7a0d000-b7a0f000 rwxp 00127000 08:01 939458 /lib/i686/libc-2.4.so
b7a0f000-b7a12000 rwxp b7a0f000 00:00 0
b7a12000-b7a1c000 r-xp 00000000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
b7a1c000-b7a1d000 rwxp 0000a000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
b7a1d000-b7a40000 r-xp 00000000 08:01 939015 /lib/i686/libm-2.4.so
b7a40000-b7a42000 rwxp 00023000 08:01 939015 /lib/i686/libm-2.4.so
b7a42000-b7aba000 r-xp 00000000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
b7aba000-b7abb000 rwxp 00078000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
b7ad7000-b7af5000 r-xp 00000000 08:06 8462747
/xxxxx/macrocompat_local/lib/libhdf5_hl.so.0.0.0
b7af5000-b7af6000 rwxp 0001e000 08:06 8462747
/xxxxx/macrocompat_local/lib/libhdf5_hl.so.0.0.0
b7af6000-b7b08000 rwxp b7af6000 00:00 0
b7b08000-b7b14000 r-xp 00000000 08:06 8462757
/xxxxx/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
b7b14000-b7b15000 rwxp 0000c000 08:06 8462757
/xxxxx/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
b7b15000-b7f4e000 r-xp 00000000 08:06 8462732
/xxxxx/macrocompat_local/lib/libhdf5.so.6.0.1
b7f4e000-b7f53000 rwxp 00439000 08:06 8462732
/xxxxx/macrocompat_local/lib/libhdf5.so.6.0.1
b7f53000-b7f54000 rwxp b7f53000 00:00 0
b7f54000-b7f86000 r-xp 00000000 08:06 8462742
/xxxxx/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
b7f86000-b7f88000 rwxp 00031000 08:06 8462742
/xxxxx/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
b7f88000-b7f89000 rwxp b7f88000 00:00 0
b7f89000-b7fa1000 r-xp 00000000 08:01 939023 /lib/ld-2.4.so
b7fa1000-b7fa2000 r-xp 00017000 08:01 939023 /lib/ld-2.4.so
b7fa2000-b7fa3000 rwxp 00018000 08:01 939023 /lib/ld-2.4.so
bf9e3000-bf9f9000 rw-p bf9e3000 00:00 0 [stack]
bfffe000-bffff000 r-xp bfffe000 00:00 0

"""

···

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Pedro,

I thank you for the link, I will try very soon.
However, I'm afraid there is another problem with the function
"h5ltget_attribute_info_f " (in 1.8.2)
I receive the same type of error message (see below).

Regards,

Cyril.

yes, we also noticed issues with that function (and h5ltread_dataset_string_f ).
At this moment we are still figuring out what's the problem, something related to memory corruption. The problem only shows up with the fortran g95 compiler, with the Intel fortran compiler the problem is not shown.

also, it seems that the automatic snapshot I mentioned earlier is not being generated, we are looking at that too

Pedro

···

At 12:38 PM 3/31/2009, cyril giraudon wrote:

"""
*** glibc detected *** /yyyy/read-attribute: malloc(): memory corruption
(fast): 0x08074538 ***
======= Backtrace: =========
/lib/i686/libc.so.6[0xb794ad3d]
/lib/i686/libc.so.6(malloc+0x85)[0xb794bcf5]
/xxxxx/macrocompat_local/lib/libhdf5.so.6[0xb7c307cb]
/yyyy/read-attribute[0x8048d02]
/yyyy/read-attribute[0x8048d47]
/lib/i686/libc.so.6(__libc_start_main+0xdc)[0xb78fa75c]
/yyyy/read-attribute[0x8048a91]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:06 13554556 /yyyy/read-attribute
08049000-0804a000 rwxp 00001000 08:06 13554556 /yyyy/read-attribute
0804a000-0808c000 rwxp 0804a000 00:00 0 [heap]
b7700000-b7721000 rwxp b7700000 00:00 0
b7721000-b7800000 ---p b7721000 00:00 0
b788f000-b78d2000 rwxp b788f000 00:00 0
b78d2000-b78e4000 r-xp 00000000 08:01 939064 /lib/libz.so.1.2.3
b78e4000-b78e5000 rwxp 00011000 08:01 939064 /lib/libz.so.1.2.3
b78e5000-b7a0c000 r-xp 00000000 08:01 939458 /lib/i686/libc-2.4.so
b7a0c000-b7a0d000 r-xp 00126000 08:01 939458 /lib/i686/libc-2.4.so
b7a0d000-b7a0f000 rwxp 00127000 08:01 939458 /lib/i686/libc-2.4.so
b7a0f000-b7a12000 rwxp b7a0f000 00:00 0
b7a12000-b7a1c000 r-xp 00000000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
b7a1c000-b7a1d000 rwxp 0000a000 08:01 951749 /lib/libgcc_s-4.1.1.so.1
b7a1d000-b7a40000 r-xp 00000000 08:01 939015 /lib/i686/libm-2.4.so
b7a40000-b7a42000 rwxp 00023000 08:01 939015 /lib/i686/libm-2.4.so
b7a42000-b7aba000 r-xp 00000000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
b7aba000-b7abb000 rwxp 00078000 08:01 194225
/usr/lib/libgfortran.so.1.0.0
b7ad7000-b7af5000 r-xp 00000000 08:06 8462747
/xxxxx/macrocompat_local/lib/libhdf5_hl.so.0.0.0
b7af5000-b7af6000 rwxp 0001e000 08:06 8462747
/xxxxx/macrocompat_local/lib/libhdf5_hl.so.0.0.0
b7af6000-b7b08000 rwxp b7af6000 00:00 0
b7b08000-b7b14000 r-xp 00000000 08:06 8462757
/xxxxx/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
b7b14000-b7b15000 rwxp 0000c000 08:06 8462757
/xxxxx/macrocompat_local/lib/libhdf5hl_fortran.so.0.0.0
b7b15000-b7f4e000 r-xp 00000000 08:06 8462732
/xxxxx/macrocompat_local/lib/libhdf5.so.6.0.1
b7f4e000-b7f53000 rwxp 00439000 08:06 8462732
/xxxxx/macrocompat_local/lib/libhdf5.so.6.0.1
b7f53000-b7f54000 rwxp b7f53000 00:00 0
b7f54000-b7f86000 r-xp 00000000 08:06 8462742
/xxxxx/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
b7f86000-b7f88000 rwxp 00031000 08:06 8462742
/xxxxx/macrocompat_local/lib/libhdf5_fortran.so.0.0.0
b7f88000-b7f89000 rwxp b7f88000 00:00 0
b7f89000-b7fa1000 r-xp 00000000 08:01 939023 /lib/ld-2.4.so
b7fa1000-b7fa2000 r-xp 00017000 08:01 939023 /lib/ld-2.4.so
b7fa2000-b7fa3000 rwxp 00018000 08:01 939023 /lib/ld-2.4.so
bf9e3000-bf9f9000 rw-p bf9e3000 00:00 0 [stack]
bfffe000-bffff000 r-xp bfffe000 00:00 0

"""

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

--------------------------------------------------------------
Pedro Vicente (T) 217.265-0311
pvn@hdfgroup.org
The HDF Group. 1901 S. First. Champaign, IL 61820

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.