diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2005-04-10 22:15:51 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2005-04-10 22:15:51 (GMT) |
commit | 408471420f13327597fb9c87149bc1bc709f8740 (patch) | |
tree | 9b9057577559d7cee59b25deac34c9af32a3dd9c /fortran/src | |
parent | 13ca97618db62034fa78b8d87f7160cb2a1f4bfc (diff) | |
download | hdf5-408471420f13327597fb9c87149bc1bc709f8740.zip hdf5-408471420f13327597fb9c87149bc1bc709f8740.tar.gz hdf5-408471420f13327597fb9c87149bc1bc709f8740.tar.bz2 |
[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:
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5_f.c | 18 | ||||
-rw-r--r-- | fortran/src/H5_ff.f90 | 3 | ||||
-rw-r--r-- | fortran/src/H5f90global.f90 | 29 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 3 |
4 files changed, 51 insertions, 2 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 04e8df6..6ba85fc 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -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) { @@ -247,6 +251,18 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5f_flags, 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 */ diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 index f1f7884..1e8d215 100644 --- a/fortran/src/H5_ff.f90 +++ b/fortran/src/H5_ff.f90 @@ -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, & diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index 46591b2..c1b8817 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -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 diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index ff7678b..027cf1a 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -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); |