summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/html/fortran/h5_FORTRAN.html99
-rw-r--r--fortran/src/H5_f.c100
-rw-r--r--fortran/src/H5_ff.f90178
-rw-r--r--fortran/src/H5f90proto.h18
-rw-r--r--fortran/test/fortranlib_test.f9018
-rw-r--r--release_docs/RELEASE.txt8
6 files changed, 418 insertions, 3 deletions
diff --git a/doc/html/fortran/h5_FORTRAN.html b/doc/html/fortran/h5_FORTRAN.html
index ff4a796..d483fed 100644
--- a/doc/html/fortran/h5_FORTRAN.html
+++ b/doc/html/fortran/h5_FORTRAN.html
@@ -61,8 +61,105 @@ FORTRAN General Library API -- h5i
</pre>
+<p>&nbsp;
+<p>&nbsp;
+<hr>
+<p>&nbsp;
+<a name="h5garbage_collect_f">
+<p>&nbsp;
+</a>
+
+
+<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5gabage_collect_f</strong>
+
+<dt><strong>Purpose:</strong>
+ Garbage collects on all free-lists of all types
+
+<pre>
+ SUBROUTINE h5garbage_collect_f(hdferr)
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ END SUBROUTINE h5garbage_collect_f
+</pre>
+
</dl>
+
+<p>&nbsp;
+<p>&nbsp;
+<hr>
+<p>&nbsp;
+<a name="h5dont_atexit_f">
+<p>&nbsp;
+</a>
+
+
+<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dont_atexit_f</strong>
+
+<dt><strong>Purpose:</strong>
+ Instructs library not to install atexit cleanup routine.
+
+<pre>
+ SUBROUTINE h5dont_atexit_f(hdferr)
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ END SUBROUTINE h5dont_atexit_f
+</pre>
+
+
+<p>&nbsp;
+<p>&nbsp;
+<hr>
+<p>&nbsp;
+<a name="h5get_libversion_f">
+<p>&nbsp;
+</a>
+
+
+<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5get_libversion_f</strong>
+
+<dt><strong>Purpose:</strong>
+ Returns the HDF5 library version and release numbers.
+
+<pre>
+ SUBROUTINE h5get_libversion_f(hdferr)
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: majnum ! The major version of the library
+ INTEGER, INTENT(OUT) :: minnum ! The minor version of the library
+ INTEGER, INTENT(OUT) :: relnum ! The release number
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ END SUBROUTINE h5get_libversion_f
+</pre>
+
+
+<p>&nbsp;
+<p>&nbsp;
+<hr>
+<p>&nbsp;
+<a name="h5check_version_f">
+<p>&nbsp;
+</a>
+
+
+<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5check_version_f</strong>
+
+<dt><strong>Purpose:</strong>
+ Verifies that library versions are consistent.
+
+<pre>
+ SUBROUTINE h5check_version_f(hdferr)
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: majnum ! The major version of the library
+ INTEGER, INTENT(IN) :: minnum ! The minor version of the library
+ INTEGER, INTENT(IN) :: relnum ! The release number
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ END SUBROUTINE h5check_version_f
+</pre>
+
<p>&nbsp;
<p>&nbsp;
<hr>
@@ -73,7 +170,7 @@ FORTRAN General Library API -- h5i
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
</address>
-Last modified: 19 February 2001
+Last modified: 24 September, 2002
<br>
Describes HDF5 Release 1.5, Unreleased Development Branch
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 08c3a9e..d8b3d06 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -342,3 +342,103 @@ nh5close_c()
ret_value = 0;
return ret_value;
}
+
+
+/*---------------------------------------------------------------------------
+ * Name: h5get_libversion_c
+ * Purpose: Calls H5get_libversion function
+ * to retrieve library version info.
+ * Inputs:
+ * None
+ * Outputs:
+ * majnum - the major version of the library
+ * minnum - the minor version of the library
+ * relnum - the release version of the library
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Tuesday, September 24, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5get_libversion_c( int_f *majnum, int_f *minnum, int_f *relnum)
+{
+
+ int ret_value = -1;
+ unsigned c_majnum, c_minnum, c_relnum;
+
+ if (H5get_libversion(&c_majnum, &c_minnum, &c_relnum) < 0) return ret_value;
+
+ *majnum = (int_f)c_majnum;
+ *minnum = (int_f)c_minnum;
+ *relnum = (int_f)c_relnum;
+ ret_value = 0;
+ return ret_value;
+}
+
+
+/*---------------------------------------------------------------------------
+ * Name: h5check_version_c
+ * Purpose: Calls H5check_version function
+ * to verify library version info.
+ * Inputs:
+ * majnum - the major version of the library
+ * minnum - the minor version of the library
+ * relnum - the release version of the library
+ * Outputs:
+ * None
+ * Returns: 0 on success, aborts on failure
+ * Programmer: Elena Pourmal
+ * Tuesday, September 24, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5check_version_c( int_f *majnum, int_f *minnum, int_f *relnum)
+{
+
+ int ret_value = -1;
+ unsigned c_majnum, c_minnum, c_relnum;
+ c_majnum = (unsigned) *majnum;
+ c_minnum = (unsigned) *minnum;
+ c_relnum = (unsigned) *relnum;
+
+ H5check_version(c_majnum, c_minnum, c_relnum);
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*---------------------------------------------------------------------------
+ * Name: h5garbage_collect_c
+ * Purpose: Calls H5garbage_collect to collect on all free-lists of all types
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Tuesday, September 24, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5garbage_collect_c()
+{
+
+ int ret_value = -1;
+ if (H5garbage_collect() < 0) return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*---------------------------------------------------------------------------
+ * Name: h5dont_atexit_c
+ * Purpose: Calls H5dont_atexit not to install atexit cleanup routine
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Tuesday, September 24, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5dont_atexit_c()
+{
+
+ int ret_value = -1;
+ if (H5dont_atexit() < 0) return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90
index dc1372f..709949d 100644
--- a/fortran/src/H5_ff.f90
+++ b/fortran/src/H5_ff.f90
@@ -169,3 +169,181 @@
END SUBROUTINE h5close_f
+!----------------------------------------------------------------------
+! Name: h5get_libversion_f
+!
+! Purpose: Returns the HDF5 LIbrary release number
+!
+! Inputs:
+! Outputs:
+! majnum: - major version of the library
+! minum: - minor version of the library
+! relnum: - release version of the library
+! error: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! NONE
+!
+! Programmer: Elena Pourmal
+! September 24, 2002
+!
+! Comment:
+!----------------------------------------------------------------------
+
+ SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5get_libversion_f
+!DEC$endif
+!
+ USE H5GLOBAL
+
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error
+ INTERFACE
+ INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum)
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !MS$ATTRIBUTES C,reference,alias:'_H5GET_LIBVERSION_C'::h5get_libversion_c
+ !DEC$ ENDIF
+ INTEGER, INTENT(OUT) :: majnum, minnum, relnum
+ END FUNCTION h5get_libversion_c
+ END INTERFACE
+
+ error = h5get_libversion_c(majnum, minnum, relnum)
+
+ END SUBROUTINE h5get_libversion_f
+
+!----------------------------------------------------------------------
+! Name: h5check_version_f
+!
+! Purpose: Verifies that library versions are consistent.
+!
+! Inputs:
+! majnum: - major version of the library
+! minum: - minor version of the library
+! relnum: - release version of the library
+! Outputs:
+! error: - error code
+! Success: 0
+! Failure: application aborts
+! Optional parameters:
+! NONE
+!
+! Programmer: Elena Pourmal
+! September 24, 2002
+!
+! Comment:
+!----------------------------------------------------------------------
+
+ SUBROUTINE h5check_version_f(majnum, minnum, relnum, error)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5check_version_f
+!DEC$endif
+!
+ USE H5GLOBAL
+
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: majnum, minnum, relnum
+ INTEGER, INTENT(OUT) :: error
+ INTERFACE
+ INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum)
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !MS$ATTRIBUTES C,reference,alias:'_H5CHECK_VERSION_C'::h5check_version_c
+ !DEC$ ENDIF
+ INTEGER, INTENT(IN) :: majnum, minnum, relnum
+ END FUNCTION h5check_version_c
+ END INTERFACE
+
+ error = h5check_version_c(majnum, minnum, relnum)
+
+ END SUBROUTINE h5check_version_f
+
+!----------------------------------------------------------------------
+! Name: h5garbage_collect_f
+!
+! Purpose: Garbage collects on all free-lists of all types.
+!
+! Inputs:
+! Outputs:
+! error: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! NONE
+!
+! Programmer: Elena Pourmal
+! September 24, 2002
+!
+!
+! Comment:
+!----------------------------------------------------------------------
+
+ SUBROUTINE h5garbage_collect_f(error)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5garbage_collect_f
+!DEC$endif
+!
+ USE H5GLOBAL
+
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: error
+ INTERFACE
+ INTEGER FUNCTION h5garbage_collect_c()
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !MS$ATTRIBUTES C,reference,alias:'_H5GARBAGE_COLLECT_C'::h5garbage_collect_c
+ !DEC$ ENDIF
+ END FUNCTION h5garbage_collect_c
+ END INTERFACE
+
+ error = h5garbage_collect_c()
+
+ END SUBROUTINE h5garbage_collect_f
+
+!----------------------------------------------------------------------
+! Name: h5dont_atexit_f
+!
+! Purpose: Instructs library not to install atexit cleanup routine.
+!
+! Inputs:
+! Outputs:
+! error: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! NONE
+!
+! Programmer: Elena Pourmal
+! September 24, 2002
+!
+!
+! Comment:
+!----------------------------------------------------------------------
+
+ SUBROUTINE h5dont_atexit_f(error)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5dont_atexit_f
+!DEC$endif
+!
+ USE H5GLOBAL
+
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: error
+ INTERFACE
+ INTEGER FUNCTION h5dont_atexit_c()
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !MS$ATTRIBUTES C,reference,alias:'_H5dont_atexit_C'::h5dont_atexit_c
+ !DEC$ ENDIF
+ END FUNCTION h5dont_atexit_c
+ END INTERFACE
+
+ error = h5dont_atexit_c()
+
+ END SUBROUTINE h5dont_atexit_f
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 1a0f9ce..e12c421 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -894,17 +894,25 @@ H5_DLL int_f nh5eset_auto_c(int_f* printflag);
#ifndef H5_FNAMES
# define H5_FNAMES
#ifdef DF_CAPFNAMES
-# define nh5open_c FNAME(H5OPEN_C)
+# define nh5open_c FNAME(H5OPEN_C)
# define nh5close_c FNAME(H5CLOSE_C)
# define nh5init_types_c FNAME(H5INIT_TYPES_C)
# define nh5close_types_c FNAME(H5CLOSE_TYPES_C)
# define nh5init_flags_c FNAME(H5INIT_FLAGS_C)
+# define nh5get_libversion_c FNAME(H5GET_LIBVERSION_C)
+# define nh5check_version_c FNAME(H5CHECK_VERSION_C)
+# define nh5garbage_collect_c FNAME(H5GARBAGE_COLLECT_C)
+# define nh5dont_atexit_c FNAME(H5DONT_ATEXIT_C)
#else
# define nh5open_c FNAME(h5open_c)
# define nh5close_c FNAME(h5close_c)
# define nh5init_types_c FNAME(h5init_types_c)
# define nh5close_types_c FNAME(h5close_types_c)
# define nh5init_flags_c FNAME(h5init_flags_c)
+# define nh5get_libversion_c FNAME(h5get_libversion_c)
+# define nh5check_version_c FNAME(h5check_version_c)
+# define nh5garbage_collect_c FNAME(h5garbage_collect_c)
+# define nh5dont_atexit_c FNAME(h5dont_atexit_c)
#endif
#endif
H5_DLL int_f nh5open_c(void);
@@ -916,4 +924,12 @@ H5_DLL int_f nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, int_f *h5f_fla
int_f *h5fd_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);
+H5_DLL int_f nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
+
+H5_DLL int_f nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
+
+H5_DLL int_f nh5garbage_collect_c(void);
+
+H5_DLL int_f nh5dont_atexit_c(void);
+
#endif /* _H5f90proto_H */
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index 7756eee..a8d9565 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -41,6 +41,7 @@
INTEGER :: identifier_total_error = 0
INTEGER :: group_total_error = 0
INTEGER :: error_total_error = 0
+ INTEGER :: majnum, minnum, relnum
CHARACTER(LEN=8) error_string
CHARACTER(LEN=8) :: success = ' PASSED '
CHARACTER(LEN=8) :: failure = '*FAILED*'
@@ -52,10 +53,25 @@
write(*,*) ' ========================== '
write(*,*) ' FORTRAN tests '
write(*,*) ' ========================== '
+
+ CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
+ if(total_error .eq. 0) then
+
+ write(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
+ write(*, '(I1)', advance="NO") majnum
+ write(*, '(".")', advance="NO")
+ write(*, '(I1)', advance="NO") minnum
+ write(*, '(" release ")', advance="NO")
+ write(*, '(I3)') relnum
+ else
+ total_error = total_error + 1
+ endif
+ write(*,*)
+! CALL h5check_version_f(1,4,4,total_error)
+
! write(*,*) '========================================='
! write(*,*) 'Testing FILE Interface '
! write(*,*) '========================================='
-
error_string = failure
CALL mountingtest(cleanup, mounting_total_error)
IF (mounting_total_error == 0) error_string = success
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index fa6832f..7fa1131 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -67,6 +67,8 @@ Library
written to the file and then subsequently queried with the
H5Sget_simple_extent_type function, type was reported H5S_SIMPLE instead
of H5S_SCALAR. EIP - 2002/06/04
+C
+C
* Clear symbol table node "dirty" flag when flushing symbol tables to
disk, to reduce I/O calls made & improve performance. QAK - 2002/06/03
* Fixed bug where an object's header could get corrupted in certain obscure
@@ -383,6 +385,12 @@ New Features
type. Module subroutines that accept "dims" as INTEGER array of size
7 will be deprecated in 1.6 release.
EIP - 2002/05/06
+ - Added the following functions to the
+ Library APIs:
+ h5get_libversion_f h5dont_atexit_f
+ h5check_version_f h5garbage_collect_f
+ EIP - 2002/09/24
+
* C++ API:
- Added two new member functions: Exception::getFuncName() and
Exception::getCFuncName() to provide the name of the member