mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-11 16:01:00 +08:00
[svn-r10585] Purpose: Bug fix
Description: h5pget_driver_f function returned information that could not be interpreted by fortran application Solution: Defined Fortran global variables that correspond to the C H5FD_<driver_name> variables at the Fortran library initialization time. Platforms tested: heping with PGI compilers, sol 64-bit and copper parallel Misc. update:
This commit is contained in:
parent
13ca97618d
commit
408471420f
@ -167,6 +167,7 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
|
||||
* Inputs: h5d_flags - H5D inteface flags
|
||||
* h5f_flags - H5F interface flags
|
||||
* h5fd_flags - H5FD interface flags
|
||||
* h5fd_hid_flags- H5FD interface flags of type hid_t
|
||||
* h5g_flags - H5G interface flags
|
||||
* h5i_flags - H5I interface flags
|
||||
* h5p_flags - H5P interface flags
|
||||
@ -180,10 +181,13 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
|
||||
* Tuesday, August 3, 1999
|
||||
* Modifications: Added Z flags. EIP, March 12, 2003
|
||||
* Added more FD flags and new H5LIB flags
|
||||
* Added more FD flags for HDF5 file driver
|
||||
* EIP, April 9, 2005
|
||||
*---------------------------------------------------------------------------*/
|
||||
int_f
|
||||
nh5init_flags_c( int_f *h5d_flags, int_f *h5f_flags,
|
||||
int_f *h5fd_flags, int_f *h5g_flags, int_f *h5i_flags,
|
||||
int_f *h5fd_flags, hid_t *h5fd_hid_flags,
|
||||
int_f *h5g_flags, int_f *h5i_flags,
|
||||
int_f *h5p_flags, int_f *h5r_flags, int_f *h5s_flags,
|
||||
int_f *h5t_flags, int_f *h5z_flags)
|
||||
{
|
||||
@ -246,6 +250,18 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5f_flags,
|
||||
h5fd_flags[9] = H5FD_MEM_OHDR;
|
||||
h5fd_flags[10] = H5FD_MEM_NTYPES;
|
||||
|
||||
/*
|
||||
* H5FD flags of type hid_t
|
||||
*/
|
||||
h5fd_hid_flags[0] = H5FD_CORE;
|
||||
h5fd_hid_flags[1] = H5FD_FAMILY;
|
||||
h5fd_hid_flags[2] = H5FD_LOG;
|
||||
h5fd_hid_flags[3] = H5FD_MPIO;
|
||||
h5fd_hid_flags[4] = H5FD_MULTI;
|
||||
h5fd_hid_flags[5] = H5FD_SEC2;
|
||||
h5fd_hid_flags[6] = H5FD_STDIO;
|
||||
h5fd_hid_flags[7] = H5FD_STREAM;
|
||||
|
||||
/*
|
||||
* H5G flags
|
||||
*/
|
||||
|
@ -78,6 +78,7 @@
|
||||
INTEGER FUNCTION h5init_flags_c(i_H5D_flags, &
|
||||
i_H5F_flags, &
|
||||
i_H5FD_flags, &
|
||||
i_H5FD_hid_flags, &
|
||||
i_H5G_flags, &
|
||||
i_H5I_flags, &
|
||||
i_H5P_flags, &
|
||||
@ -90,6 +91,7 @@
|
||||
INTEGER i_H5G_flags(H5G_FLAGS_LEN)
|
||||
INTEGER i_H5D_flags(H5D_FLAGS_LEN)
|
||||
INTEGER i_H5FD_flags(H5FD_FLAGS_LEN)
|
||||
INTEGER i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN)
|
||||
INTEGER i_H5I_flags(H5I_FLAGS_LEN)
|
||||
INTEGER i_H5P_flags(H5P_FLAGS_LEN)
|
||||
INTEGER i_H5R_flags(H5R_FLAGS_LEN)
|
||||
@ -115,6 +117,7 @@
|
||||
error_2 = h5init_flags_c(H5D_flags, &
|
||||
H5F_flags, &
|
||||
H5FD_flags, &
|
||||
H5FD_hid_flags, &
|
||||
H5G_flags, &
|
||||
H5I_flags, &
|
||||
H5P_flags, &
|
||||
|
@ -309,6 +309,35 @@
|
||||
EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F)
|
||||
EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F)
|
||||
EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F)
|
||||
!
|
||||
! H5FD file drivers flags declaration
|
||||
!
|
||||
INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 8
|
||||
INTEGER H5FD_hid_flags(H5FD_HID_FLAGS_LEN)
|
||||
!DEC$if defined(BUILD_HDF5_DLL)
|
||||
!DEC$ ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/
|
||||
!DEC$endif
|
||||
COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags
|
||||
|
||||
INTEGER(HID_T) :: H5FD_CORE_F
|
||||
INTEGER(HID_T) :: H5FD_FAMILY_F
|
||||
INTEGER(HID_T) :: H5FD_LOG_F
|
||||
INTEGER(HID_T) :: H5FD_MPIO_F
|
||||
INTEGER(HID_T) :: H5FD_MULTI_F
|
||||
INTEGER(HID_T) :: H5FD_SEC2_F
|
||||
INTEGER(HID_T) :: H5FD_STDIO_F
|
||||
INTEGER(HID_T) :: H5FD_STREAM_F
|
||||
|
||||
EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F)
|
||||
EQUIVALENCE(H5FD_hid_flags(8), H5FD_STREAM_F)
|
||||
|
||||
|
||||
|
||||
!
|
||||
! H5I flags declaration
|
||||
|
@ -651,7 +651,8 @@ H5_FCDLL int_f nh5close_c(void);
|
||||
H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f * floatingtypes, hid_t_f * integertypes);
|
||||
H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f * floatingtypes, int_f * floatinglen, hid_t_f * integertypes, int_f * integerlen);
|
||||
H5_FCDLL int_f nh5init_flags_c( int_f *h5d_flags, int_f *h5f_flags,
|
||||
int_f *h5fd_flags, int_f *h5g_flags, int_f *h5i_flags,
|
||||
int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
|
||||
int_f *h5g_flags, int_f *h5i_flags,
|
||||
int_f *h5p_flags, int_f *h5r_flags, int_f *h5s_flags,
|
||||
int_f *h5t_flags, int_f *h5z_flags);
|
||||
H5_FCDLL int_f nh5init1_flags_c(int_f *h5lib_flags);
|
||||
|
@ -162,7 +162,7 @@
|
||||
|
||||
INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
|
||||
INTEGER :: error ! Error flag
|
||||
|
||||
INTEGER(HID_T) :: driver
|
||||
INTEGER :: i, j !general purpose integers
|
||||
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
|
||||
INTEGER :: mdc_nelmts
|
||||
@ -217,6 +217,11 @@
|
||||
CALL h5pget_fapl_multi_f(fapl, memb_map_out, memb_fapl_out, memb_name_out, &
|
||||
memb_addr_out, relax_out, error)
|
||||
CALL check("h5pget_fapl_multi_f", error, total_error)
|
||||
CALL h5pget_driver_f(fapl, driver, error)
|
||||
CALL check("h5pget_driver_f",error, total_error)
|
||||
if(driver .ne. H5FD_MULTI_F) then
|
||||
write(*,*) "Wrong value for driver"
|
||||
endif
|
||||
!
|
||||
! Let's check h5pget(set)cache_f APIs here for now
|
||||
!
|
||||
|
@ -41,6 +41,7 @@
|
||||
INTEGER :: rank = 2 ! Dataset rank
|
||||
INTEGER :: i, j
|
||||
INTEGER(HSIZE_T), DIMENSION(2) :: dims
|
||||
INTEGER(HID_T) :: driver
|
||||
|
||||
INTEGER :: error ! Error flag
|
||||
!
|
||||
@ -60,6 +61,11 @@
|
||||
CALL check("h5pcreate_f", error, total_error)
|
||||
CALL h5pset_fapl_mpio_f(plac_id, comm, info, error)
|
||||
CALL check("h5pset_fapl_mpio_f", error, total_error)
|
||||
CALL h5pget_driver_f(plac_id, driver, error)
|
||||
CALL check("h5pget_driver_f", error, total_error)
|
||||
if( driver .ne. H5FD_MPIO_F) then
|
||||
write(*,*) "Wrong driver information returned"
|
||||
endif
|
||||
CALL h5_fixname_f(filename, fix_filename, plac_id, error)
|
||||
|
||||
!
|
||||
|
@ -471,6 +471,11 @@ Bug Fixes since HDF5-1.6.0 release
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
F90 APIs
|
||||
--------
|
||||
- h5pget_driver_f was returning information that could not be
|
||||
interpreted by fortran application program; fixed. EIP - 2005/04/10
|
||||
|
||||
|
||||
Platforms Tested
|
||||
================
|
||||
|
Loading…
Reference in New Issue
Block a user