-
Notifications
You must be signed in to change notification settings - Fork 44
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
Write HDF5 Error for large matrix #702
Comments
Hi DASH Community, Bests, |
I will look into it this week. |
The problem is not the total size of the NArray, it is the size of the extension. E.g. 21 x 20 also results in an error. For 21 a the first rank has 11 elements in the first dimension, but the second one only 20. This seems to be a problem. I tried it with the outputstream. In the end it should be the same result. #define N1 200
#define N2 15000
#define FILENAME "example.hdf5"
int main(int argc, char *argv[])
{
dash::init(&argc, &argv);
dash::Matrix<double, 2> h5matrix(dash::SizeSpec<2>(N1, N2));
auto myid = dash::myid();
if (!myid) {
for (int i = 0; i < N1; i++) {
for (int j = 0; j < N2; j++)
h5matrix.at(i, j) = i + j;
}
}
dash::io::hdf5::OutputStream os(FILENAME);
os << dash::io::hdf5::dataset("group/data") << h5matrix;
dash::barrier();
if(dash::myid() == 0){
std::string syscall = "h5dump ";
auto status = system((syscall + FILENAME).c_str());
}
dash::finalize();
return 0;
}
|
It is a bug in the TilePattern. When you use the proxy dash::NArray instead of dash::Matrix it should work. dash::Matrix uses the per default the TilePattern while dash::Narray uses a BlockPattern instead. That's the only difference. |
little work around until we fixed the pattern |
I believe that is a longstanding issue that has never been properly implemented. If someone has a patch I would love that... |
The solution would be the same as for the BlockedPattern. Only the last Block is underfilled. If that is fine i will open a pull request. |
Absolutely, please give it a shot 👍 |
fixed with pr #713 |
I recently tested the code on a 1D data and found the StoreHDF::write and StoreHDF::read still can not work. Bests,
|
i'll look into it. I need to add the missing method inside the pattern. i'll try to do it this week. best |
It is fixed and merged to development. Btw. in your example code dash::init(&argc,&argv) is missing. |
Hi All,
Hope you are doing well under current virus epidemic situation. I understand that you may have important things to do now. I just posted an error information here in case you can get chance to look into it.
Recently, I tested the function StoreHDF::write and found out that it works on small matrix but has issue for large array on multiple processes (CPU units). Below is the code:
I compiled the code and ran it with 2 process, and it reports below error. Note that, if you change N1 and N2 in the code to small number, e.g, 10 by 10. It works.
The text was updated successfully, but these errors were encountered: