Skip to content

StoreHDF::write for 1D compile error #692

@Goon83

Description

@Goon83

Hi,
I am testing the HDF5 support in DASH. It reports compile error for 1D data at compile time.
Could you help to look at it ? See below for the code and error output.

Bests,
Bin

Code:

#include <libdash.h>
#include <iostream>

using dash::io::hdf5::hdf5_options;
using dash::io::hdf5::StoreHDF;

int main(int argc, char *argv[])
{
	dash::init(&argc, &argv);

	dash::Matrix<int, 1> *h5matrix = new dash::Matrix<int, 1>(dash::SizeSpec<1>(8));
	StoreHDF::write(*h5matrix, "testf.h5", "testg/testd");

	//2D works
	//dash::Matrix<int, 2> *h5matrix = new dash::Matrix<int, 2>(dash::SizeSpec<2>(8, 8));
	//StoreHDF::write(*h5matrix, "testf.h5", "testg/testd");

	dash::finalize();

	return EXIT_SUCCESS;
}

Error info:

In file included from h5-test.cpp:8:
In file included from /Users/dbin/opt/dash-0.4.0/include/libdash.h:71:
In file included from /Users/dbin/opt/dash-0.4.0/include/dash/io/HDF5.h:4:
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:477:39: error:
      no member named 'local_blockspec' in 'dash::TilePattern<1,
      dash::ROW_MAJOR, long>'
    const auto & lblockspec = pattern.local_blockspec();
                              ~~~~~~~ ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:582:12: note:
      in instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_get_hdf_slab_body<dash::TilePattern<1,
      dash::ROW_MAJOR, long> >' requested here
        1, _get_hdf_slab_body(pattern, {}));
           ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/internal/DriverImplZeroCopy.h:32:21: note:
      in instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_get_hdf_slabs<dash::TilePattern<1,
      dash::ROW_MAJOR, long> >' requested here
  auto hyperslabs = _get_hdf_slabs(container.pattern());
                    ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:733:5: note: in
      instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_process_dataset_impl_zero_copy<dash::Matrix<int,
      1, long, dash::TilePattern<1, dash::ROW_MAJOR, long>, dash::HostSpace> >'
      requested here
    _process_dataset_impl_zero_copy(StoreHDF::Mode::WRITE, container, h5dset,
    ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:234:5: note: in
      instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_write_dataset_impl<dash::Matrix<int, 1, long,
      dash::TilePattern<1, dash::ROW_MAJOR, long>, dash::HostSpace> >' requested
      here
    _write_dataset_impl(array, h5dset, internal_type);
    ^
h5-test.cpp:26:12: note: in instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::write<dash::Matrix<int, 1, long,
      dash::TilePattern<1, dash::ROW_MAJOR, long>, dash::HostSpace> >' requested
      here
        StoreHDF::write(*h5matrix, "testf.h5", "testg/testd");
                  ^
1 error generated.
#include <libdash.h>
#include <iostream>

using dash::io::hdf5::hdf5_options;
using dash::io::hdf5::StoreHDF;

int main(int argc, char *argv[])
{
	dash::init(&argc, &argv);

	dash::Matrix<int, 1> *h5matrix = new dash::Matrix<int, 1>(dash::SizeSpec<1>(8));
	StoreHDF::write(*h5matrix, "testf.h5", "testg/testd");

	//2D works
	//dash::Matrix<int, 2> *h5matrix = new dash::Matrix<int, 2>(dash::SizeSpec<2>(8, 8));
	//StoreHDF::write(*h5matrix, "testf.h5", "testg/testd");

	dash::finalize();

	return EXIT_SUCCESS;
}
./h5-test.compile
In file included from h5-test.cpp:8:
In file included from /Users/dbin/opt/dash-0.4.0/include/libdash.h:71:
In file included from /Users/dbin/opt/dash-0.4.0/include/dash/io/HDF5.h:4:
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:477:39: error:
      no member named 'local_blockspec' in 'dash::TilePattern<1,
      dash::ROW_MAJOR, long>'
    const auto & lblockspec = pattern.local_blockspec();
                              ~~~~~~~ ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:582:12: note:
      in instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_get_hdf_slab_body<dash::TilePattern<1,
      dash::ROW_MAJOR, long> >' requested here
        1, _get_hdf_slab_body(pattern, {}));
           ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/internal/DriverImplZeroCopy.h:32:21: note:
      in instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_get_hdf_slabs<dash::TilePattern<1,
      dash::ROW_MAJOR, long> >' requested here
  auto hyperslabs = _get_hdf_slabs(container.pattern());
                    ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:733:5: note: in
      instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_process_dataset_impl_zero_copy<dash::Matrix<int,
      1, long, dash::TilePattern<1, dash::ROW_MAJOR, long>, dash::HostSpace> >'
      requested here
    _process_dataset_impl_zero_copy(StoreHDF::Mode::WRITE, container, h5dset,
    ^
/Users/dbin/opt/dash-0.4.0/include/dash/io/hdf5/StorageDriver.h:234:5: note: in
      instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::_write_dataset_impl<dash::Matrix<int, 1, long,
      dash::TilePattern<1, dash::ROW_MAJOR, long>, dash::HostSpace> >' requested
      here
    _write_dataset_impl(array, h5dset, internal_type);
    ^
h5-test.cpp:26:12: note: in instantiation of function template specialization
      'dash::io::hdf5::StoreHDF::write<dash::Matrix<int, 1, long,
      dash::TilePattern<1, dash::ROW_MAJOR, long>, dash::HostSpace> >' requested
      here
        StoreHDF::write(*h5matrix, "testf.h5", "testg/testd");
                  ^
1 error generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions