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
Performing multiple HDF5 operations "captures" cout,cerr #401
Comments
Not sure why that would be, those are just wrappers around a call to the ITensor/itensor/util/h5/wrap_h5.hpp Lines 43 to 47 in 167aaff
@emstoudenmire (or @Wentzell), any idea? |
That's very strange. I have adjusted the example to use https://github.com/TRIQS/h5 directly #include <h5/h5.hpp>
int main(int argc, char *argv[]) {
auto ofHandle0 = h5::file("test_0.h5",'w');
ofHandle0.close();
std::cout << "cout 0" << std::endl;
std::cerr << "cerr 0" << std::endl;
auto ofHandle1 = h5::file("test_1.h5",'w');
ofHandle1.close();
std::cout << "cout 1" << std::endl;
std::cerr << "cerr 1" << std::endl;
auto ofHandle2 = h5::file("test_2.h5",'w');
ofHandle2.close();
std::cout << "cout 2" << std::endl;
std::cerr << "cerr 2" << std::endl;
return 0;
} Both for the release branch
@brendenroberts Could you try the example above in your build environment?
mkdir h5_src/build && cd h5_src/build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install && make stream_issue
./test/c++/stream_issue |
Your direct example works as expected for me also. |
Ok. In that case the issue should be related to either the TRIQS/h5 version I would suggest to first update the version within ITensor and see if the problem persists. |
@mtfishman @emstoudenmire Would you agree? If so, could either of you look into that? |
Thanks @Wentzell. The issue seems to be with the calls to |
Ok. |
Yeah, I'm trying to search the source code for the free function |
I guess we should remove it from the unit tests and docs in favor of |
Hi guys, on my system performing multiple HDF5 operations somehow "captures" cout and cerr, and they don't seem to point to the right buffers afterward. I tried this with the newest commit and v3.1.9 as well as C++17 and C++20. In all cases running the following example:
produces only
Adding more flushes doesn't make a difference, and other iostreams don't seem to be affected.
The text was updated successfully, but these errors were encountered: