From 9ba9058dfc344697095246971abfb0db8aa82b51 Mon Sep 17 00:00:00 2001 From: Daniel Garcia-Sanchez Date: Mon, 29 Oct 2018 20:26:38 +0100 Subject: [PATCH] Add tests in tests/base/hdf5_05.cc --- tests/base/hdf5_05.cc | 794 +++++++++++++++++- ...rue.with_complex_values=on.mpirun=4.output | 194 +++++ 2 files changed, 986 insertions(+), 2 deletions(-) diff --git a/tests/base/hdf5_05.cc b/tests/base/hdf5_05.cc index f773cedec3..70b39c9a74 100644 --- a/tests/base/hdf5_05.cc +++ b/tests/base/hdf5_05.cc @@ -207,7 +207,7 @@ write_test(HDF5::Group & root_group, { std::string dataset_name("dataset_1"); - // Write matrix of 5x3 + // This dataset is a 5x3 matrix // Output generated by h5dump // (0,0): 0, 1, 2, // (1,0): 3, 4, 5, @@ -248,6 +248,431 @@ write_test(HDF5::Group & root_group, << " (Write): " << dataset.get_global_no_collective_cause() << std::endl; } + + { + std::string dataset_name("dataset_2"); + + // This dataset is a 2x5x3 tensor + // Output generated by h5dump + // (0,0,0): 0, 1, 2, (1,0,0): 15, 16, 17, + // (0,1,0): 3, 4, 5, (1,1,0): 18, 19, 20, + // (0,2,0): 6, 7, 8, (1,2,0): 21, 22, 23, + // (0,3,0): 9, 10, 11, (1,3,0): 24, 25, 26, + // (0,4,0): 12, 13, 14, (1,4,0): 27, 28, 29 + + const std::vector dataset_dimensions = {2, 5, 3}; + auto dataset = + group.create_dataset(dataset_name, dataset_dimensions); + dataset.set_query_io_mode(true); + deallog << "Dimensions " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_dimensions() << std::endl; + deallog << "Size " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_size() << std::endl; + deallog << "Rank " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_rank() << std::endl; + auto data = initialize_container(dataset_dimensions); + assign_data(data); + if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) + { + dataset.write(data); + } + else + { + dataset.template write_none(); + } + deallog << "Data " + dataset_name << "<" << type_name << ">" + << " (Write): " << container_to_string(data) << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + + { + std::string dataset_name("dataset_3"); + + // This dataset is a 2x5x3 tensor + // Output generated by h5dump + // (0,0,0): 0, 1, 2, (1,0,0): 0, 2, 4, + // (0,1,0): 3, 4, 5, (1,1,0): 6, 8, 10, + // (0,2,0): 6, 7, 8, (1,2,0): 12, 14, 16, + // (0,3,0): 9, 10, 11, (1,3,0): 18, 20, 22, + // (0,4,0): 12, 13, 14, (1,4,0): 24, 26, 28 + + const std::vector dataset_dimensions = {2, 5, 3}; + auto dataset = + group.create_dataset(dataset_name, dataset_dimensions); + dataset.set_query_io_mode(true); + deallog << "Dimensions " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_dimensions() << std::endl; + deallog << "Size " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_size() << std::endl; + deallog << "Rank " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_rank() << std::endl; + + if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) + { + const std::vector data_dimensions = {5, 3}; + auto data = initialize_container(data_dimensions); + assign_data(data); + const std::vector hyperslab_offset = {0, 0, 0}; + const std::vector hyperslab_count = {1, 5, 3}; + dataset.write_hyperslab(data, hyperslab_offset, hyperslab_count); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else if (Utilities::MPI::this_mpi_process(mpi_communicator) == 1) + { + const std::vector data_dimensions = {5, 3}; + auto data = initialize_container(data_dimensions); + assign_data(data); + // Modify the data in order to have different data than in mpi_comm = 0 + data *= 2; + const std::vector hyperslab_offset = {1, 0, 0}; + const std::vector hyperslab_count = {1, 5, 3}; + dataset.write_hyperslab(data, hyperslab_offset, hyperslab_count); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else + { + dataset.template write_none(); + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + } + + { + std::string dataset_name("dataset_4"); + + // This dataset is a 3x2x4 tensor + // Output generated by h5dump + // (0,0,0): 0, 1, 2, 3, + // (0,1,0): 0, 2, 4, 6, + // (1,0,0): 4, 5, 6, 7, + // (1,1,0): 8, 10, 12, 14, + // (2,0,0): 8, 9, 10, 11, + // (2,1,0): 16, 18, 20, 22 + + const std::vector dataset_dimensions = {3, 2, 4}; + auto dataset = + group.create_dataset(dataset_name, dataset_dimensions); + dataset.set_query_io_mode(true); + deallog << "Dimensions " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_dimensions() << std::endl; + deallog << "Size " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_size() << std::endl; + deallog << "Rank " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_rank() << std::endl; + + if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) + { + const std::vector data_dimensions = {3, 4}; + auto data = initialize_container(data_dimensions); + assign_data(data); + const std::vector hyperslab_offset = {0, 0, 0}; + const std::vector hyperslab_count = {3, 1, 4}; + dataset.write_hyperslab(data, hyperslab_offset, hyperslab_count); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else if (Utilities::MPI::this_mpi_process(mpi_communicator) == 1) + { + const std::vector data_dimensions = {3, 4}; + auto data = initialize_container(data_dimensions); + assign_data(data); + // Modify the data in order to have different data than in mpi_comm = 0 + data *= 2; + const std::vector hyperslab_offset = {0, 1, 0}; + const std::vector hyperslab_count = {3, 1, 4}; + dataset.write_hyperslab(data, hyperslab_offset, hyperslab_count); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else + { + dataset.template write_none(); + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + } + + { + std::string dataset_name("dataset_5"); + + // This dataset is a 3x2x4 tensor + // Output generated by h5dump + // (0,0,0): 2, 0, 0, 38, + // (0,1,0): 6, 5, 0, 3, + // (1,0,0): 12, 0, 0, 0, + // (1,1,0): 16, 15, 0, 13, + // (2,0,0): 32, 0, 0, 0, + // (2,1,0): 36, 35, 0, 33 + + + const std::vector dataset_dimensions = {3, 2, 4}; + auto dataset = + group.create_dataset(dataset_name, dataset_dimensions); + dataset.set_query_io_mode(true); + deallog << "Dimensions " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_dimensions() << std::endl; + deallog << "Size " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_size() << std::endl; + deallog << "Rank " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_rank() << std::endl; + + if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) + { + std::vector coordinates = {0, + 0, + 0, // first point + 0, + 1, + 3, // second point + 0, + 1, + 1, // third point + 0, + 1, + 0}; // fourth point + std::vector data = {2, 3, 5, 6}; + + dataset.write_selection(data, coordinates); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else if (Utilities::MPI::this_mpi_process(mpi_communicator) == 1) + { + std::vector coordinates = {1, + 0, + 0, // first point + 1, + 1, + 3, // second point + 1, + 1, + 1, // third point + 1, + 1, + 0}; // fourth point + std::vector data = {12, 13, 15, 16}; + + dataset.write_selection(data, coordinates); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else if (Utilities::MPI::this_mpi_process(mpi_communicator) == 2) + { + std::vector coordinates = {2, + 0, + 0, // first point + 2, + 1, + 3, // second point + 2, + 1, + 1, // third point + 2, + 1, + 0, // fourth point + 0, + 0, + 3}; // fith point + std::vector data = {32, 33, 35, 36, 38}; + + dataset.write_selection(data, coordinates); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else + { + dataset.template write_none(); + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + } + + { + std::string dataset_name("dataset_6"); + + // This dataset is a 7x12 matrix + // Output generated by h5dump + // (0,0): -0, 0, 1, -1, 2, 3, -2, 4, 5, -3, 6, 7, + // (1,0): -4, 8, 9, -5, 10, 11, -6, 12, 13, -7, 14, 15, + // (2,0): -8, 16, 17, -9, 18, 19, -10, 20, 21, -11, 22, 23, + // (3,0): -12, 0, 0, -13, 0, 0, -14, 0, 0, -15, 0, 0, + // (4,0): -16, 24, 25, -17, 26, 27, -18, 28, 29, -19, 30, 31, + // (5,0): -20, 32, 33, -21, 34, 35, -22, 36, 37, -23, 38, 39, + // (6,0): -24, 40, 41, -25, 42, 43, -26, 44, 45, -27, 46, 47 + + const std::vector dataset_dimensions = {7, 12}; + auto dataset = + group.create_dataset(dataset_name, dataset_dimensions); + dataset.set_query_io_mode(true); + deallog << "Dimensions " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_dimensions() << std::endl; + deallog << "Size " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_size() << std::endl; + deallog << "Rank " << dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_rank() << std::endl; + + if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) + { + const std::vector data_dimensions = {6, 8}; + auto data = initialize_container(data_dimensions); + assign_data(data); + const std::vector offset = {0, 1}; + const std::vector stride = {4, 3}; + const std::vector count = {2, 4}; + const std::vector block = {3, 2}; + + dataset.write_hyperslab( + data, data_dimensions, offset, stride, count, block); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else if (Utilities::MPI::this_mpi_process(mpi_communicator) == 1) + { + const std::vector data_dimensions = {7, 4}; + auto data = initialize_container(data_dimensions); + assign_data(data); + data *= -1; + const std::vector offset = {0, 0}; + const std::vector stride = {7, 3}; + const std::vector count = {1, 4}; + const std::vector block = {7, 1}; + + dataset.write_hyperslab( + data, data_dimensions, offset, stride, count, block); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + else + { + dataset.template write_none(); + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Write): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " + dataset_name << "<" << type_name + << ">" + << " (Write): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " + dataset_name << "<" + << type_name << ">" + << " (Write): " << dataset.get_global_no_collective_cause() + << std::endl; + } + } } @@ -267,7 +692,16 @@ read_test(HDF5::Group root_group, { std::string dataset_name("dataset_1"); - auto dataset = group.dataset(dataset_name); + + // This dataset is a 5x3 matrix + // Output generated by h5dump + // (0,0): 0, 1, 2, + // (1,0): 3, 4, 5, + // (2,0): 6, 7, 8, + // (3,0): 9, 10, 11, + // (4,0): 12, 13, 14 + + auto dataset = group.dataset(dataset_name); dataset.set_query_io_mode(true); deallog << "Dimensions " + dataset_name << "<" << type_name << ">" << " (Read): " << dataset.get_dimensions() << std::endl; @@ -362,6 +796,358 @@ read_test(HDF5::Group root_group, << " (Read): " << container_to_string(data) << std::endl; } } + + { + std::string dataset_name("dataset_2"); + + // This dataset is a 2x5x3 tensor + // Output generated by h5dump + // (0,0,0): 0, 1, 2, (1,0,0): 15, 16, 17, + // (0,1,0): 3, 4, 5, (1,1,0): 18, 19, 20, + // (0,2,0): 6, 7, 8, (1,2,0): 21, 22, 23, + // (0,3,0): 9, 10, 11, (1,3,0): 24, 25, 26, + // (0,4,0): 12, 13, 14, (1,4,0): 27, 28, 29 + + auto dataset = group.dataset(dataset_name); + dataset.set_query_io_mode(true); + deallog << "Dimensions " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_dimensions() << std::endl; + deallog << "Size " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_size() << std::endl; + deallog << "Rank " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_rank() << std::endl; + { + auto data = dataset.read>(); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Data " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + + { + // The output should be the column vector [16, 19, 22, 25] + const std::vector hyperslab_offset = {1, 0, 1}; + const std::vector hyperslab_count = {1, 4, 1}; + auto data = dataset.read_hyperslab>(hyperslab_offset, + hyperslab_count); + + pcout << "Column vector" << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Column vector " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + + { + // The output should be the row vector [1, 16] + const std::vector hyperslab_offset = {0, 0, 1}; + const std::vector hyperslab_count = {2, 1, 1}; + auto data = dataset.read_hyperslab>(hyperslab_offset, + hyperslab_count); + + pcout << "Row vector" << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Row vector " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + + { + // The output should be the matrix [[18, 19], [21, 22], [24, 25]] + const std::vector hyperslab_offset = {1, 1, 0}; + const std::vector hyperslab_count = {1, 3, 2}; + auto data = dataset.read_hyperslab>(hyperslab_offset, + hyperslab_count); + + pcout << "Sub-matrix" << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Sub-matrix " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + + { + // The output should be the matrix [[3, 4, 5], [18, 19, 20]] + const std::vector hyperslab_offset = {0, 1, 0}; + const std::vector hyperslab_count = {2, 1, 3}; + auto data = dataset.read_hyperslab>(hyperslab_offset, + hyperslab_count); + + pcout << "Sub-matrix" << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Sub-matrix " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + + { + // The output should be the matrix [[0, 2], [6, 8], [12, 14]] + + const std::vector data_dimensions = {1, 3, 2}; + const std::vector offset = {0, 0, 0}; + const std::vector stride = {1, 2, 2}; + const std::vector count = {1, 3, 2}; + const std::vector block = {1, 1, 1}; + + auto data = dataset.read_hyperslab>( + data_dimensions, offset, stride, count, block); + + pcout << "Sub-matrix" << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Sub-matrix " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + + { + // The output should be the matrix [0, 20, 22, 13, 11] + std::vector coordinates = {0, + 0, + 0, // first point + 1, + 1, + 2, // second point + 1, + 2, + 1, // third point + 0, + 4, + 1, // fourth point + 0, + 3, + 2}; // fith point + + auto data = dataset.read_selection(coordinates); + + pcout << "Sub-matrix" << std::endl; + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Selection " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + } + + { + std::string dataset_name("dataset_3"); + + // This dataset is a 2x5x3 tensor + // Output generated by h5dump + // (0,0,0): 0, 1, 2, (1,0,0): 0, 2, 4, + // (0,1,0): 3, 4, 5, (1,1,0): 6, 8, 10, + // (0,2,0): 6, 7, 8, (1,2,0): 12, 14, 16, + // (0,3,0): 9, 10, 11, (1,3,0): 18, 20, 22, + // (0,4,0): 12, 13, 14, (1,4,0): 24, 26, 28 + + auto dataset = group.dataset(dataset_name); + dataset.set_query_io_mode(true); + deallog << "Dimensions " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_dimensions() << std::endl; + deallog << "Size " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_size() << std::endl; + deallog << "Rank " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_rank() << std::endl; + { + auto data = dataset.read>(); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Data " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + } + + { + std::string dataset_name("dataset_4"); + + // This dataset is a 3x2x4 tensor + // Output generated by h5dump + // (0,0,0): 0, 1, 2, 3, + // (0,1,0): 0, 2, 4, 6, + // (1,0,0): 4, 5, 6, 7, + // (1,1,0): 8, 10, 12, 14, + // (2,0,0): 8, 9, 10, 11, + // (2,1,0): 16, 18, 20, 22 + + auto dataset = group.dataset(dataset_name); + dataset.set_query_io_mode(true); + deallog << "Dimensions " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_dimensions() << std::endl; + deallog << "Size " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_size() << std::endl; + deallog << "Rank " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_rank() << std::endl; + { + auto data = dataset.read>(); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Data " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + } + + { + std::string dataset_name("dataset_5"); + + // This dataset is a 3x2x4 tensor + // Output generated by h5dump + // (0,0,0): 2, 0, 0, 38, + // (0,1,0): 6, 5, 0, 3, + // (1,0,0): 12, 0, 0, 0, + // (1,1,0): 16, 15, 0, 13, + // (2,0,0): 32, 0, 0, 0, + // (2,1,0): 36, 35, 0, 33 + + + auto dataset = group.dataset(dataset_name); + dataset.set_query_io_mode(true); + deallog << "Dimensions " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_dimensions() << std::endl; + deallog << "Size " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_size() << std::endl; + deallog << "Rank " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_rank() << std::endl; + { + auto data = dataset.read>(); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Data " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + } + + { + std::string dataset_name("dataset_6"); + + // This dataset is a 7x12 matrix + // Output generated by h5dump + // (0,0): -0, 0, 1, -1, 2, 3, -2, 4, 5, -3, 6, 7, + // (1,0): -4, 8, 9, -5, 10, 11, -6, 12, 13, -7, 14, 15, + // (2,0): -8, 16, 17, -9, 18, 19, -10, 20, 21, -11, 22, 23, + // (3,0): -12, 0, 0, -13, 0, 0, -14, 0, 0, -15, 0, 0, + // (4,0): -16, 24, 25, -17, 26, 27, -18, 28, 29, -19, 30, 31, + // (5,0): -20, 32, 33, -21, 34, 35, -22, 36, 37, -23, 38, 39, + // (6,0): -24, 40, 41, -25, 42, 43, -26, 44, 45, -27, 46, 47 + + + auto dataset = group.dataset(dataset_name); + dataset.set_query_io_mode(true); + deallog << "Dimensions " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_dimensions() << std::endl; + deallog << "Size " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_size() << std::endl; + deallog << "Rank " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_rank() << std::endl; + { + auto data = dataset.read>(); + + pcout << "IO mode " + dataset_name << "<" << type_name << ">" + << " (Read): " << dataset.get_io_mode() << std::endl; + pcout << "Local no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_local_no_collective_cause() + << std::endl; + pcout << "Global no collective cause " << dataset_name << "<" << type_name + << ">" + << " (Read): " << dataset.get_global_no_collective_cause() + << std::endl; + + deallog << "Data " + dataset_name << "<" << type_name << ">" + << " (Read): " << container_to_string(data) << std::endl; + } + } } @@ -386,7 +1172,9 @@ main(int argc, char **argv) mpi_communicator, HDF5::File::Mode::create); + write_test(data_file, mpi_communicator, pcout); write_test(data_file, mpi_communicator, pcout); + write_test>(data_file, mpi_communicator, pcout); write_test>(data_file, mpi_communicator, pcout); } @@ -394,7 +1182,9 @@ main(int argc, char **argv) HDF5::File data_file(filename, mpi_communicator, HDF5::File::Mode::open); + read_test(data_file, mpi_communicator, pcout); read_test(data_file, mpi_communicator, pcout); + read_test>(data_file, mpi_communicator, pcout); read_test>(data_file, mpi_communicator, pcout); } } diff --git a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=4.output b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=4.output index 85bce4bdbe..cb302f251d 100644 --- a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=4.output +++ b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=4.output @@ -1,14 +1,122 @@ +DEAL::Write tests for float datasets +DEAL::Dimensions dataset_1 (Write): 5 3 +DEAL::Size dataset_1 (Write): 15 +DEAL::Rank dataset_1 (Write): 2 +DEAL::Data dataset_1 (Write): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] +DEAL::Dimensions dataset_2 (Write): 2 5 3 +DEAL::Size dataset_2 (Write): 30 +DEAL::Rank dataset_2 (Write): 3 +DEAL::Data dataset_2 (Write): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] +DEAL::Dimensions dataset_3 (Write): 2 5 3 +DEAL::Size dataset_3 (Write): 30 +DEAL::Rank dataset_3 (Write): 3 +DEAL::Dimensions dataset_4 (Write): 3 2 4 +DEAL::Size dataset_4 (Write): 24 +DEAL::Rank dataset_4 (Write): 3 +DEAL::Dimensions dataset_5 (Write): 3 2 4 +DEAL::Size dataset_5 (Write): 24 +DEAL::Rank dataset_5 (Write): 3 +DEAL::Dimensions dataset_6 (Write): 7 12 +DEAL::Size dataset_6 (Write): 84 +DEAL::Rank dataset_6 (Write): 2 DEAL::Write tests for double datasets DEAL::Dimensions dataset_1 (Write): 5 3 DEAL::Size dataset_1 (Write): 15 DEAL::Rank dataset_1 (Write): 2 DEAL::Data dataset_1 (Write): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] +DEAL::Dimensions dataset_2 (Write): 2 5 3 +DEAL::Size dataset_2 (Write): 30 +DEAL::Rank dataset_2 (Write): 3 +DEAL::Data dataset_2 (Write): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] +DEAL::Dimensions dataset_3 (Write): 2 5 3 +DEAL::Size dataset_3 (Write): 30 +DEAL::Rank dataset_3 (Write): 3 +DEAL::Dimensions dataset_4 (Write): 3 2 4 +DEAL::Size dataset_4 (Write): 24 +DEAL::Rank dataset_4 (Write): 3 +DEAL::Dimensions dataset_5 (Write): 3 2 4 +DEAL::Size dataset_5 (Write): 24 +DEAL::Rank dataset_5 (Write): 3 +DEAL::Dimensions dataset_6 (Write): 7 12 +DEAL::Size dataset_6 (Write): 84 +DEAL::Rank dataset_6 (Write): 2 +DEAL::Write tests for std::complex datasets +DEAL::Dimensions dataset_1> (Write): 5 3 +DEAL::Size dataset_1> (Write): 15 +DEAL::Rank dataset_1> (Write): 2 +DEAL::Data dataset_1> (Write): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0)] +DEAL::Dimensions dataset_2> (Write): 2 5 3 +DEAL::Size dataset_2> (Write): 30 +DEAL::Rank dataset_2> (Write): 3 +DEAL::Data dataset_2> (Write): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0), (15,0), (16,0), (17,0), (18,0), (19,0), (20,0), (21,0), (22,0), (23,0), (24,0), (25,0), (26,0), (27,0), (28,0), (29,0)] +DEAL::Dimensions dataset_3> (Write): 2 5 3 +DEAL::Size dataset_3> (Write): 30 +DEAL::Rank dataset_3> (Write): 3 +DEAL::Dimensions dataset_4> (Write): 3 2 4 +DEAL::Size dataset_4> (Write): 24 +DEAL::Rank dataset_4> (Write): 3 +DEAL::Dimensions dataset_5> (Write): 3 2 4 +DEAL::Size dataset_5> (Write): 24 +DEAL::Rank dataset_5> (Write): 3 +DEAL::Dimensions dataset_6> (Write): 7 12 +DEAL::Size dataset_6> (Write): 84 +DEAL::Rank dataset_6> (Write): 2 DEAL::Write tests for std::complex datasets DEAL::Dimensions dataset_1> (Write): 5 3 DEAL::Size dataset_1> (Write): 15 DEAL::Rank dataset_1> (Write): 2 DEAL::Data dataset_1> (Write): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0)] +DEAL::Dimensions dataset_2> (Write): 2 5 3 +DEAL::Size dataset_2> (Write): 30 +DEAL::Rank dataset_2> (Write): 3 +DEAL::Data dataset_2> (Write): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0), (15,0), (16,0), (17,0), (18,0), (19,0), (20,0), (21,0), (22,0), (23,0), (24,0), (25,0), (26,0), (27,0), (28,0), (29,0)] +DEAL::Dimensions dataset_3> (Write): 2 5 3 +DEAL::Size dataset_3> (Write): 30 +DEAL::Rank dataset_3> (Write): 3 +DEAL::Dimensions dataset_4> (Write): 3 2 4 +DEAL::Size dataset_4> (Write): 24 +DEAL::Rank dataset_4> (Write): 3 +DEAL::Dimensions dataset_5> (Write): 3 2 4 +DEAL::Size dataset_5> (Write): 24 +DEAL::Rank dataset_5> (Write): 3 +DEAL::Dimensions dataset_6> (Write): 7 12 +DEAL::Size dataset_6> (Write): 84 +DEAL::Rank dataset_6> (Write): 2 +DEAL::Read tests for float datasets +DEAL::Dimensions dataset_1 (Read): 5 3 +DEAL::Size dataset_1 (Read): 15 +DEAL::Rank dataset_1 (Read): 2 +DEAL::Data dataset_1 (Read): [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]] +DEAL::Column vector dataset_1 (Read): [7, 10, 13] +DEAL::Row vector dataset_1 (Read): [9, 10, 11] +DEAL::Sub-matrix dataset_1 (Read): [[3, 4, 5], [6, 7, 8]] +DEAL::Dimensions dataset_2 (Read): 2 5 3 +DEAL::Size dataset_2 (Read): 30 +DEAL::Rank dataset_2 (Read): 3 +DEAL::Data dataset_2 (Read): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] +DEAL::Column vector dataset_2 (Read): [16, 19, 22, 25] +DEAL::Row vector dataset_2 (Read): [1, 16] +DEAL::Sub-matrix dataset_2 (Read): [[18, 19], [21, 22], [24, 25]] +DEAL::Sub-matrix dataset_2 (Read): [[3, 4, 5], [18, 19, 20]] +DEAL::Sub-matrix dataset_2 (Read): [[0, 2], [6, 8], [12, 14]] +DEAL::Selection dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Dimensions dataset_3 (Read): 2 5 3 +DEAL::Size dataset_3 (Read): 30 +DEAL::Rank dataset_3 (Read): 3 +DEAL::Data dataset_3 (Read): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28] +DEAL::Dimensions dataset_4 (Read): 3 2 4 +DEAL::Size dataset_4 (Read): 24 +DEAL::Rank dataset_4 (Read): 3 +DEAL::Data dataset_4 (Read): [0, 1, 2, 3, 0, 2, 4, 6, 4, 5, 6, 7, 8, 10, 12, 14, 8, 9, 10, 11, 16, 18, 20, 22] +DEAL::Dimensions dataset_5 (Read): 3 2 4 +DEAL::Size dataset_5 (Read): 24 +DEAL::Rank dataset_5 (Read): 3 +DEAL::Data dataset_5 (Read): [2, 0, 0, 38, 6, 5, 0, 3, 12, 0, 0, 0, 16, 15, 0, 13, 32, 0, 0, 0, 36, 35, 0, 33] +DEAL::Dimensions dataset_6 (Read): 7 12 +DEAL::Size dataset_6 (Read): 84 +DEAL::Rank dataset_6 (Read): 2 +DEAL::Data dataset_6 (Read): [[-0, 0, 1, -1, 2, 3, -2, 4, 5, -3, 6, 7], [-4, 8, 9, -5, 10, 11, -6, 12, 13, -7, 14, 15], [-8, 16, 17, -9, 18, 19, -10, 20, 21, -11, 22, 23], [-12, 0, 0, -13, 0, 0, -14, 0, 0, -15, 0, 0], [-16, 24, 25, -17, 26, 27, -18, 28, 29, -19, 30, 31], [-20, 32, 33, -21, 34, 35, -22, 36, 37, -23, 38, 39], [-24, 40, 41, -25, 42, 43, -26, 44, 45, -27, 46, 47]] DEAL::Read tests for double datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -17,6 +125,66 @@ DEAL::Data dataset_1 (Read): [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 1 DEAL::Column vector dataset_1 (Read): [7, 10, 13] DEAL::Row vector dataset_1 (Read): [9, 10, 11] DEAL::Sub-matrix dataset_1 (Read): [[3, 4, 5], [6, 7, 8]] +DEAL::Dimensions dataset_2 (Read): 2 5 3 +DEAL::Size dataset_2 (Read): 30 +DEAL::Rank dataset_2 (Read): 3 +DEAL::Data dataset_2 (Read): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] +DEAL::Column vector dataset_2 (Read): [16, 19, 22, 25] +DEAL::Row vector dataset_2 (Read): [1, 16] +DEAL::Sub-matrix dataset_2 (Read): [[18, 19], [21, 22], [24, 25]] +DEAL::Sub-matrix dataset_2 (Read): [[3, 4, 5], [18, 19, 20]] +DEAL::Sub-matrix dataset_2 (Read): [[0, 2], [6, 8], [12, 14]] +DEAL::Selection dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Dimensions dataset_3 (Read): 2 5 3 +DEAL::Size dataset_3 (Read): 30 +DEAL::Rank dataset_3 (Read): 3 +DEAL::Data dataset_3 (Read): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28] +DEAL::Dimensions dataset_4 (Read): 3 2 4 +DEAL::Size dataset_4 (Read): 24 +DEAL::Rank dataset_4 (Read): 3 +DEAL::Data dataset_4 (Read): [0, 1, 2, 3, 0, 2, 4, 6, 4, 5, 6, 7, 8, 10, 12, 14, 8, 9, 10, 11, 16, 18, 20, 22] +DEAL::Dimensions dataset_5 (Read): 3 2 4 +DEAL::Size dataset_5 (Read): 24 +DEAL::Rank dataset_5 (Read): 3 +DEAL::Data dataset_5 (Read): [2, 0, 0, 38, 6, 5, 0, 3, 12, 0, 0, 0, 16, 15, 0, 13, 32, 0, 0, 0, 36, 35, 0, 33] +DEAL::Dimensions dataset_6 (Read): 7 12 +DEAL::Size dataset_6 (Read): 84 +DEAL::Rank dataset_6 (Read): 2 +DEAL::Data dataset_6 (Read): [[-0, 0, 1, -1, 2, 3, -2, 4, 5, -3, 6, 7], [-4, 8, 9, -5, 10, 11, -6, 12, 13, -7, 14, 15], [-8, 16, 17, -9, 18, 19, -10, 20, 21, -11, 22, 23], [-12, 0, 0, -13, 0, 0, -14, 0, 0, -15, 0, 0], [-16, 24, 25, -17, 26, 27, -18, 28, 29, -19, 30, 31], [-20, 32, 33, -21, 34, 35, -22, 36, 37, -23, 38, 39], [-24, 40, 41, -25, 42, 43, -26, 44, 45, -27, 46, 47]] +DEAL::Read tests for std::complex datasets +DEAL::Dimensions dataset_1> (Read): 5 3 +DEAL::Size dataset_1> (Read): 15 +DEAL::Rank dataset_1> (Read): 2 +DEAL::Data dataset_1> (Read): [[(0,0), (1,0), (2,0)], [(3,0), (4,0), (5,0)], [(6,0), (7,0), (8,0)], [(9,0), (10,0), (11,0)], [(12,0), (13,0), (14,0)]] +DEAL::Column vector dataset_1> (Read): [(7,0), (10,0), (13,0)] +DEAL::Row vector dataset_1> (Read): [(9,0), (10,0), (11,0)] +DEAL::Sub-matrix dataset_1> (Read): [[(3,0), (4,0), (5,0)], [(6,0), (7,0), (8,0)]] +DEAL::Dimensions dataset_2> (Read): 2 5 3 +DEAL::Size dataset_2> (Read): 30 +DEAL::Rank dataset_2> (Read): 3 +DEAL::Data dataset_2> (Read): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0), (15,0), (16,0), (17,0), (18,0), (19,0), (20,0), (21,0), (22,0), (23,0), (24,0), (25,0), (26,0), (27,0), (28,0), (29,0)] +DEAL::Column vector dataset_2> (Read): [(16,0), (19,0), (22,0), (25,0)] +DEAL::Row vector dataset_2> (Read): [(1,0), (16,0)] +DEAL::Sub-matrix dataset_2> (Read): [[(18,0), (19,0)], [(21,0), (22,0)], [(24,0), (25,0)]] +DEAL::Sub-matrix dataset_2> (Read): [[(3,0), (4,0), (5,0)], [(18,0), (19,0), (20,0)]] +DEAL::Sub-matrix dataset_2> (Read): [[(0,0), (2,0)], [(6,0), (8,0)], [(12,0), (14,0)]] +DEAL::Selection dataset_2> (Read): [(0,0), (20,0), (22,0), (13,0), (11,0)] +DEAL::Dimensions dataset_3> (Read): 2 5 3 +DEAL::Size dataset_3> (Read): 30 +DEAL::Rank dataset_3> (Read): 3 +DEAL::Data dataset_3> (Read): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0), (0,0), (2,0), (4,0), (6,0), (8,0), (10,0), (12,0), (14,0), (16,0), (18,0), (20,0), (22,0), (24,0), (26,0), (28,0)] +DEAL::Dimensions dataset_4> (Read): 3 2 4 +DEAL::Size dataset_4> (Read): 24 +DEAL::Rank dataset_4> (Read): 3 +DEAL::Data dataset_4> (Read): [(0,0), (1,0), (2,0), (3,0), (0,0), (2,0), (4,0), (6,0), (4,0), (5,0), (6,0), (7,0), (8,0), (10,0), (12,0), (14,0), (8,0), (9,0), (10,0), (11,0), (16,0), (18,0), (20,0), (22,0)] +DEAL::Dimensions dataset_5> (Read): 3 2 4 +DEAL::Size dataset_5> (Read): 24 +DEAL::Rank dataset_5> (Read): 3 +DEAL::Data dataset_5> (Read): [(2,0), (0,0), (0,0), (38,0), (6,0), (5,0), (0,0), (3,0), (12,0), (0,0), (0,0), (0,0), (16,0), (15,0), (0,0), (13,0), (32,0), (0,0), (0,0), (0,0), (36,0), (35,0), (0,0), (33,0)] +DEAL::Dimensions dataset_6> (Read): 7 12 +DEAL::Size dataset_6> (Read): 84 +DEAL::Rank dataset_6> (Read): 2 +DEAL::Data dataset_6> (Read): [[(-0,0), (0,0), (1,0), (-1,0), (2,0), (3,0), (-2,0), (4,0), (5,0), (-3,0), (6,0), (7,0)], [(-4,0), (8,0), (9,0), (-5,0), (10,0), (11,0), (-6,0), (12,0), (13,0), (-7,0), (14,0), (15,0)], [(-8,0), (16,0), (17,0), (-9,0), (18,0), (19,0), (-10,0), (20,0), (21,0), (-11,0), (22,0), (23,0)], [(-12,0), (0,0), (0,0), (-13,0), (0,0), (0,0), (-14,0), (0,0), (0,0), (-15,0), (0,0), (0,0)], [(-16,0), (24,0), (25,0), (-17,0), (26,0), (27,0), (-18,0), (28,0), (29,0), (-19,0), (30,0), (31,0)], [(-20,0), (32,0), (33,0), (-21,0), (34,0), (35,0), (-22,0), (36,0), (37,0), (-23,0), (38,0), (39,0)], [(-24,0), (40,0), (41,0), (-25,0), (42,0), (43,0), (-26,0), (44,0), (45,0), (-27,0), (46,0), (47,0)]] DEAL::Read tests for std::complex datasets DEAL::Dimensions dataset_1> (Read): 5 3 DEAL::Size dataset_1> (Read): 15 @@ -25,3 +193,29 @@ DEAL::Data dataset_1> (Read): [[(0,0), (1,0), (2,0)], [(3,0 DEAL::Column vector dataset_1> (Read): [(7,0), (10,0), (13,0)] DEAL::Row vector dataset_1> (Read): [(9,0), (10,0), (11,0)] DEAL::Sub-matrix dataset_1> (Read): [[(3,0), (4,0), (5,0)], [(6,0), (7,0), (8,0)]] +DEAL::Dimensions dataset_2> (Read): 2 5 3 +DEAL::Size dataset_2> (Read): 30 +DEAL::Rank dataset_2> (Read): 3 +DEAL::Data dataset_2> (Read): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0), (15,0), (16,0), (17,0), (18,0), (19,0), (20,0), (21,0), (22,0), (23,0), (24,0), (25,0), (26,0), (27,0), (28,0), (29,0)] +DEAL::Column vector dataset_2> (Read): [(16,0), (19,0), (22,0), (25,0)] +DEAL::Row vector dataset_2> (Read): [(1,0), (16,0)] +DEAL::Sub-matrix dataset_2> (Read): [[(18,0), (19,0)], [(21,0), (22,0)], [(24,0), (25,0)]] +DEAL::Sub-matrix dataset_2> (Read): [[(3,0), (4,0), (5,0)], [(18,0), (19,0), (20,0)]] +DEAL::Sub-matrix dataset_2> (Read): [[(0,0), (2,0)], [(6,0), (8,0)], [(12,0), (14,0)]] +DEAL::Selection dataset_2> (Read): [(0,0), (20,0), (22,0), (13,0), (11,0)] +DEAL::Dimensions dataset_3> (Read): 2 5 3 +DEAL::Size dataset_3> (Read): 30 +DEAL::Rank dataset_3> (Read): 3 +DEAL::Data dataset_3> (Read): [(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (8,0), (9,0), (10,0), (11,0), (12,0), (13,0), (14,0), (0,0), (2,0), (4,0), (6,0), (8,0), (10,0), (12,0), (14,0), (16,0), (18,0), (20,0), (22,0), (24,0), (26,0), (28,0)] +DEAL::Dimensions dataset_4> (Read): 3 2 4 +DEAL::Size dataset_4> (Read): 24 +DEAL::Rank dataset_4> (Read): 3 +DEAL::Data dataset_4> (Read): [(0,0), (1,0), (2,0), (3,0), (0,0), (2,0), (4,0), (6,0), (4,0), (5,0), (6,0), (7,0), (8,0), (10,0), (12,0), (14,0), (8,0), (9,0), (10,0), (11,0), (16,0), (18,0), (20,0), (22,0)] +DEAL::Dimensions dataset_5> (Read): 3 2 4 +DEAL::Size dataset_5> (Read): 24 +DEAL::Rank dataset_5> (Read): 3 +DEAL::Data dataset_5> (Read): [(2,0), (0,0), (0,0), (38,0), (6,0), (5,0), (0,0), (3,0), (12,0), (0,0), (0,0), (0,0), (16,0), (15,0), (0,0), (13,0), (32,0), (0,0), (0,0), (0,0), (36,0), (35,0), (0,0), (33,0)] +DEAL::Dimensions dataset_6> (Read): 7 12 +DEAL::Size dataset_6> (Read): 84 +DEAL::Rank dataset_6> (Read): 2 +DEAL::Data dataset_6> (Read): [[(-0,0), (0,0), (1,0), (-1,0), (2,0), (3,0), (-2,0), (4,0), (5,0), (-3,0), (6,0), (7,0)], [(-4,0), (8,0), (9,0), (-5,0), (10,0), (11,0), (-6,0), (12,0), (13,0), (-7,0), (14,0), (15,0)], [(-8,0), (16,0), (17,0), (-9,0), (18,0), (19,0), (-10,0), (20,0), (21,0), (-11,0), (22,0), (23,0)], [(-12,0), (0,0), (0,0), (-13,0), (0,0), (0,0), (-14,0), (0,0), (0,0), (-15,0), (0,0), (0,0)], [(-16,0), (24,0), (25,0), (-17,0), (26,0), (27,0), (-18,0), (28,0), (29,0), (-19,0), (30,0), (31,0)], [(-20,0), (32,0), (33,0), (-21,0), (34,0), (35,0), (-22,0), (36,0), (37,0), (-23,0), (38,0), (39,0)], [(-24,0), (40,0), (41,0), (-25,0), (42,0), (43,0), (-26,0), (44,0), (45,0), (-27,0), (46,0), (47,0)]] -- 2.39.5