diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-08-11 01:22:33 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-08-11 01:22:33 (GMT) |
commit | 3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764 (patch) | |
tree | f301ab5333168d7bfa691bee703dd076f569fc46 /fortran/test/tH5G_1_8.f90 | |
parent | 415eb5512b0726716b5f8f72de3dda11ecff8091 (diff) | |
download | hdf5-3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764.zip hdf5-3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764.tar.gz hdf5-3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764.tar.bz2 |
[svn-r27489] reverted merge of branch
Diffstat (limited to 'fortran/test/tH5G_1_8.f90')
-rw-r--r-- | fortran/test/tH5G_1_8.f90 | 207 |
1 files changed, 120 insertions, 87 deletions
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90 index ddc3736..ab75163 100644 --- a/fortran/test/tH5G_1_8.f90 +++ b/fortran/test/tH5G_1_8.f90 @@ -31,13 +31,11 @@ MODULE TH5G_1_8 - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE group_test(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -141,6 +139,9 @@ END SUBROUTINE group_test SUBROUTINE group_info(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -268,7 +269,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Check for out of bound query by index on empty group, should fail CALL H5Gget_info_by_idx_f(group_id, ".", H5_INDEX_NAME_F, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error) - CALL verify("H5Gget_info_by_idx_f", error, -1, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", error, -1, total_error) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 @@ -286,29 +287,29 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new/empty) group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, 0, total_error) - CALL verify("H5Gget_info_f", nlinks, 0, total_error) - CALL verify("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, 0, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, 0, total_error) + CALL verifyLogical("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error, mounted=mounted) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new/empty) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) - CALL verify("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL verifyLogical("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name", error, total_error) ! Check (new/empty) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) ! Create objects in new group created DO v = 0, u @@ -330,27 +331,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new) group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f",max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f",max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information IF(order.NE.H5_ITER_NATIVE_F)THEN @@ -358,17 +359,17 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(u,HSIZE_T), & storage_type, nlinks, max_corder, error,lapl_id=H5P_DEFAULT_F, mounted=mounted) CALL check("H5Gget_info_by_idx_f", error, total_error) - CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) ELSE CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error, mounted=mounted) - CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) CALL check("H5Gget_info_by_idx_f", error, total_error) ENDIF ! Check (new) group's information - CALL verify("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_idx_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_idx_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", nlinks, u+1, total_error) ENDIF ! Close group created CALL H5Gclose_f(group_id2, error) @@ -379,27 +380,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check main group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(file_id, CORDER_GROUP_NAME, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(group_id, ".", storage_type, nlinks, max_corder, error, H5P_DEFAULT_F) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Create soft link in another group, to objects in main group valname = CORDER_GROUP_NAME//objname @@ -411,9 +412,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check soft link group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) ENDDO ! Close the groups @@ -455,6 +456,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE timestamps(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -487,7 +491,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL verify("H5Pget_obj_track_times",track_times,.TRUE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times",track_times,.TRUE.,total_error) ! Set a non-default object timestamp setting CALL H5Pset_obj_track_times_f(gcpl_id, .FALSE., error) @@ -498,7 +502,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL verify("H5Pget_obj_track_times",track_times,.FALSE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times",track_times,.FALSE.,total_error) ! Create file !h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -529,10 +533,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Query & verify the object timestamp settings CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) ! Query the object information for each group ! if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -589,10 +593,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) !!$ !!$ Query the object information for each group !!$ if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -649,6 +653,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE mklinks(fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -704,12 +711,12 @@ SUBROUTINE group_info(cleanup, fapl, total_error) error, H5P_DEFAULT_F) CALL check("H5Lget_info_f",error,total_error) -! CALL verify("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) +! CALL VerifyLogical("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) - CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) - CALL verify("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) ! should be '/d1' + NULL character = 4 - CALL verify("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) ! Create a symbolic link to something that doesn't exist @@ -742,6 +749,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE test_move_preserves(fapl_id, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl_id @@ -788,14 +798,14 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL verify("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) + CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) CALL H5Pset_link_creation_order_f(fcpl_id, H5P_CRT_ORDER_TRACKED_F, error) CALL check("H5Pset_link_creation_order_f", error, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL verify("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) + CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) ! Create file ! (with creation order tracking for the root group) @@ -825,10 +835,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR old_cset = cset - CALL verify("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) - CALL verify("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) + CALL VERIFY("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) + CALL VerifyLogical("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) old_corder = corder; - CALL verify("H5Lget_info_f",old_corder,0,total_error) + CALL VERIFY("H5Lget_info_f",old_corder,0,total_error) ! old_modification_time = oinfo.mtime; @@ -946,6 +956,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! SUBROUTINE lifecycle(cleanup, fapl2, total_error) + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl2 @@ -1091,6 +1105,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) SUBROUTINE cklinks(fapl, total_error) +! USE ISO_C_BINDING + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1128,10 +1146,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Lexists_f(file,"d1",Lexists, error) - CALL verify("H5Lexists", Lexists,.TRUE.,total_error) + CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) CALL H5Lexists_f(file,"grp1/hard",Lexists, error) - CALL verify("H5Lexists", Lexists,.TRUE.,total_error) + CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) ! Cleanup CALL H5Fclose_f(file,error) @@ -1158,6 +1176,9 @@ END SUBROUTINE cklinks ! SUBROUTINE delete_by_idx(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1273,7 +1294,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! Check for deletion on empty group CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) - CALL verify("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL VERIFY("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 ! Make name for link @@ -1298,7 +1319,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) htmp =9 !EP CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(u,HSIZE_T), error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, htmp, error) - CALL verify("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL VERIFY("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Delete links from compact group @@ -1319,21 +1340,21 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL H5Iget_type_f(grp, id_type, error) CALL check("H5Iget_type_f", error, total_error) - CALL verify("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) + CALL VERIFY("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) CALL H5Gclose_f(grp, error) CALL check("H5Gclose_f", error, total_error) - CALL verify("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) + CALL VerifyLogical("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) - CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) IF(iorder.EQ.H5_ITER_INC_F)THEN - CALL verify("H5Lget_info_by_idx_f", corder, u+1, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, u+1, total_error) ELSE - CALL verify("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) ENDIF - CALL verify("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) @@ -1350,7 +1371,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) !!$ ENDIF !!$ objname = 'fill '//chr2 !!$ PRINT*,objname, tmpname -!!$ CALL verify("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) +!!$ CALL verifyString("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) ENDDO ! Close the group @@ -1397,6 +1418,9 @@ END SUBROUTINE delete_by_idx SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & hard_link, use_index, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: group_id @@ -1431,14 +1455,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, 0, total_error) ! Verify the link information for new link, in increasing creation order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL verify("H5Lget_info_by_idx_f", corder, n, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, n, total_error) ! Verify value for new soft link, in increasing creation order !!$ IF(hard_link)THEN @@ -1457,21 +1481,21 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_small, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname_small)), tmpname_small(1:LEN(tmpname_small)), total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! try it with the correct size CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname, error, size=size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname)), tmpname(1:LEN(tmpname)), total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_big, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:7), tmpname_big(1:7), total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! Try with a buffer set to small @@ -1498,6 +1522,9 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & SUBROUTINE test_lcpl(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1564,7 +1591,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- - CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) + CALL VERIFY("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) ! Create and commit a datatype with the default LCPL CALL h5tcopy_f(H5T_NATIVE_INTEGER, type_id, error) @@ -1625,10 +1652,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & DO i = 1, 2 tmp1 = INT(dimsout(i)) tmp2 = INT(extend_dim(i)) - CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) tmp1 = INT(maxdimsout(i)) tmp2 = INT(dims(i)) - CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) ENDDO ! close data set @@ -1695,7 +1722,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Pget_char_encoding_f(lcpl_id, encoding, error) CALL check("H5Pget_char_encoding_f", error, total_error) - CALL verify("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) + CALL VERIFY("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "dataset2", & @@ -1717,7 +1744,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lexists_f(file_id,"/dataset2_link",Lexists, error) CALL check("H5Lexists",error, total_error) - CALL verify("H5Lexists", Lexists,.TRUE.,total_error) + CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) ! Check that its character encoding is ASCII CALL H5Lget_info_f(file_id, "/dataset2_link", & @@ -1807,6 +1834,9 @@ END SUBROUTINE test_lcpl SUBROUTINE objcopy(fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1837,7 +1867,7 @@ SUBROUTINE objcopy(fapl, total_error) ! Verify object copy flags CALL H5Pget_copy_object_f(pid, cpy_flags, error) CALL check("H5Pget_copy_object_f",error, total_error) - CALL verify("H5Pget_copy_object_f", cpy_flags, flag, total_error) + CALL VERIFY("H5Pget_copy_object_f", cpy_flags, flag, total_error) !!$ !!$ CALL test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, @@ -1868,6 +1898,9 @@ END SUBROUTINE objcopy SUBROUTINE lapl_nlinks( fapl, total_error) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error @@ -1939,7 +1972,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) nlinks = 0 CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f",error,total_error) - CALL verify("H5Pset_nlinks_f",INT(nlinks), 20, total_error) + CALL VERIFY("H5Pset_nlinks_f",INT(nlinks), 20, total_error) ! Open object through what is normally too many soft links using @@ -1951,7 +1984,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL verify("h5iget_name_f", TRIM(objname),"/soft17", total_error) + CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft17", total_error) ! Create group using soft link CALL H5Gcreate_f(gid, "new_soft", gid2, error) CALL check("H5Gcreate_f", error, total_error) @@ -1973,12 +2006,12 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pget_nlinks_f",error,total_error) - CALL verify("H5Pget_nlinks_f", INT(nlinks), 4, total_error) + CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 4, total_error) ! Try opening through what is now too many soft links CALL H5Oopen_f(fid,"soft5",gid,error,plist) - CALL verify("H5Oopen_f", error, -1, total_error) ! should fail + CALL VERIFY("H5Oopen_f", error, -1, total_error) ! should fail ! Open object through lesser soft link CALL H5Oopen_f(fid,"soft4",gid,error,plist) @@ -1987,7 +2020,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL verify("h5iget_name_f", TRIM(objname),"/soft4", total_error) + CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft4", total_error) ! Test other functions that should use a LAPL nlinks = 20 |