We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I wrote subroutines to support HDF5 files, see: https://github.com/alvarovm/madness/blob/h5files/src/madness/world/h5_archive.h
For now, I am just saving one dataset per file. See example below.
It would be great if you could give feedback. I could clean up and send a PR to the main branch if this is useful.
Thanks
#include <madness/world/info.h> #include <cstdio> #include <vector> #include <iostream> using namespace madness; #include <madness/world/h5_archive.h> using madness::archive::H5OutputArchive; using madness::archive::H5InputArchive; template <class OutputArchive> void test_out(const OutputArchive& oar) { constexpr const int n = 3; oar & n; } int main(int argc, char** argv) { std::cout << "git revision " << info::git_commit() << std::endl; std::string name = "dsetmad.h5"; std::vector<int> v = { 7, 5, 16, 8 ,9 }; std::vector<int> vi = { 0, 0, 0, 0 ,0 }; // Print out the vector std::cout << "v = { "; for (int n : v) { std::cout << n << ", "; } std::cout << "}; \n"; std::cout << "v is size "<< v.size() << std::endl; { #Write H5 FILE const char *f = "test.h5"; std::cout << std::endl << "testing h5 archive" << std::endl; H5OutputArchive oar(f); oar & v; oar.flush(); oar.close(); # Read H5 FILE H5InputArchive iar(f); iar & vi; iar.close(); // Print out the vector std::cout << "vi = { "; for (int n : vi) { std::cout << n << ", "; } std::cout << "}; \n"; } return 0; }
The text was updated successfully, but these errors were encountered:
Alvaro ... sorry ... did not see this until now. Is this the same as you just merged into the main tree?
Sorry, something went wrong.
Yes. It is the same, just updated
No branches or pull requests
Hello,
I wrote subroutines to support HDF5 files, see:
https://github.com/alvarovm/madness/blob/h5files/src/madness/world/h5_archive.h
For now, I am just saving one dataset per file. See example below.
It would be great if you could give feedback. I could clean up and send a PR to the main branch if this is useful.
Thanks
The text was updated successfully, but these errors were encountered: