Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new H5E with tests. #4049

Merged
merged 33 commits into from
Mar 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2382f4e
new fortran H5E APIs
brtnfld Feb 9, 2024
9746295
Committing clang-format changes
github-actions[bot] Feb 9, 2024
eab3e07
new fortran H5E APIs
brtnfld Feb 9, 2024
e475b0f
fixed H5Eget_minor
brtnfld Feb 9, 2024
7f76e1c
Committing clang-format changes
github-actions[bot] Feb 9, 2024
b066b33
new API
brtnfld Feb 14, 2024
4657440
Merge branch 'develop' into gh3987
brtnfld Feb 15, 2024
4d3d7c6
H5Eget_msg
brtnfld Feb 16, 2024
b79e09e
added testing
brtnfld Feb 16, 2024
c287ec7
added testing
brtnfld Feb 16, 2024
c965f44
misc. fixes
brtnfld Feb 16, 2024
9df38de
Committing clang-format changes
github-actions[bot] Feb 16, 2024
daa96c2
added testing
brtnfld Feb 16, 2024
6dcff85
added more functions
brtnfld Feb 17, 2024
92bc43c
misc
brtnfld Feb 17, 2024
5705b33
misc2
brtnfld Feb 17, 2024
63a9115
misc3
brtnfld Feb 17, 2024
3861b97
debugging
brtnfld Feb 20, 2024
d3c701f
created new stack
brtnfld Feb 20, 2024
e6afa47
H5Eprint re-work
brtnfld Feb 23, 2024
0ed3b61
Committing clang-format changes
github-actions[bot] Feb 23, 2024
8672d31
H5Eprint re-work
brtnfld Feb 23, 2024
aadb14a
H5Eprint re-work
brtnfld Feb 23, 2024
d0dbc9b
completed testing
brtnfld Feb 23, 2024
9627f9b
H5Eset_auto test
brtnfld Feb 26, 2024
0233cba
updated Release notes
brtnfld Feb 26, 2024
64cf63d
Merge branch 'develop' into gh3987
brtnfld Feb 26, 2024
dd02654
revert
brtnfld Feb 26, 2024
c800073
corrected const
brtnfld Feb 26, 2024
74f258c
Committing clang-format changes
github-actions[bot] Feb 26, 2024
3720bf7
space clean-up
brtnfld Feb 26, 2024
91eb08d
updated release notes
brtnfld Feb 26, 2024
934b271
updated Release notes
brtnfld Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
completed testing
brtnfld committed Feb 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d0dbc9b908e590cbb1d260ea5d67fd0dce3524ce
2 changes: 1 addition & 1 deletion fortran/src/H5Eff.F90
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ INTEGER FUNCTION h5eprint_c(err_stack, name, namelen) BIND(C,NAME='h5eprint_c')
IMPORT :: C_CHAR, HID_T, C_PTR
IMPLICIT NONE
INTEGER(HID_T) :: err_stack
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name
TYPE(C_PTR), VALUE :: namelen
END FUNCTION h5eprint_c
END INTERFACE
56 changes: 44 additions & 12 deletions fortran/test/tH5E_F03.F90
Original file line number Diff line number Diff line change
@@ -233,8 +233,7 @@ SUBROUTINE test_error(total_error)
CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error)
CALL verify("h5dcreate_f", error, -1, total_error)

!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error)
!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error)
CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data, 990, total_error)

!!$ ! Test enabling and disabling default printing
!!$
@@ -333,7 +332,7 @@ SUBROUTINE test_error_stack(total_error)
ptr2 = C_LOC(func)
ptr3 = C_LOC(line)

call h5ecreate_stack_f(estack_id, error)
CALL h5ecreate_stack_f(estack_id, error)
CALL check("h5ecreate_stack_f", error, total_error)

! push a custom error message onto the stack
@@ -467,6 +466,16 @@ SUBROUTINE test_error_stack(total_error)
CALL check("h5eget_num_f", error, total_error)
CALL VERIFY("h5eget_num_f", count, 1_SIZE_T, total_error)

CALL H5Ecreate_stack_f(estack_id2, error)
CALL check("H5Ecreate_stack_f", error, total_error)

CALL H5Eappend_stack_f(estack_id2, estack_id, .FALSE., error)
CALL check("H5Eappend_stack_f", error, total_error)

CALL h5eget_num_f(estack_id2, count, error)
CALL check("h5eget_num_f", error, total_error)
CALL VERIFY("h5eget_num_f", count, 1_SIZE_T, total_error)

! Copy error stack, which clears the original
CALL H5Eget_current_stack_f(estack_id1, error)
CALL check("H5Eget_current_stack_f", error, total_error)
@@ -475,6 +484,38 @@ SUBROUTINE test_error_stack(total_error)
CALL check("h5eget_num_f", error, total_error)
CALL VERIFY("h5eget_num_f", count, 0_SIZE_T, total_error)

CALL H5Eclose_stack_f(estack_id2, error)
CALL check(" H5Eclose_stack_f", error, total_error)

CALL H5Eclose_stack_f(estack_id, error)
CALL check("H5Eclose_stack_f", error, total_error)

CALL H5Eclose_stack_f(estack_id1, error)
CALL check("H5Eclose_stack_f", error, total_error)

CALL h5ecreate_stack_f(estack_id1, error)
CALL check("h5ecreate_stack_f", error, total_error)

! push a custom error message onto the stack
CALL H5Epush_f(estack_id1, cls_id, major, minor, "%s ERROR TEXT %s"//C_NEW_LINE, error, &
ptr1, ptr2, ptr3, &
arg1=ACHAR(27)//"[31m", arg2=ACHAR(27)//"[0m" )
CALL check("H5Epush_f", error, total_error)

CALL H5Eset_current_stack_f(estack_id1, error) ! API will also close estack_id1
CALL check("H5Eset_current_stack_f", error, total_error)

CALL h5eget_num_f(H5E_DEFAULT_F, count, error)
CALL check("h5eget_num_f", error, total_error)
CALL VERIFY("h5eget_num_f", count, 1_SIZE_T, total_error)

CALL h5epop_f(H5E_DEFAULT_F, 1_size_t, total_error)
CALL check("h5epop_f", error, total_error)

CALL h5eget_num_f(H5E_DEFAULT_F, count, error)
CALL check("h5eget_num_f", error, total_error)
CALL VERIFY("h5eget_num_f", count, 0_SIZE_T, total_error)

CALL H5Eclose_msg_f(major, error)
CALL check("H5Eclose_msg_f", error, total_error)

@@ -484,15 +525,6 @@ SUBROUTINE test_error_stack(total_error)
CALL h5eunregister_class_f(cls_id, error)
CALL check("H5Eunregister_class_f", error, total_error)

CALL H5Ecreate_stack_f(estack_id2, error)
CALL check("H5Ecreate_stack_f", error, total_error)

CALL H5Eclose_stack_f(estack_id2, error)
CALL check(" H5Eclose_stack_f", error, total_error)

CALL H5Eclose_stack_f(estack_id, error)
CALL check("H5Eclose_stack_f", error, total_error)

END SUBROUTINE test_error_stack

END MODULE TH5E_F03