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

[false issue]can not load from file #15

Closed
myheren opened this issue Jul 18, 2017 · 1 comment
Closed

[false issue]can not load from file #15

myheren opened this issue Jul 18, 2017 · 1 comment

Comments

@myheren
Copy link

myheren commented Jul 18, 2017

I am using the following code to test this package。Notice that I used a different name in EigenHDF5::load, it won't work out and I get an IO exception:

Eigen::Matrix<long double, Eigen::Dynamic, Eigen::Dynamic> mat(3, 4), mat2;
    mat << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
    std::cout << mat << std::endl;
    {
        H5::H5File file("test_MatrixRoundTrip_LongDouble.h5", H5F_ACC_TRUNC);
        EigenHDF5::save(file, "longdouble_matrix", mat);
    }
    {
        H5::H5File file("test_MatrixRoundTrip_LongDouble.h5", H5F_ACC_RDONLY);
        EigenHDF5::load(file, "mat", mat2);
    }

Exception is :

HDF5-DIAG: Error detected in HDF5 (1.8.19) thread 0:
  #000: H5D.c line 356 in H5Dopen2(): not found
    major: Dataset
    minor: Object not found
  #001: H5Gloc.c line 428 in H5G_loc_find(): can't find object
    major: Symbol table
    minor: Object not found
  #002: H5Gtraverse.c line 859 in H5G_traverse(): internal path traversal failed
    major: Symbol table
    minor: Object not found
  #003: H5Gtraverse.c line 639 in H5G_traverse_real(): traversal operator failed
    major: Symbol table
    minor: Callback failed
  #004: H5Gloc.c line 383 in H5G_loc_find_cb(): object 'mat' doesn't exist
    major: Symbol table
    minor: Object not found
terminate called after throwing an instance of 'H5::FileIException'

I think the tests in this package do not really pass because if you use the same longdouble_matrix name when you load from "test_MatrixRoundTrip_LongDouble.h5", then I think you are using the same matrix when you saving to file and the data is never loaded from file.

@myheren myheren closed this as completed Jul 18, 2017
@myheren
Copy link
Author

myheren commented Jul 18, 2017

sorry, I am new with hdf5, I understand this name means dataset name now.

@myheren myheren changed the title can not load from file [false issue]can not load from file Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant