From c41c05fdccdc8728a0fde43f06f3cdfdc05bce3e Mon Sep 17 00:00:00 2001 From: Daniel Garcia-Sanchez Date: Tue, 30 Oct 2018 11:02:40 +0100 Subject: [PATCH] Add test for Vector and write/read selection --- tests/base/hdf5_05.cc | 242 +++++++++++++++++- ...ue.with_complex_values=off.mpirun=1.output | 20 +- ...ue.with_complex_values=off.mpirun=4.output | 20 +- ...rue.with_complex_values=on.mpirun=1.output | 40 ++- ...rue.with_complex_values=on.mpirun=4.output | 40 ++- 5 files changed, 349 insertions(+), 13 deletions(-) diff --git a/tests/base/hdf5_05.cc b/tests/base/hdf5_05.cc index a5482dc797..4aa0723995 100644 --- a/tests/base/hdf5_05.cc +++ b/tests/base/hdf5_05.cc @@ -129,6 +129,26 @@ container_to_string(std::vector &data) return "[" + data_string + "]"; } +template +std::string +container_to_string(Vector &data) +{ + std::string data_string; + + auto append_to_data_string = [&data_string](const std::string p) { + if (data_string.length() > 0) + data_string += ", "; + data_string += p; + }; + + for (unsigned int idx = 0; idx < data.size(); ++idx) + { + append_to_data_string(boost::lexical_cast(data[idx])); + } + + return "[" + data_string + "]"; +} + template std::string container_to_string(FullMatrix &data) @@ -673,6 +693,149 @@ write_test(HDF5::Group & root_group, << std::endl; } } + + { + std::string dataset_name("dataset_7"); + + // 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 + Vector data(4); + data[0] = 2; + data[1] = 3; + data[2] = 5; + data[3] = 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 + Vector data(4); + data[0] = 12; + data[1] = 13; + data[2] = 15; + data[3] = 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 + Vector data(5); + data[0] = 32; + data[1] = 33; + data[2] = 35; + data[3] = 36; + data[4] = 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; + } + } } @@ -986,7 +1149,44 @@ read_test(HDF5::Group root_group, << " (Read): " << dataset.get_global_no_collective_cause() << std::endl; - deallog << "Selection " + dataset_name << "<" << type_name << ">" + deallog << "Selection std::vector " + 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 Vector " + dataset_name << "<" << type_name << ">" << " (Read): " << container_to_string(data) << std::endl; } } @@ -1148,6 +1348,46 @@ read_test(HDF5::Group root_group, << " (Read): " << container_to_string(data) << std::endl; } } + + { + std::string dataset_name("dataset_7"); + + // 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.open_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; + } + } } diff --git a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=1.output b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=1.output index a28e159235..dd4675d1d7 100644 --- a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=1.output +++ b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=1.output @@ -20,6 +20,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Write tests for double datasets DEAL::Dimensions dataset_1 (Write): 5 3 DEAL::Size dataset_1 (Write): 15 @@ -41,6 +44,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Read tests for float datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -58,7 +64,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -75,6 +82,10 @@ 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, 0, 2, 3, 0, 4, 5, 0, 6, 7], [0, 8, 9, 0, 10, 11, 0, 12, 13, 0, 14, 15], [0, 16, 17, 0, 18, 19, 0, 20, 21, 0, 22, 23], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 24, 25, 0, 26, 27, 0, 28, 29, 0, 30, 31], [0, 32, 33, 0, 34, 35, 0, 36, 37, 0, 38, 39], [0, 40, 41, 0, 42, 43, 0, 44, 45, 0, 46, 47]] +DEAL::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (Read): [2, 0, 0, 0, 6, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] DEAL::Read tests for double datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -92,7 +103,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -109,3 +121,7 @@ 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, 0, 2, 3, 0, 4, 5, 0, 6, 7], [0, 8, 9, 0, 10, 11, 0, 12, 13, 0, 14, 15], [0, 16, 17, 0, 18, 19, 0, 20, 21, 0, 22, 23], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 24, 25, 0, 26, 27, 0, 28, 29, 0, 30, 31], [0, 32, 33, 0, 34, 35, 0, 36, 37, 0, 38, 39], [0, 40, 41, 0, 42, 43, 0, 44, 45, 0, 46, 47]] +DEAL::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (Read): [2, 0, 0, 0, 6, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] diff --git a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=4.output b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=4.output index 63ad57eb58..2d4210d218 100644 --- a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=4.output +++ b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=off.mpirun=4.output @@ -20,6 +20,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Write tests for double datasets DEAL::Dimensions dataset_1 (Write): 5 3 DEAL::Size dataset_1 (Write): 15 @@ -41,6 +44,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Read tests for float datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -58,7 +64,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -75,6 +82,10 @@ 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::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (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::Read tests for double datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -92,7 +103,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -109,3 +121,7 @@ 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::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (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] diff --git a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=1.output b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=1.output index c2a88f3429..1e3444dcdd 100644 --- a/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=1.output +++ b/tests/base/hdf5_05.with_hdf5=true.with_complex_values=on.mpirun=1.output @@ -20,6 +20,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Write tests for double datasets DEAL::Dimensions dataset_1 (Write): 5 3 DEAL::Size dataset_1 (Write): 15 @@ -41,6 +44,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Write tests for std::complex datasets DEAL::Dimensions dataset_1> (Write): 5 3 DEAL::Size dataset_1> (Write): 15 @@ -62,6 +68,9 @@ 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::Dimensions dataset_7> (Write): 3 2 4 +DEAL::Size dataset_7> (Write): 24 +DEAL::Rank dataset_7> (Write): 3 DEAL::Write tests for std::complex datasets DEAL::Dimensions dataset_1> (Write): 5 3 DEAL::Size dataset_1> (Write): 15 @@ -83,6 +92,9 @@ 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::Dimensions dataset_7> (Write): 3 2 4 +DEAL::Size dataset_7> (Write): 24 +DEAL::Rank dataset_7> (Write): 3 DEAL::Read tests for float datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -100,7 +112,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -117,6 +130,10 @@ 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, 0, 2, 3, 0, 4, 5, 0, 6, 7], [0, 8, 9, 0, 10, 11, 0, 12, 13, 0, 14, 15], [0, 16, 17, 0, 18, 19, 0, 20, 21, 0, 22, 23], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 24, 25, 0, 26, 27, 0, 28, 29, 0, 30, 31], [0, 32, 33, 0, 34, 35, 0, 36, 37, 0, 38, 39], [0, 40, 41, 0, 42, 43, 0, 44, 45, 0, 46, 47]] +DEAL::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (Read): [2, 0, 0, 0, 6, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] DEAL::Read tests for double datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -134,7 +151,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -151,6 +169,10 @@ 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, 0, 2, 3, 0, 4, 5, 0, 6, 7], [0, 8, 9, 0, 10, 11, 0, 12, 13, 0, 14, 15], [0, 16, 17, 0, 18, 19, 0, 20, 21, 0, 22, 23], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 24, 25, 0, 26, 27, 0, 28, 29, 0, 30, 31], [0, 32, 33, 0, 34, 35, 0, 36, 37, 0, 38, 39], [0, 40, 41, 0, 42, 43, 0, 44, 45, 0, 46, 47]] +DEAL::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (Read): [2, 0, 0, 0, 6, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] DEAL::Read tests for std::complex datasets DEAL::Dimensions dataset_1> (Read): 5 3 DEAL::Size dataset_1> (Read): 15 @@ -168,7 +190,8 @@ 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::Selection std::vector dataset_2> (Read): [(0,0), (20,0), (22,0), (13,0), (11,0)] +DEAL::Selection Vector 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 @@ -185,6 +208,10 @@ 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), (0,0), (2,0), (3,0), (0,0), (4,0), (5,0), (0,0), (6,0), (7,0)], [(0,0), (8,0), (9,0), (0,0), (10,0), (11,0), (0,0), (12,0), (13,0), (0,0), (14,0), (15,0)], [(0,0), (16,0), (17,0), (0,0), (18,0), (19,0), (0,0), (20,0), (21,0), (0,0), (22,0), (23,0)], [(0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0)], [(0,0), (24,0), (25,0), (0,0), (26,0), (27,0), (0,0), (28,0), (29,0), (0,0), (30,0), (31,0)], [(0,0), (32,0), (33,0), (0,0), (34,0), (35,0), (0,0), (36,0), (37,0), (0,0), (38,0), (39,0)], [(0,0), (40,0), (41,0), (0,0), (42,0), (43,0), (0,0), (44,0), (45,0), (0,0), (46,0), (47,0)]] +DEAL::Dimensions dataset_7> (Read): 3 2 4 +DEAL::Size dataset_7> (Read): 24 +DEAL::Rank dataset_7> (Read): 3 +DEAL::Data dataset_7> (Read): [(2,0), (0,0), (0,0), (0,0), (6,0), (5,0), (0,0), (3,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0)] DEAL::Read tests for std::complex datasets DEAL::Dimensions dataset_1> (Read): 5 3 DEAL::Size dataset_1> (Read): 15 @@ -202,7 +229,8 @@ 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::Selection std::vector dataset_2> (Read): [(0,0), (20,0), (22,0), (13,0), (11,0)] +DEAL::Selection Vector 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 @@ -219,3 +247,7 @@ 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), (0,0), (2,0), (3,0), (0,0), (4,0), (5,0), (0,0), (6,0), (7,0)], [(0,0), (8,0), (9,0), (0,0), (10,0), (11,0), (0,0), (12,0), (13,0), (0,0), (14,0), (15,0)], [(0,0), (16,0), (17,0), (0,0), (18,0), (19,0), (0,0), (20,0), (21,0), (0,0), (22,0), (23,0)], [(0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0)], [(0,0), (24,0), (25,0), (0,0), (26,0), (27,0), (0,0), (28,0), (29,0), (0,0), (30,0), (31,0)], [(0,0), (32,0), (33,0), (0,0), (34,0), (35,0), (0,0), (36,0), (37,0), (0,0), (38,0), (39,0)], [(0,0), (40,0), (41,0), (0,0), (42,0), (43,0), (0,0), (44,0), (45,0), (0,0), (46,0), (47,0)]] +DEAL::Dimensions dataset_7> (Read): 3 2 4 +DEAL::Size dataset_7> (Read): 24 +DEAL::Rank dataset_7> (Read): 3 +DEAL::Data dataset_7> (Read): [(2,0), (0,0), (0,0), (0,0), (6,0), (5,0), (0,0), (3,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0), (0,0)] 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 cb302f251d..50c3fff9b9 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 @@ -20,6 +20,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Write tests for double datasets DEAL::Dimensions dataset_1 (Write): 5 3 DEAL::Size dataset_1 (Write): 15 @@ -41,6 +44,9 @@ 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::Dimensions dataset_7 (Write): 3 2 4 +DEAL::Size dataset_7 (Write): 24 +DEAL::Rank dataset_7 (Write): 3 DEAL::Write tests for std::complex datasets DEAL::Dimensions dataset_1> (Write): 5 3 DEAL::Size dataset_1> (Write): 15 @@ -62,6 +68,9 @@ 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::Dimensions dataset_7> (Write): 3 2 4 +DEAL::Size dataset_7> (Write): 24 +DEAL::Rank dataset_7> (Write): 3 DEAL::Write tests for std::complex datasets DEAL::Dimensions dataset_1> (Write): 5 3 DEAL::Size dataset_1> (Write): 15 @@ -83,6 +92,9 @@ 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::Dimensions dataset_7> (Write): 3 2 4 +DEAL::Size dataset_7> (Write): 24 +DEAL::Rank dataset_7> (Write): 3 DEAL::Read tests for float datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -100,7 +112,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -117,6 +130,10 @@ 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::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (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::Read tests for double datasets DEAL::Dimensions dataset_1 (Read): 5 3 DEAL::Size dataset_1 (Read): 15 @@ -134,7 +151,8 @@ 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::Selection std::vector dataset_2 (Read): [0, 20, 22, 13, 11] +DEAL::Selection Vector 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 @@ -151,6 +169,10 @@ 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::Dimensions dataset_7 (Read): 3 2 4 +DEAL::Size dataset_7 (Read): 24 +DEAL::Rank dataset_7 (Read): 3 +DEAL::Data dataset_7 (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::Read tests for std::complex datasets DEAL::Dimensions dataset_1> (Read): 5 3 DEAL::Size dataset_1> (Read): 15 @@ -168,7 +190,8 @@ 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::Selection std::vector dataset_2> (Read): [(0,0), (20,0), (22,0), (13,0), (11,0)] +DEAL::Selection Vector 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 @@ -185,6 +208,10 @@ 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::Dimensions dataset_7> (Read): 3 2 4 +DEAL::Size dataset_7> (Read): 24 +DEAL::Rank dataset_7> (Read): 3 +DEAL::Data dataset_7> (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::Read tests for std::complex datasets DEAL::Dimensions dataset_1> (Read): 5 3 DEAL::Size dataset_1> (Read): 15 @@ -202,7 +229,8 @@ 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::Selection std::vector dataset_2> (Read): [(0,0), (20,0), (22,0), (13,0), (11,0)] +DEAL::Selection Vector 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 @@ -219,3 +247,7 @@ 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::Dimensions dataset_7> (Read): 3 2 4 +DEAL::Size dataset_7> (Read): 24 +DEAL::Rank dataset_7> (Read): 3 +DEAL::Data dataset_7> (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)] -- 2.39.5