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

Add test suite for the Hermes VFD #416

Merged
merged 32 commits into from
Apr 28, 2022
Merged

Add test suite for the Hermes VFD #416

merged 32 commits into from
Apr 28, 2022

Conversation

ChristopherHogan
Copy link
Collaborator

Closes #378. Closes #385. Closes #386.

  • I tried to follow the same structure as the other adapter tests so that we can eventually reduce code duplication in the adapters.
  • Fixed several bugs in the VFD.
  • Since we need to intercept HDF5 and MPI initialization and finalization, libhdf5_hermes_vfd.so must be LD_PRELOADed in addition to setting HDF5_DRIVER=hermes.

@ChristopherHogan ChristopherHogan added testing Related to automated testing or CI vfd Related to the Hermes HDF5 virtual file driver labels Apr 27, 2022
@ChristopherHogan ChristopherHogan self-assigned this Apr 27, 2022
# because of the way dynamic plugin loading works in HDF5. When searching
# for a VFD, HDF5 will dlopen and dlclose every shared library in
# HDF5_PLUGIN_PATH looking for a valid VFD, and when it goes through this
# process with libhermes.so it resets some statically initialized variables.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish you could split the setence for clarity.

When searching for a VFD, HDF5 will dlopen and dlclose every shared library in
HDF5_PLUGIN_PATH looking for a valid VFD. When HDF5 goes through this
process with libhermes.so, it resets some statically initialized variables.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

endforeach()
endfunction()

add_test(NAME "TestVfd" COMMAND hermes_vfd_test --reporter compact -d yes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for using Vfd instead of VFD?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It's easier to type.
  2. I tend to use that convention because when you capitalize an acronym in camel case the acronym runs into the next word and is harder to read in my opinion. For example, in VFDTest the D and T run together whereas VfdTest has a clear separation between the two words.

add_test(NAME "TestVfd" COMMAND hermes_vfd_test --reporter compact -d yes)
set_vfd_test_properties("TestVfd")
set_property(TEST "TestVfd" APPEND
PROPERTY ENVIRONMENT HDF5_DRIVER_CONFIG=true\ 65536)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is \ 65536 for after true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

65 KiB page size. If you're curious about the \, if I pass the config string as "true 65536" then CMake retains the quotes in the value of the environment variable. Using \ escapes the space and sets the value of the variable to true 65536 without the quotes.

add_test(NAME ${IOR_TEST_NAME} COMMAND ${IOR_EXE} -a HDF5 -w -W -r -R)
set_vfd_test_properties(${IOR_TEST_NAME})
set_property(TEST ${IOR_TEST_NAME} APPEND
PROPERTY ENVIRONMENT HDF5_DRIVER_CONFIG=true\ 262144)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is \ 262144 for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

256 KiB page size.

@hyoklee hyoklee self-requested a review April 27, 2022 20:05
return result;
}

/** Returns a string in the range ["0", "upper_bound") */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it "upper_bound-1"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using interval notation. The [ includes 0 on the left, but the ) on the right means up to but not including upper_bound.

@coveralls
Copy link

coveralls commented Apr 27, 2022

Coverage Status

Coverage increased (+0.3%) to 81.793% when pulling 0559fec on chogan/vfd_tests into d196433 on master.

@ChristopherHogan ChristopherHogan merged commit d2285f2 into master Apr 28, 2022
@ChristopherHogan ChristopherHogan deleted the chogan/vfd_tests branch April 28, 2022 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to automated testing or CI vfd Related to the Hermes HDF5 virtual file driver
Projects
None yet
3 participants