diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/CMakeLists.txt | 2 | ||||
-rw-r--r-- | fortran/Makefile.in | 4 | ||||
-rw-r--r-- | fortran/examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 4 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 7 | ||||
-rw-r--r-- | fortran/src/H5Off_F03.f90 | 5 | ||||
-rw-r--r-- | fortran/src/H5Tf.c | 72 | ||||
-rw-r--r-- | fortran/src/H5Tff.f90 | 51 | ||||
-rw-r--r-- | fortran/src/H5Tff_F03.f90 | 107 | ||||
-rw-r--r-- | fortran/src/H5Tff_F90.f90 | 56 | ||||
-rw-r--r-- | fortran/src/H5_f.c | 21 | ||||
-rw-r--r-- | fortran/src/H5f90global.f90 | 31 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 1 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 6 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 4 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 8 | ||||
-rw-r--r-- | fortran/test/CMakeTests.cmake | 2 | ||||
-rw-r--r-- | fortran/test/Makefile.in | 4 | ||||
-rw-r--r-- | fortran/test/tH5T_F03.f90 | 20 | ||||
-rw-r--r-- | fortran/test/tf.f90 | 24 | ||||
-rw-r--r-- | fortran/test/tf_F03.f90 | 10 | ||||
-rw-r--r-- | fortran/test/tf_F08.f90 | 10 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 2 | ||||
-rw-r--r-- | fortran/testpar/Makefile.in | 4 | ||||
-rw-r--r-- | fortran/testpar/ptest.f90 | 1 |
25 files changed, 318 insertions, 140 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 3fe9e7d..c725047 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 4d8abdc..2d0e0b7 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -105,7 +105,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = fortran ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs @@ -492,7 +493,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 322ae35..1f59f32 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index b9b5efb..c468739 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -115,7 +115,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = $(TEST_SCRIPT) subdir = fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs @@ -444,7 +445,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 5b641d1..22a091e 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- @@ -11,6 +11,8 @@ if (WIN32) endif (NOT H5_HAVE_PARALLEL) if (NOT HDF5_ENABLE_F2003) set (H5_NOF03EXP ";") + else (NOT HDF5_ENABLE_F2003) + set (H5_F03EXP ";") endif (NOT HDF5_ENABLE_F2003) configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) endif (MSVC) @@ -132,7 +134,6 @@ if (H5_HAVE_PARALLEL) ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c ) endif (H5_HAVE_PARALLEL) - set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS @@ -224,6 +225,7 @@ else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 ) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) +set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- # Add Main fortran library @@ -255,6 +257,7 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE}) set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran + LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90 index e6b87ea..36b6246 100644 --- a/fortran/src/H5Off_F03.f90 +++ b/fortran/src/H5Off_F03.f90 @@ -40,11 +40,6 @@ MODULE H5O_PROVISIONAL IMPLICIT NONE - enum, bind(c) - enumerator :: H5O_TYPE_UNKNOWN_F = -1 - enumerator :: H5O_TYPE_GROUP_F, H5O_TYPE_DATASET_F, H5O_TYPE_NAMED_DATATYPE_F, H5O_TYPE_NTYPES_F - end enum - !****t* H5T (F03)/h5o_info_t ! ! Fortran2003 Derived Type: diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index ca9c30f..878119f 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -1738,21 +1738,23 @@ nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) /****if* H5Tf/h5tenum_insert_c * NAME - * h5tenum_insert_c + * h5tenum_insert_c * PURPOSE - * Call H5Tenum_insert to insert a new enumeration datatype member. + * Call H5Tenum_insert to insert a new enumeration datatype member. * INPUTS - * type_id - identifier of the datatype - * name - Name of the new member - * namelen - length of the name - * value - value of the new member + * type_id - identifier of the datatype + * name - Name of the new member + * namelen - length of the name + * value - value of the new member * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY - * + * 'value' is no longer cast into an int. If the user passes in an 8 byte integer then + * it should not be cast to an int (which might be 4 bytes). Instead the value + * is written as the size of an int_f. * SOURCE */ @@ -1761,19 +1763,18 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; - hid_t c_type_id; char* c_name; size_t c_namelen; - int_f c_value; herr_t error; + int_f c_value; c_namelen = *namelen; c_name = (char *)HD5f2cstring(name, c_namelen); if (c_name == NULL) return ret_value; - c_type_id = (hid_t)*type_id; - c_value = (int)*value; - error = H5Tenum_insert(c_type_id, c_name, &c_value); + c_value = *value; + error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value); + HDfree(c_name); if(error < 0) return ret_value; @@ -2421,3 +2422,46 @@ h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void return ret_value; } +/****if* H5Tf/h5tenum_insert_ptr_c + * NAME + * /h5tenum_insert_ptr_c + * PURPOSE + * Calls H5Tenum_insert + * INPUTS + * type_id - Datatype identifier for the enumeration datatype. + * name - Datatype identifier. + * value - Pointer to the value of the new member. + * + * OUTPUTS + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * February 6, 2015 + * + * SOURCE +*/ +int_f +h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value) +/******/ +{ + int ret_value = -1; + hid_t status; + char *c_name; + size_t c_namelen; + + /* + * Convert FORTRAN name to C name + */ + c_namelen = *namelen; + c_name = (char *)HD5f2cstring(name, c_namelen); + if (c_name == NULL) return ret_value; + + status = H5Tenum_insert( (hid_t)*type_id, c_name, value); + if ( status < 0 ) return ret_value; + ret_value = 0; + return ret_value; +} + + diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 index 0e1dbb0..4b4c0b6 100644 --- a/fortran/src/H5Tff.f90 +++ b/fortran/src/H5Tff.f90 @@ -2335,57 +2335,6 @@ CONTAINS hdferr = h5tenum_create_c(parent_id, new_type_id) END SUBROUTINE h5tenum_create_f - -! -!****s* H5T/h5tenaum_insert_f -! -! NAME -! h5tenaum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value !value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f - ! !****s* H5T/h5tenum_nameof_f ! diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90 index 2405837..2c9f212 100644 --- a/fortran/src/H5Tff_F03.f90 +++ b/fortran/src/H5Tff_F03.f90 @@ -47,6 +47,11 @@ MODULE H5T_PROVISIONAL !***** + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE + CONTAINS !****s* H5T (F03)/H5Tconvert_f_F03 @@ -93,6 +98,7 @@ CONTAINS BIND(C, NAME='h5tconvert_c') USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr USE H5GLOBAL + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_id INTEGER(HID_T) , INTENT(IN) :: dst_id INTEGER(SIZE_T), INTENT(IN) :: nelmts @@ -111,6 +117,107 @@ CONTAINS hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) END SUBROUTINE h5tconvert_f +! +!****s* (F03) H5T/h5tenum_insert_f90 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member + INTEGER, INTENT(IN) :: value ! value of the new member + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* (F03) H5T/h5tenum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Pointer to the value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 6, 2015 +! +! HISTORY +! F2003 implementation of function +! SOURCE + SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90 index a95b31f..380fbec 100644 --- a/fortran/src/H5Tff_F90.f90 +++ b/fortran/src/H5Tff_F90.f90 @@ -36,4 +36,60 @@ MODULE H5T_PROVISIONAL + USE H5GLOBAL + +CONTAINS + +! +!****s* H5T/h5tenum_insert_f +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f + END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 05e525d..a149109 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -471,14 +471,11 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* * H5G flags */ - - h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; - h5g_flags[1] = (int_f)H5O_TYPE_GROUP; - h5g_flags[2] = (int_f)H5O_TYPE_DATASET; - h5g_flags[3] = (int_f)H5O_TYPE_NAMED_DATATYPE; -/* This value can no longer be returned and all these flags should be updated - * to reflect the refinements between links and objects. -QAK */ -/* h5g_flags[4] = H5G_LINK; */ + h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; /* H5G_UNKNOWN is deprecated */ + h5g_flags[1] = (int_f)H5O_TYPE_GROUP; /* H5G_GROUP is deprecated */ + h5g_flags[2] = (int_f)H5O_TYPE_DATASET; /* H5G_DATASET is deprecated */ + h5g_flags[3] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* H5G_TYPE is deprecated */ + h5g_flags[4] = (int_f)H5L_SAME_LOC; h5g_flags[5] = (int_f)H5L_TYPE_ERROR; h5g_flags[6] = (int_f)H5L_TYPE_HARD; h5g_flags[7] = (int_f)H5L_TYPE_SOFT; @@ -491,7 +488,6 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* * H5I flags */ - h5i_flags[0] = (int_f)H5I_FILE; h5i_flags[1] = (int_f)H5I_GROUP; h5i_flags[2] = (int_f)H5I_DATATYPE; @@ -551,10 +547,15 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES; h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE; +/* Types of objects in file */ + h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */ + h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */ + h5o_flags[24] = (int_f)H5O_TYPE_DATASET; /* Object is a dataset */ + h5o_flags[25] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* Object is a named data type */ + h5o_flags[26] = (int_f)H5O_TYPE_NTYPES; /* Number of different object types */ /* * H5P flags */ - h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE; h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS; h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE; diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index da1837a..ca50e20 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -44,6 +44,8 @@ MODULE H5GLOBAL USE H5FORTRAN_TYPES + IMPLICIT NONE + ! Definitions for reference datatypes. ! If you change the value of these parameters, do not forget to change corresponding ! values in the H5f90.h file. @@ -309,8 +311,6 @@ MODULE H5GLOBAL EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) - - ! ! H5G flags declaration ! @@ -325,8 +325,9 @@ MODULE H5GLOBAL INTEGER :: H5G_GROUP_F INTEGER :: H5G_DATASET_F INTEGER :: H5G_TYPE_F - ! XXX: Fix problems with H5G_LINK_F! - QAK INTEGER :: H5G_LINK_F + INTEGER :: H5G_UDLINK_F + INTEGER :: H5G_SAME_LOC_F INTEGER :: H5G_LINK_ERROR_F INTEGER :: H5G_LINK_HARD_F INTEGER :: H5G_LINK_SOFT_F @@ -335,16 +336,14 @@ MODULE H5GLOBAL INTEGER :: H5G_STORAGE_TYPE_COMPACT_F INTEGER :: H5G_STORAGE_TYPE_DENSE_F - EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) - EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) - EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) - EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) - ! XXX: Fix problems with H5G_LINK_F! - QAK ! these are really H5L values -MSB- - EQUIVALENCE(H5G_flags(5), H5G_LINK_F) + EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type + EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group + EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset + EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type + EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) - ! XXX EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) @@ -574,7 +573,7 @@ MODULE H5GLOBAL ! ! H5O flags declaration ! - INTEGER, PARAMETER :: H5O_FLAGS_LEN = 22 + INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 INTEGER :: H5o_flags(H5O_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ @@ -603,6 +602,11 @@ MODULE H5GLOBAL INTEGER :: H5O_HDR_ALL_FLAGS_F INTEGER :: H5O_SHMESG_MAX_NINDEXES_F INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F + INTEGER :: H5O_TYPE_UNKNOWN_F + INTEGER :: H5O_TYPE_GROUP_F + INTEGER :: H5O_TYPE_DATASET_F + INTEGER :: H5O_TYPE_NAMED_DATATYPE_F + INTEGER :: H5O_TYPE_NTYPES_F EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) @@ -626,6 +630,11 @@ MODULE H5GLOBAL EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) + EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) + EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) + EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) + EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) + EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) ! ! H5P flags declaration diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 284ffbd..b5e40a8 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -772,6 +772,7 @@ H5_FCDLL int_f nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); H5_FCDLL int_f nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value); H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 7e6b2eb..7466528 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -112,7 +112,8 @@ noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs @@ -553,7 +554,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -734,7 +734,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 202 +LT_VERS_REVISION = 205 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index c9c5e76..48fb343 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -543,7 +543,6 @@ H5T_mp_H5TINSERT_F H5T_mp_H5TPACK_F H5T_mp_H5TARRAY_CREATE_F H5T_mp_H5TENUM_CREATE_F -H5T_mp_H5TENUM_INSERT_F H5T_mp_H5TENUM_NAMEOF_F H5T_mp_H5TENUM_VALUEOF_F H5T_mp_H5TGET_MEMBER_VALUE_F @@ -560,6 +559,9 @@ H5T_mp_H5TGET_CREATE_PLIST_F H5T_mp_H5TCOMPILER_CONV_F H5T_mp_H5TGET_NATIVE_TYPE_F @H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F +@H5_F03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F90 +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F03 ; H5Z H5Z_mp_H5ZUNREGISTER_F H5Z_mp_H5ZFILTER_AVAIL_F diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index d10f2ef..3395906 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- @@ -10,6 +10,7 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${ # Add Test Lib #----------------------------------------------------------------------------- add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c) +set_source_files_properties (t.c PROPERTIES LANGUAGE C) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} @@ -18,12 +19,14 @@ target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE}) set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran + LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) # See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then # fall back to F2003. If F2003 not supported then use F90 for the tests. +set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran) if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90) elseif (HDF5_ENABLE_F2003) @@ -36,7 +39,7 @@ endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) set (SHARED_LINK_FLAGS " ") if (WIN32) if (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL) + set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_TEST_DLL) if (MSVC) set (SHARED_LINK_FLAGS "/DLL") endif (MSVC) @@ -53,6 +56,7 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE}) set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran + LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index 6a9c535..4df50ad 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -11,11 +11,13 @@ set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSIO #-- Adding test for testhdf5_fortran_1_8 add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>) set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") +set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran) #-- Adding test for fortranlib_test_F03 if (HDF5_ENABLE_F2003) add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>) set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8) endif (HDF5_ENABLE_F2003) #-- Adding test for fflush1 diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index ca91cf5..c2055c4 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -92,7 +92,8 @@ check_PROGRAMS = $(am__EXEEXT_2) TESTS = $(am__EXEEXT_2) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs @@ -562,7 +563,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 index f15424d..e019d0f 100644 --- a/fortran/test/tH5T_F03.f90 +++ b/fortran/test/tH5T_F03.f90 @@ -1419,7 +1419,7 @@ SUBROUTINE t_enum(total_error) ! Insert enumerated value for memtype. ! val(1) = i - CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), val(1), error) + CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), C_LOC(val(1)), error) CALL check("H5Tenum_insert_f", error, total_error) ! ! Insert enumerated value for filetype. We must first convert @@ -1428,7 +1428,11 @@ SUBROUTINE t_enum(total_error) f_ptr = C_LOC(val(1)) CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) CALL check("H5Tconvert_f",error, total_error) - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) + IF(i.GE.1)THEN ! test both F90 and F03 APIs + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) + ELSE + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) + ENDIF CALL check("H5Tenum_insert_f",error, total_error) ENDDO ! @@ -3134,7 +3138,7 @@ SUBROUTINE t_enum_conv(total_error) ENUMERATOR :: E1_RED, E1_GREEN, E1_BLUE, E1_WHITE, E1_BLACK END ENUM - INTEGER :: val + INTEGER(KIND(E1_RED)), TARGET :: val ! Enumerated data array ! Some values are out of range for testing. The library should accept them @@ -3185,19 +3189,19 @@ SUBROUTINE t_enum_conv(total_error) ! Initialize enum data. ! val = E1_RED - CALL H5Tenum_insert_f(dtype, "RED", val, error) + CALL H5Tenum_insert_f(dtype, "RED", C_LOC(val), error) CALL check("h5tenum_insert_f",error, total_error) val = E1_GREEN - CALL H5Tenum_insert_f(dtype, "GREEN", val, error) + CALL H5Tenum_insert_f(dtype, "GREEN", C_LOC(val), error) CALL check("h5tenum_insert_f",error, total_error) val = E1_BLUE - CALL H5Tenum_insert_f(dtype, "BLUE", val, error) + CALL H5Tenum_insert_f(dtype, "BLUE", C_LOC(val), error) CALL check("h5tenum_insert_f",error, total_error) val = E1_WHITE - CALL H5Tenum_insert_f(dtype, "WHITE", val, error) + CALL H5Tenum_insert_f(dtype, "WHITE", C_LOC(val), error) CALL check("h5tenum_insert_f",error, total_error) val = E1_BLACK - CALL H5Tenum_insert_f(dtype, "BLACK", val, error) + CALL H5Tenum_insert_f(dtype, "BLACK", C_LOC(val), error) CALL check("h5tenum_insert_f",error, total_error) ! ! Create dataspace. Setting maximum size to be the current size. diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90 index 063e93d..6d5911f 100644 --- a/fortran/test/tf.f90 +++ b/fortran/test/tf.f90 @@ -36,7 +36,7 @@ MODULE TH5_MISC CONTAINS !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: dreal_eq !DEC$endif LOGICAL FUNCTION dreal_eq(a,b) @@ -49,7 +49,7 @@ CONTAINS END FUNCTION dreal_eq !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: verify_real_kind_7 !DEC$endif SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) @@ -66,7 +66,7 @@ CONTAINS END SUBROUTINE verify_real_kind_7 !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: write_test_status !DEC$endif SUBROUTINE write_test_status( test_result, test_title, total_error) @@ -105,7 +105,7 @@ CONTAINS !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: check !DEC$endif SUBROUTINE check(string,error,total_error) @@ -119,7 +119,7 @@ CONTAINS END SUBROUTINE check !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: verify !DEC$endif SUBROUTINE VERIFY(string,value,correct_value,total_error) @@ -133,7 +133,7 @@ CONTAINS END SUBROUTINE verify !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: verify_Fortran_INTEGER_4 !DEC$endif SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error) @@ -150,7 +150,7 @@ CONTAINS END SUBROUTINE verify_Fortran_INTEGER_4 !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: verifyLogical !DEC$endif SUBROUTINE verifyLogical(string,value,correct_value,total_error) @@ -165,7 +165,7 @@ CONTAINS END SUBROUTINE verifyLogical !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: verifyString !DEC$endif SUBROUTINE verifyString(string, value,correct_value,total_error) @@ -203,7 +203,7 @@ CONTAINS SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) ! !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_fixname_f !DEC$endif USE H5GLOBAL @@ -263,7 +263,7 @@ CONTAINS SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) ! !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_cleanup_f !DEC$endif USE H5GLOBAL @@ -315,7 +315,7 @@ CONTAINS SUBROUTINE h5_exit_f(status) ! !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_exit_f !DEC$endif IMPLICIT NONE @@ -352,7 +352,7 @@ CONTAINS SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) ! !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_env_nocleanup_f !DEC$endif IMPLICIT NONE diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90 index 4513783..b3f1399 100644 --- a/fortran/test/tf_F03.f90 +++ b/fortran/test/tf_F03.f90 @@ -66,7 +66,7 @@ MODULE TH5_MISC_PROVISIONAL CONTAINS !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_cmpd !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) @@ -78,7 +78,7 @@ CONTAINS END FUNCTION H5_SIZEOF_CMPD !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_chr !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) @@ -90,7 +90,7 @@ CONTAINS END FUNCTION H5_SIZEOF_CHR !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_i !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) @@ -102,7 +102,7 @@ CONTAINS END FUNCTION H5_SIZEOF_I !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_sp !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) @@ -114,7 +114,7 @@ CONTAINS END FUNCTION H5_SIZEOF_SP !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_dp !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90 index 5583f3f..20c2859 100644 --- a/fortran/test/tf_F08.f90 +++ b/fortran/test/tf_F08.f90 @@ -65,7 +65,7 @@ MODULE TH5_MISC_PROVISIONAL CONTAINS !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_cmpd !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) @@ -77,7 +77,7 @@ CONTAINS END FUNCTION H5_SIZEOF_CMPD !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_chr !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) @@ -89,7 +89,7 @@ CONTAINS END FUNCTION H5_SIZEOF_CHR !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_i !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) @@ -102,7 +102,7 @@ CONTAINS !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_sp !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) @@ -114,7 +114,7 @@ CONTAINS END FUNCTION H5_SIZEOF_SP !This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) +!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: h5_sizeof_dp !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 3361220..dfe9ce7 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 583b6dc..97e59ed 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -109,7 +109,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = subdir = fortran/testpar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs @@ -488,7 +489,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ diff --git a/fortran/testpar/ptest.f90 b/fortran/testpar/ptest.f90 index e474668..69594b0 100644 --- a/fortran/testpar/ptest.f90 +++ b/fortran/testpar/ptest.f90 @@ -19,6 +19,7 @@ PROGRAM parallel_test USE hdf5 + IMPLICIT NONE INCLUDE 'mpif.h' |