diff --git a/source/utils/bpls/bpls.cpp b/source/utils/bpls/bpls.cpp index 097e386c49..3d20fd1ca3 100644 --- a/source/utils/bpls/bpls.cpp +++ b/source/utils/bpls/bpls.cpp @@ -2189,6 +2189,7 @@ const std::map adios_types_map = { {"int32_t", adios_integer}, {"float", adios_real}, {"double", adios_double}, + {"long double", adios_long_double}, {"float complex", adios_complex}, {"double complex", adios_double_complex}, {"int8_t", adios_byte}, diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index 675147ed4d..808f06de6f 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -96,6 +96,7 @@ endfunction() add_subdirectory(adios2) add_subdirectory(utils) +add_subdirectory(backward-compatibility) if(ADIOS2_RUN_INSTALL_TEST) add_subdirectory(install) endif() diff --git a/testing/backward-compatibility/2.5.0/CMakeLists.txt b/testing/backward-compatibility/2.5.0/CMakeLists.txt new file mode 100644 index 0000000000..ecb2d18481 --- /dev/null +++ b/testing/backward-compatibility/2.5.0/CMakeLists.txt @@ -0,0 +1,19 @@ +#------------------------------------------------------------------------------# +# Distributed under the OSI-approved Apache License, Version 2.0. See +# accompanying file Copyright.txt for details. +#------------------------------------------------------------------------------# + +macro(bp3_bp4_gtest_add_tests_helper testname mpi) + gtest_add_tests_helper(${testname} ${mpi} "" BackwardCompatibility.250. .BP3 + EXTRA_ARGS ${CMAKE_CURRENT_SOURCE_DIR}/data "BP3" + ) + gtest_add_tests_helper(${testname} ${mpi} "" BackwardCompatibility.250. .BP4 + EXTRA_ARGS ${CMAKE_CURRENT_SOURCE_DIR}/data "BP4" + ) +endmacro() + + +bp3_bp4_gtest_add_tests_helper(ReadAttributes MPI_NONE) +bp3_bp4_gtest_add_tests_helper(ReadMultiblocks MPI_NONE) + + diff --git a/testing/backward-compatibility/2.5.0/SmallTestData250.h b/testing/backward-compatibility/2.5.0/SmallTestData250.h new file mode 100644 index 0000000000..c38f8b2cbb --- /dev/null +++ b/testing/backward-compatibility/2.5.0/SmallTestData250.h @@ -0,0 +1,129 @@ +/* + * Distributed under the OSI-approved Apache License, Version 2.0. See + * accompanying file Copyright.txt for details. + */ +#ifndef TESTING_BACKWARD_250_SMALLTESTDATA_H_ +#define TESTING_BACKWARD_250_SMALLTESTDATA_H_ + +#include + +#include +#include +#include +#include + +#ifdef WIN32 +#define NOMINMAX +#endif + +// Test data for each type. Make sure our values exceed the range of the +// previous size to make sure we all bytes for each element +struct SmallTestData250 +{ + std::string S1 = "Testing ADIOS2 String type"; + + // These shoudl be able to use std::array like the rest of the pieces + // but the XL compiler seems to have some bad code generation surounding + // it that results in a double-free corruption. Switching to std::vector + // bypasses the problem + std::vector S1array = {"one"}; + std::vector S3 = {"one", "two", "three"}; + + std::array I8 = {{0, 1, -2, 3, -4, 5, -6, 7, -8, 9}}; + std::array I16 = { + {512, 513, -510, 515, -508, 517, -506, 519, -504, 521}}; + std::array I32 = {{131072, 131073, -131070, 131075, -131068, + 131077, -131066, 131079, -131064, 131081}}; + std::array I64 = { + {8589934592, 8589934593, -8589934590, 8589934595, -8589934588, + 8589934597, -8589934586, 8589934599, -8589934584, 8589934601}}; + std::array U8 = { + {128, 129, 130, 131, 132, 133, 134, 135, 136, 137}}; + std::array U16 = { + {32768, 32769, 32770, 32771, 32772, 32773, 32774, 32775, 32776, 32777}}; + std::array U32 = { + {2147483648, 2147483649, 2147483650, 2147483651, 2147483652, 2147483653, + 2147483654, 2147483655, 2147483656, 2147483657}}; + std::array U64 = { + {9223372036854775808UL, 9223372036854775809UL, 9223372036854775810UL, + 9223372036854775811UL, 9223372036854775812UL, 9223372036854775813UL, + 9223372036854775814UL, 9223372036854775815UL, 9223372036854775816UL, + 9223372036854775817UL}}; + std::array R32 = { + {0.1f, 1.1f, 2.1f, 3.1f, 4.1f, 5.1f, 6.1f, 7.1f, 8.1f, 9.1f}}; + std::array R64 = { + {10.2, 11.2, 12.2, 13.2, 14.2, 15.2, 16.2, 17.2, 18.2, 19.2}}; + std::array R128 = { + {410.2, 411.2, 412.2, 413.2, 414.2, 415.2, 416.2, 417.2, 418.2, 419.2}}; + + std::array, 10> CR32 = { + {std::complex(0.1f, 1.1f), std::complex(1.1f, 2.1f), + std::complex(2.1f, 3.1f), std::complex(3.1f, 4.1f), + std::complex(4.1f, 5.1f), std::complex(5.1f, 6.1f), + std::complex(6.1f, 7.1f), std::complex(7.1f, 8.1f), + std::complex(8.1f, 9.1f), std::complex(9.1f, 10.1f)}}; + + std::array, 10> CR64 = { + {std::complex(10.2, 11.2), std::complex(11.2, 12.2), + std::complex(12.2, 13.2), std::complex(13.2, 14.2), + std::complex(14.2, 15.2), std::complex(15.2, 16.2), + std::complex(16.2, 17.2), std::complex(17.2, 18.2), + std::complex(18.2, 19.2), std::complex(19.2, 20.2)}}; +}; + +SmallTestData250 generateNewSmallTestData(SmallTestData250 in, int step, + int rank, int size) +{ + int j = rank + 1 + step * size; + std::for_each(in.I8.begin(), in.I8.end(), [&](int8_t &v) { v += j; }); + std::for_each(in.I16.begin(), in.I16.end(), [&](int16_t &v) { v += j; }); + std::for_each(in.I32.begin(), in.I32.end(), [&](int32_t &v) { v += j; }); + std::for_each(in.I64.begin(), in.I64.end(), [&](int64_t &v) { v += j; }); + std::for_each(in.U8.begin(), in.U8.end(), [&](uint8_t &v) { v += j; }); + std::for_each(in.U16.begin(), in.U16.end(), [&](uint16_t &v) { v += j; }); + std::for_each(in.U32.begin(), in.U32.end(), [&](uint32_t &v) { v += j; }); + std::for_each(in.U64.begin(), in.U64.end(), [&](uint64_t &v) { v += j; }); + std::for_each(in.R32.begin(), in.R32.end(), [&](float &v) { v += j; }); + std::for_each(in.R64.begin(), in.R64.end(), [&](double &v) { v += j; }); + std::for_each(in.R128.begin(), in.R128.end(), + [&](long double &v) { v += j; }); + + std::for_each(in.CR32.begin(), in.CR32.end(), [&](std::complex &v) { + v.real(v.real() + static_cast(j)); + v.imag(v.imag() + static_cast(j)); + }); + std::for_each(in.CR64.begin(), in.CR64.end(), [&](std::complex &v) { + v.real(v.real() + static_cast(j)); + v.imag(v.imag() + static_cast(j)); + }); + + return in; +} + +void UpdateSmallTestData(SmallTestData250 &in, int step, int rank, int size) +{ + int j = rank + 1 + step * size; + std::for_each(in.I8.begin(), in.I8.end(), [&](int8_t &v) { v += j; }); + std::for_each(in.I16.begin(), in.I16.end(), [&](int16_t &v) { v += j; }); + std::for_each(in.I32.begin(), in.I32.end(), [&](int32_t &v) { v += j; }); + std::for_each(in.I64.begin(), in.I64.end(), [&](int64_t &v) { v += j; }); + std::for_each(in.U8.begin(), in.U8.end(), [&](uint8_t &v) { v += j; }); + std::for_each(in.U16.begin(), in.U16.end(), [&](uint16_t &v) { v += j; }); + std::for_each(in.U32.begin(), in.U32.end(), [&](uint32_t &v) { v += j; }); + std::for_each(in.U64.begin(), in.U64.end(), [&](uint64_t &v) { v += j; }); + std::for_each(in.R32.begin(), in.R32.end(), [&](float &v) { v += j; }); + std::for_each(in.R64.begin(), in.R64.end(), [&](double &v) { v += j; }); + std::for_each(in.R128.begin(), in.R128.end(), + [&](long double &v) { v += j; }); + + std::for_each(in.CR32.begin(), in.CR32.end(), [&](std::complex &v) { + v.real(v.real() + static_cast(j)); + v.imag(v.imag() + static_cast(j)); + }); + std::for_each(in.CR64.begin(), in.CR64.end(), [&](std::complex &v) { + v.real(v.real() + static_cast(j)); + v.imag(v.imag() + static_cast(j)); + }); +} + +#endif // TESTING_BACKWARD_250_SMALLTESTDATA_H_ diff --git a/testing/backward-compatibility/2.5.0/TestReadAttributes.cpp b/testing/backward-compatibility/2.5.0/TestReadAttributes.cpp new file mode 100644 index 0000000000..2597bc234f --- /dev/null +++ b/testing/backward-compatibility/2.5.0/TestReadAttributes.cpp @@ -0,0 +1,586 @@ +/* + * Distributed under the OSI-approved Apache License, Version 2.0. See + * accompanying file Copyright.txt for details. + */ +#include +#include +#include + +#include +#include + +#include + +#include + +#include "SmallTestData250.h" + +std::string dataPath; // comes from command line +std::string engineName; // comes from command line + +class ReadAttributes : public ::testing::Test +{ +public: + ReadAttributes() = default; + + SmallTestData250 m_TestData; +}; + +// ADIOS2 write, read for single value attributes +TEST_F(ReadAttributes, SingleTypes) +{ + const std::string fName = dataPath + + std::string(&adios2::PathSeparator, 1) + + engineName + "AttributesSingleTypes.bp"; + + const std::string zero = std::to_string(0); + const std::string s1_Single = std::string("s1_Single_") + zero; + const std::string s1_Array = std::string("s1_Array_") + zero; + const std::string i8_Single = std::string("i8_Single_") + zero; + const std::string i16_Single = std::string("i16_Single_") + zero; + const std::string i32_Single = std::string("i32_Single_") + zero; + const std::string i64_Single = std::string("i64_Single_") + zero; + const std::string u8_Single = std::string("u8_Single_") + zero; + const std::string u16_Single = std::string("u16_Single_") + zero; + const std::string u32_Single = std::string("u32_Single_") + zero; + const std::string u64_Single = std::string("u64_Single_") + zero; + const std::string r32_Single = std::string("r32_Single_") + zero; + const std::string r64_Single = std::string("r64_Single_") + zero; + + // When collective meta generation has landed, use + // generateNewSmallTestData(m_TestData, 0, mpiRank, mpiSize); + // Generate current testing data + SmallTestData250 currentTestData = + generateNewSmallTestData(m_TestData, 0, 0, 0); + + adios2::ADIOS adios; + + { + adios2::IO ioRead = adios.DeclareIO("ioRead"); + if (!engineName.empty()) + { + ioRead.SetEngine(engineName); + } + + adios2::Engine bpRead = ioRead.Open(fName, adios2::Mode::Read); + + auto attr_s1 = ioRead.InquireAttribute(s1_Single); + auto attr_s1a = ioRead.InquireAttribute(s1_Array); + auto attr_i8 = ioRead.InquireAttribute(i8_Single); + auto attr_i16 = ioRead.InquireAttribute(i16_Single); + auto attr_i32 = ioRead.InquireAttribute(i32_Single); + auto attr_i64 = ioRead.InquireAttribute(i64_Single); + + auto attr_u8 = ioRead.InquireAttribute(u8_Single); + auto attr_u16 = ioRead.InquireAttribute(u16_Single); + auto attr_u32 = ioRead.InquireAttribute(u32_Single); + auto attr_u64 = ioRead.InquireAttribute(u64_Single); + + auto attr_r32 = ioRead.InquireAttribute(r32_Single); + auto attr_r64 = ioRead.InquireAttribute(r64_Single); + + EXPECT_TRUE(attr_s1); + ASSERT_EQ(attr_s1.Name(), s1_Single); + ASSERT_EQ(attr_s1.Data().size() == 1, true); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); + ASSERT_EQ(attr_s1.Data().front(), currentTestData.S1); + + EXPECT_TRUE(attr_s1a); + ASSERT_EQ(attr_s1a.Name(), s1_Array); + ASSERT_EQ(attr_s1a.Data().size() == 1, true); + ASSERT_EQ(attr_s1a.Type(), adios2::GetType()); + ASSERT_EQ(attr_s1a.Data()[0], currentTestData.S1array[0]); + + EXPECT_TRUE(attr_i8); + ASSERT_EQ(attr_i8.Name(), i8_Single); + ASSERT_EQ(attr_i8.Data().size() == 1, true); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); + ASSERT_EQ(attr_i8.Data().front(), currentTestData.I8.front()); + + EXPECT_TRUE(attr_i16); + ASSERT_EQ(attr_i16.Name(), i16_Single); + ASSERT_EQ(attr_i16.Data().size() == 1, true); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); + ASSERT_EQ(attr_i16.Data().front(), currentTestData.I16.front()); + + EXPECT_TRUE(attr_i32); + ASSERT_EQ(attr_i32.Name(), i32_Single); + ASSERT_EQ(attr_i32.Data().size() == 1, true); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); + ASSERT_EQ(attr_i32.Data().front(), currentTestData.I32.front()); + + EXPECT_TRUE(attr_i64); + ASSERT_EQ(attr_i64.Name(), i64_Single); + ASSERT_EQ(attr_i64.Data().size() == 1, true); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); + ASSERT_EQ(attr_i64.Data().front(), currentTestData.I64.front()); + + EXPECT_TRUE(attr_u8); + ASSERT_EQ(attr_u8.Name(), u8_Single); + ASSERT_EQ(attr_u8.Data().size() == 1, true); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); + ASSERT_EQ(attr_u8.Data().front(), currentTestData.U8.front()); + + EXPECT_TRUE(attr_u16); + ASSERT_EQ(attr_u16.Name(), u16_Single); + ASSERT_EQ(attr_u16.Data().size() == 1, true); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); + ASSERT_EQ(attr_u16.Data().front(), currentTestData.U16.front()); + + EXPECT_TRUE(attr_u32); + ASSERT_EQ(attr_u32.Name(), u32_Single); + ASSERT_EQ(attr_u32.Data().size() == 1, true); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); + ASSERT_EQ(attr_u32.Data().front(), currentTestData.U32.front()); + + EXPECT_TRUE(attr_u64); + ASSERT_EQ(attr_u64.Name(), u64_Single); + ASSERT_EQ(attr_u64.Data().size() == 1, true); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); + ASSERT_EQ(attr_u64.Data().front(), currentTestData.U64.front()); + + EXPECT_TRUE(attr_r32); + ASSERT_EQ(attr_r32.Name(), r32_Single); + ASSERT_EQ(attr_r32.Data().size() == 1, true); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); + ASSERT_EQ(attr_r32.Data().front(), currentTestData.R32.front()); + + EXPECT_TRUE(attr_r64); + ASSERT_EQ(attr_r64.Name(), r64_Single); + ASSERT_EQ(attr_r64.Data().size() == 1, true); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); + ASSERT_EQ(attr_r64.Data().front(), currentTestData.R64.front()); + + bpRead.Close(); + } +} + +// ADIOS2 write read for array attributes +TEST_F(ReadAttributes, ArrayTypes) +{ + const std::string fName = dataPath + + std::string(&adios2::PathSeparator, 1) + + engineName + "AttributesArrayTypes.bp"; + + const std::string zero = std::to_string(0); + const std::string s1_Array = std::string("s1_Array_") + zero; + const std::string i8_Array = std::string("i8_Array_") + zero; + const std::string i16_Array = std::string("i16_Array_") + zero; + const std::string i32_Array = std::string("i32_Array_") + zero; + const std::string i64_Array = std::string("i64_Array_") + zero; + const std::string u8_Array = std::string("u8_Array_") + zero; + const std::string u16_Array = std::string("u16_Array_") + zero; + const std::string u32_Array = std::string("u32_Array_") + zero; + const std::string u64_Array = std::string("u64_Array_") + zero; + const std::string r32_Array = std::string("r32_Array_") + zero; + const std::string r64_Array = std::string("r64_Array_") + zero; + + // When collective meta generation has landed, use + // generateNewSmallTestData(m_TestData, 0, mpiRank, mpiSize); + // Generate current testing data + SmallTestData250 currentTestData = + generateNewSmallTestData(m_TestData, 0, 0, 0); + + adios2::ADIOS adios; + + { + adios2::IO ioRead = adios.DeclareIO("ioRead"); + + if (!engineName.empty()) + { + ioRead.SetEngine(engineName); + } + + adios2::Engine bpRead = ioRead.Open(fName, adios2::Mode::Read); + + auto attr_s1 = ioRead.InquireAttribute(s1_Array); + + auto attr_i8 = ioRead.InquireAttribute(i8_Array); + auto attr_i16 = ioRead.InquireAttribute(i16_Array); + auto attr_i32 = ioRead.InquireAttribute(i32_Array); + auto attr_i64 = ioRead.InquireAttribute(i64_Array); + + auto attr_u8 = ioRead.InquireAttribute(u8_Array); + auto attr_u16 = ioRead.InquireAttribute(u16_Array); + auto attr_u32 = ioRead.InquireAttribute(u32_Array); + auto attr_u64 = ioRead.InquireAttribute(u64_Array); + + auto attr_r32 = ioRead.InquireAttribute(r32_Array); + auto attr_r64 = ioRead.InquireAttribute(r64_Array); + + EXPECT_TRUE(attr_s1); + ASSERT_EQ(attr_s1.Name(), s1_Array); + ASSERT_EQ(attr_s1.Data().size() == 1, false); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i8); + ASSERT_EQ(attr_i8.Name(), i8_Array); + ASSERT_EQ(attr_i8.Data().size() == 1, false); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i16); + ASSERT_EQ(attr_i16.Name(), i16_Array); + ASSERT_EQ(attr_i16.Data().size() == 1, false); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i32); + ASSERT_EQ(attr_i32.Name(), i32_Array); + ASSERT_EQ(attr_i32.Data().size() == 1, false); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i64); + ASSERT_EQ(attr_i64.Name(), i64_Array); + ASSERT_EQ(attr_i64.Data().size() == 1, false); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u8); + ASSERT_EQ(attr_u8.Name(), u8_Array); + ASSERT_EQ(attr_u8.Data().size() == 1, false); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u16); + ASSERT_EQ(attr_u16.Name(), u16_Array); + ASSERT_EQ(attr_u16.Data().size() == 1, false); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u32); + ASSERT_EQ(attr_u32.Name(), u32_Array); + ASSERT_EQ(attr_u32.Data().size() == 1, false); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u64); + ASSERT_EQ(attr_u64.Name(), u64_Array); + ASSERT_EQ(attr_u64.Data().size() == 1, false); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_r32); + ASSERT_EQ(attr_r32.Name(), r32_Array); + ASSERT_EQ(attr_r32.Data().size() == 1, false); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_r64); + ASSERT_EQ(attr_r64.Name(), r64_Array); + ASSERT_EQ(attr_r64.Data().size() == 1, false); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); + + auto I8 = attr_i8.Data(); + auto I16 = attr_i16.Data(); + auto I32 = attr_i32.Data(); + auto I64 = attr_i64.Data(); + + auto U8 = attr_u8.Data(); + auto U16 = attr_u16.Data(); + auto U32 = attr_u32.Data(); + auto U64 = attr_u64.Data(); + + const size_t Nx = 10; + for (size_t i = 0; i < Nx; ++i) + { + EXPECT_EQ(I8[i], currentTestData.I8[i]); + EXPECT_EQ(I16[i], currentTestData.I16[i]); + EXPECT_EQ(I32[i], currentTestData.I32[i]); + EXPECT_EQ(I64[i], currentTestData.I64[i]); + + EXPECT_EQ(U8[i], currentTestData.U8[i]); + EXPECT_EQ(U16[i], currentTestData.U16[i]); + EXPECT_EQ(U32[i], currentTestData.U32[i]); + EXPECT_EQ(U64[i], currentTestData.U64[i]); + } + + bpRead.Close(); + } +} + +TEST_F(ReadAttributes, OfVariableSingleTypes) +{ + const std::string fName = dataPath + + std::string(&adios2::PathSeparator, 1) + + engineName + "AttributesOfVariableSingleTypes.bp"; + + const std::string zero = std::to_string(0); + const std::string s1_Single = std::string("s1_Single_") + zero; + const std::string i8_Single = std::string("i8_Single_") + zero; + const std::string i16_Single = std::string("i16_Single_") + zero; + const std::string i32_Single = std::string("i32_Single_") + zero; + const std::string i64_Single = std::string("i64_Single_") + zero; + const std::string u8_Single = std::string("u8_Single_") + zero; + const std::string u16_Single = std::string("u16_Single_") + zero; + const std::string u32_Single = std::string("u32_Single_") + zero; + const std::string u64_Single = std::string("u64_Single_") + zero; + const std::string r32_Single = std::string("r32_Single_") + zero; + const std::string r64_Single = std::string("r64_Single_") + zero; + + // When collective meta generation has landed, use + // generateNewSmallTestData(m_TestData, 0, mpiRank, mpiSize); + // Generate current testing data + SmallTestData250 currentTestData = + generateNewSmallTestData(m_TestData, 0, 0, 0); + + const std::string separator = "/"; + + adios2::ADIOS adios; + + { + adios2::IO ioRead = adios.DeclareIO("ioRead"); + if (!engineName.empty()) + { + ioRead.SetEngine(engineName); + } + + adios2::Engine bpRead = ioRead.Open(fName, adios2::Mode::Read); + + auto var = ioRead.InquireVariable("myVar"); + + auto attr_s1 = + ioRead.InquireAttribute(s1_Single, var.Name()); + auto attr_i8 = ioRead.InquireAttribute(i8_Single, var.Name()); + auto attr_i16 = + ioRead.InquireAttribute(i16_Single, var.Name()); + auto attr_i32 = + ioRead.InquireAttribute(i32_Single, var.Name()); + auto attr_i64 = + ioRead.InquireAttribute(i64_Single, var.Name()); + + auto attr_u8 = ioRead.InquireAttribute(u8_Single, var.Name()); + auto attr_u16 = + ioRead.InquireAttribute(u16_Single, var.Name()); + auto attr_u32 = + ioRead.InquireAttribute(u32_Single, var.Name()); + auto attr_u64 = + ioRead.InquireAttribute(u64_Single, var.Name()); + + auto attr_r32 = ioRead.InquireAttribute(r32_Single, var.Name()); + auto attr_r64 = ioRead.InquireAttribute(r64_Single, var.Name()); + + EXPECT_TRUE(attr_s1); + ASSERT_EQ(attr_s1.Name(), var.Name() + separator + s1_Single); + ASSERT_EQ(attr_s1.Data().size() == 1, true); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); + ASSERT_EQ(attr_s1.Data().front(), currentTestData.S1); + + EXPECT_TRUE(attr_i8); + ASSERT_EQ(attr_i8.Name(), var.Name() + separator + i8_Single); + ASSERT_EQ(attr_i8.Data().size() == 1, true); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); + ASSERT_EQ(attr_i8.Data().front(), currentTestData.I8.front()); + + EXPECT_TRUE(attr_i16); + ASSERT_EQ(attr_i16.Name(), var.Name() + separator + i16_Single); + ASSERT_EQ(attr_i16.Data().size() == 1, true); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); + ASSERT_EQ(attr_i16.Data().front(), currentTestData.I16.front()); + + EXPECT_TRUE(attr_i32); + ASSERT_EQ(attr_i32.Name(), var.Name() + separator + i32_Single); + ASSERT_EQ(attr_i32.Data().size() == 1, true); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); + ASSERT_EQ(attr_i32.Data().front(), currentTestData.I32.front()); + + EXPECT_TRUE(attr_i64); + ASSERT_EQ(attr_i64.Name(), var.Name() + separator + i64_Single); + ASSERT_EQ(attr_i64.Data().size() == 1, true); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); + ASSERT_EQ(attr_i64.Data().front(), currentTestData.I64.front()); + + EXPECT_TRUE(attr_u8); + ASSERT_EQ(attr_u8.Name(), var.Name() + separator + u8_Single); + ASSERT_EQ(attr_u8.Data().size() == 1, true); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); + ASSERT_EQ(attr_u8.Data().front(), currentTestData.U8.front()); + + EXPECT_TRUE(attr_u16); + ASSERT_EQ(attr_u16.Name(), var.Name() + separator + u16_Single); + ASSERT_EQ(attr_u16.Data().size() == 1, true); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); + ASSERT_EQ(attr_u16.Data().front(), currentTestData.U16.front()); + + EXPECT_TRUE(attr_u32); + ASSERT_EQ(attr_u32.Name(), var.Name() + separator + u32_Single); + ASSERT_EQ(attr_u32.Data().size() == 1, true); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); + ASSERT_EQ(attr_u32.Data().front(), currentTestData.U32.front()); + + EXPECT_TRUE(attr_u64); + ASSERT_EQ(attr_u64.Name(), var.Name() + separator + u64_Single); + ASSERT_EQ(attr_u64.Data().size() == 1, true); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); + ASSERT_EQ(attr_u64.Data().front(), currentTestData.U64.front()); + + EXPECT_TRUE(attr_r32); + ASSERT_EQ(attr_r32.Name(), var.Name() + separator + r32_Single); + ASSERT_EQ(attr_r32.Data().size() == 1, true); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); + ASSERT_EQ(attr_r32.Data().front(), currentTestData.R32.front()); + + EXPECT_TRUE(attr_r64); + ASSERT_EQ(attr_r64.Name(), var.Name() + separator + r64_Single); + ASSERT_EQ(attr_r64.Data().size() == 1, true); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); + ASSERT_EQ(attr_r64.Data().front(), currentTestData.R64.front()); + + bpRead.Close(); + } +} + +// ADIOS2 write read for array attributes +TEST_F(ReadAttributes, OfVariableArrayTypes) +{ + const std::string fName = dataPath + + std::string(&adios2::PathSeparator, 1) + + engineName + "AttributesOfVariableArrayTypes.bp"; + + const std::string zero = std::to_string(0); + const std::string s1_Array = std::string("s1_Array_") + zero; + const std::string i8_Array = std::string("i8_Array_") + zero; + const std::string i16_Array = std::string("i16_Array_") + zero; + const std::string i32_Array = std::string("i32_Array_") + zero; + const std::string i64_Array = std::string("i64_Array_") + zero; + const std::string u8_Array = std::string("u8_Array_") + zero; + const std::string u16_Array = std::string("u16_Array_") + zero; + const std::string u32_Array = std::string("u32_Array_") + zero; + const std::string u64_Array = std::string("u64_Array_") + zero; + const std::string r32_Array = std::string("r32_Array_") + zero; + const std::string r64_Array = std::string("r64_Array_") + zero; + + const std::string separator = "/"; + + SmallTestData250 currentTestData = + generateNewSmallTestData(m_TestData, 0, 0, 0); + + adios2::ADIOS adios; + + { + adios2::IO ioRead = adios.DeclareIO("ioRead"); + if (!engineName.empty()) + { + ioRead.SetEngine(engineName); + } + + adios2::Engine bpRead = ioRead.Open(fName, adios2::Mode::Read); + + auto var = ioRead.InquireVariable("myVar"); + + auto attr_s1 = + ioRead.InquireAttribute(s1_Array, var.Name()); + + auto attr_i8 = ioRead.InquireAttribute(i8_Array, var.Name()); + auto attr_i16 = ioRead.InquireAttribute(i16_Array, var.Name()); + auto attr_i32 = ioRead.InquireAttribute(i32_Array, var.Name()); + auto attr_i64 = ioRead.InquireAttribute(i64_Array, var.Name()); + + auto attr_u8 = ioRead.InquireAttribute(u8_Array, var.Name()); + auto attr_u16 = + ioRead.InquireAttribute(u16_Array, var.Name()); + auto attr_u32 = + ioRead.InquireAttribute(u32_Array, var.Name()); + auto attr_u64 = + ioRead.InquireAttribute(u64_Array, var.Name()); + + auto attr_r32 = ioRead.InquireAttribute(r32_Array, var.Name()); + auto attr_r64 = ioRead.InquireAttribute(r64_Array, var.Name()); + + EXPECT_TRUE(attr_s1); + ASSERT_EQ(attr_s1.Name(), var.Name() + separator + s1_Array); + ASSERT_EQ(attr_s1.Data().size() == 1, false); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i8); + ASSERT_EQ(attr_i8.Name(), var.Name() + separator + i8_Array); + ASSERT_EQ(attr_i8.Data().size() == 1, false); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i16); + ASSERT_EQ(attr_i16.Name(), var.Name() + separator + i16_Array); + ASSERT_EQ(attr_i16.Data().size() == 1, false); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i32); + ASSERT_EQ(attr_i32.Name(), var.Name() + separator + i32_Array); + ASSERT_EQ(attr_i32.Data().size() == 1, false); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_i64); + ASSERT_EQ(attr_i64.Name(), var.Name() + separator + i64_Array); + ASSERT_EQ(attr_i64.Data().size() == 1, false); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u8); + ASSERT_EQ(attr_u8.Name(), var.Name() + separator + u8_Array); + ASSERT_EQ(attr_u8.Data().size() == 1, false); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u16); + ASSERT_EQ(attr_u16.Name(), var.Name() + separator + u16_Array); + ASSERT_EQ(attr_u16.Data().size() == 1, false); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u32); + ASSERT_EQ(attr_u32.Name(), var.Name() + separator + u32_Array); + ASSERT_EQ(attr_u32.Data().size() == 1, false); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_u64); + ASSERT_EQ(attr_u64.Name(), var.Name() + separator + u64_Array); + ASSERT_EQ(attr_u64.Data().size() == 1, false); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_r32); + ASSERT_EQ(attr_r32.Name(), var.Name() + separator + r32_Array); + ASSERT_EQ(attr_r32.Data().size() == 1, false); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); + + EXPECT_TRUE(attr_r64); + ASSERT_EQ(attr_r64.Name(), var.Name() + separator + r64_Array); + ASSERT_EQ(attr_r64.Data().size() == 1, false); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); + + auto I8 = attr_i8.Data(); + auto I16 = attr_i16.Data(); + auto I32 = attr_i32.Data(); + auto I64 = attr_i64.Data(); + + auto U8 = attr_u8.Data(); + auto U16 = attr_u16.Data(); + auto U32 = attr_u32.Data(); + auto U64 = attr_u64.Data(); + + const size_t Nx = 10; + for (size_t i = 0; i < Nx; ++i) + { + EXPECT_EQ(I8[i], currentTestData.I8[i]); + EXPECT_EQ(I16[i], currentTestData.I16[i]); + EXPECT_EQ(I32[i], currentTestData.I32[i]); + EXPECT_EQ(I64[i], currentTestData.I64[i]); + + EXPECT_EQ(U8[i], currentTestData.U8[i]); + EXPECT_EQ(U16[i], currentTestData.U16[i]); + EXPECT_EQ(U32[i], currentTestData.U32[i]); + EXPECT_EQ(U64[i], currentTestData.U64[i]); + } + + bpRead.Close(); + } +} + +//****************************************************************************** +// main +//****************************************************************************** + +int main(int argc, char **argv) +{ + int result; + ::testing::InitGoogleTest(&argc, argv); + + if (argc < 3) + { + throw std::runtime_error( + "Test needs 2 arguments: path-to-data engineName"); + } + + dataPath = std::string(argv[1]); + engineName = std::string(argv[2]); + + result = RUN_ALL_TESTS(); + + return result; +} diff --git a/testing/backward-compatibility/2.5.0/TestReadMultiblocks.cpp b/testing/backward-compatibility/2.5.0/TestReadMultiblocks.cpp new file mode 100644 index 0000000000..386d1a014b --- /dev/null +++ b/testing/backward-compatibility/2.5.0/TestReadMultiblocks.cpp @@ -0,0 +1,532 @@ +/* + * Distributed under the OSI-approved Apache License, Version 2.0. See + * accompanying file Copyright.txt for details. + */ +#include +#include + +#include //std::min_element, std::max_element +#include +#include + +#include + +#include + +#include "SmallTestData250.h" + +std::string dataPath; // comes from command line +std::string engineName; // comes from command line + +class ReadMultiblock : public ::testing::Test +{ +public: + ReadMultiblock() = default; + + SmallTestData250 m_TestData; +}; + +//****************************************************************************** +// 2D 4x2 test data +//****************************************************************************** + +TEST_F(ReadMultiblock, 2D4x2) +{ + /* Data: Written by 4 processes + Each process did write a 4x2 array in two blocks of 2x2 + Writer process pattern in array + (rank 0 writes two blocks non-contiguously in global array) + 0 1 2 3 + 0 1 2 3 + Blocks position in array (rank 0 wrote block 0 and 1, etc) + 0 2 4 6 + 1 3 5 7 + */ + const std::string fname(dataPath + std::string(&adios2::PathSeparator, 1) + + engineName + "Multiblock2D4x2.bp"); + // std::cout << "Open file: " << fname << std::endl; + // Number of columns per block + const std::size_t Nx = 2; + // Number of rows per block + const std::size_t Ny = 2; + + // Number of blocks comprising each array in the file + const std::size_t NBlocksX = 4; + const std::size_t NBlocksY = 2; + const std::size_t NBlocksTotal = NBlocksY * NBlocksX; + + // Number of total columns of each array in file + const std::size_t Gnx = NBlocksX * Nx; + // Number of total rows of each array in file + const std::size_t Gny = NBlocksY * Ny; + + // Number of steps + const std::size_t NSteps = 3; + + adios2::ADIOS adios; + + adios2::IO io = adios.DeclareIO("ReadIO"); + + if (!engineName.empty()) + { + io.SetEngine(engineName); + } + + adios2::Engine bpReader = io.Open(fname, adios2::Mode::Read); + + auto var_i8 = io.InquireVariable("i8"); + EXPECT_TRUE(var_i8); + EXPECT_EQ(var_i8.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_i8.Steps(), NSteps); + EXPECT_EQ(var_i8.Shape()[0], Gny); + EXPECT_EQ(var_i8.Shape()[1], Gnx); + + auto var_i16 = io.InquireVariable("i16"); + EXPECT_TRUE(var_i16); + EXPECT_EQ(var_i16.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_i16.Steps(), NSteps); + EXPECT_EQ(var_i16.Shape()[0], Gny); + EXPECT_EQ(var_i16.Shape()[1], Gnx); + + auto var_i32 = io.InquireVariable("i32"); + EXPECT_TRUE(var_i32); + EXPECT_EQ(var_i32.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_i32.Steps(), NSteps); + EXPECT_EQ(var_i32.Shape()[0], Gny); + EXPECT_EQ(var_i32.Shape()[1], Gnx); + + auto var_i64 = io.InquireVariable("i64"); + EXPECT_TRUE(var_i64); + EXPECT_EQ(var_i64.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_i64.Steps(), NSteps); + EXPECT_EQ(var_i64.Shape()[0], Gny); + EXPECT_EQ(var_i64.Shape()[1], Gnx); + + auto var_u8 = io.InquireVariable("u8"); + EXPECT_TRUE(var_u8); + EXPECT_EQ(var_u8.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_u8.Steps(), NSteps); + EXPECT_EQ(var_u8.Shape()[0], Gny); + EXPECT_EQ(var_u8.Shape()[1], Gnx); + + auto var_u16 = io.InquireVariable("u16"); + EXPECT_TRUE(var_u16); + EXPECT_EQ(var_u16.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_u16.Steps(), NSteps); + EXPECT_EQ(var_u16.Shape()[0], Gny); + EXPECT_EQ(var_u16.Shape()[1], Gnx); + + auto var_u32 = io.InquireVariable("u32"); + EXPECT_TRUE(var_u32); + EXPECT_EQ(var_u32.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_u32.Steps(), NSteps); + EXPECT_EQ(var_u32.Shape()[0], Gny); + EXPECT_EQ(var_u32.Shape()[1], Gnx); + + auto var_u64 = io.InquireVariable("u64"); + EXPECT_TRUE(var_u64); + EXPECT_EQ(var_u64.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_u64.Steps(), NSteps); + EXPECT_EQ(var_u64.Shape()[0], Gny); + EXPECT_EQ(var_u64.Shape()[1], Gnx); + + auto var_r32 = io.InquireVariable("r32"); + EXPECT_TRUE(var_r32); + EXPECT_EQ(var_r32.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_r32.Steps(), NSteps); + EXPECT_EQ(var_r32.Shape()[0], Gny); + EXPECT_EQ(var_r32.Shape()[1], Gnx); + + auto var_r64 = io.InquireVariable("r64"); + EXPECT_TRUE(var_r64); + EXPECT_EQ(var_r64.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_r64.Steps(), NSteps); + EXPECT_EQ(var_r64.Shape()[0], Gny); + EXPECT_EQ(var_r64.Shape()[1], Gnx); + + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + EXPECT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_cr32.Steps(), NSteps); + EXPECT_EQ(var_cr32.Shape()[0], Gny); + EXPECT_EQ(var_cr32.Shape()[1], Gnx); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + EXPECT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + EXPECT_EQ(var_cr64.Steps(), NSteps); + EXPECT_EQ(var_cr64.Shape()[0], Gny); + EXPECT_EQ(var_cr64.Shape()[1], Gnx); + + // create arrays to contain one block + std::array I8; + std::array I16; + std::array I32; + std::array I64; + std::array U8; + std::array U16; + std::array U32; + std::array U64; + std::array R32; + std::array R64; + std::array, Nx * Ny> CR32; + std::array, Nx * Ny> CR64; + + size_t t = 0; + + while (bpReader.BeginStep() == adios2::StepStatus::OK) + { + + std::cout << "Check step t = " << t << std::endl; + + const std::vector::Info> i8Info = + bpReader.BlocksInfo(var_i8, bpReader.CurrentStep()); + const std::vector::Info> i16Info = + bpReader.BlocksInfo(var_i16, bpReader.CurrentStep()); + const std::vector::Info> i32Info = + bpReader.BlocksInfo(var_i32, bpReader.CurrentStep()); + const std::vector::Info> i64Info = + bpReader.BlocksInfo(var_i64, bpReader.CurrentStep()); + const std::vector::Info> u8Info = + bpReader.BlocksInfo(var_u8, bpReader.CurrentStep()); + const std::vector::Info> u16Info = + bpReader.BlocksInfo(var_u16, bpReader.CurrentStep()); + const std::vector::Info> u32Info = + bpReader.BlocksInfo(var_u32, bpReader.CurrentStep()); + const std::vector::Info> u64Info = + bpReader.BlocksInfo(var_u64, bpReader.CurrentStep()); + const std::vector::Info> r32Info = + bpReader.BlocksInfo(var_r32, bpReader.CurrentStep()); + const std::vector::Info> r64Info = + bpReader.BlocksInfo(var_r64, bpReader.CurrentStep()); + + const std::vector>::Info> + cr32Info = bpReader.BlocksInfo(var_cr32, bpReader.CurrentStep()); + const std::vector>::Info> + cr64Info = bpReader.BlocksInfo(var_cr64, bpReader.CurrentStep()); + + EXPECT_EQ(i8Info.size(), NBlocksTotal); + EXPECT_EQ(i16Info.size(), NBlocksTotal); + EXPECT_EQ(i32Info.size(), NBlocksTotal); + EXPECT_EQ(i64Info.size(), NBlocksTotal); + EXPECT_EQ(u8Info.size(), NBlocksTotal); + EXPECT_EQ(u16Info.size(), NBlocksTotal); + EXPECT_EQ(u32Info.size(), NBlocksTotal); + EXPECT_EQ(u64Info.size(), NBlocksTotal); + EXPECT_EQ(r32Info.size(), NBlocksTotal); + EXPECT_EQ(r64Info.size(), NBlocksTotal); + EXPECT_EQ(cr32Info.size(), NBlocksTotal); + EXPECT_EQ(cr64Info.size(), NBlocksTotal); + + for (size_t b = 0; b < NBlocksTotal; ++b) + { + const size_t inRank = b / 2; + const size_t blockPosX = inRank; + // first or second block per process? + const size_t blockPosY = (b % 2); + + // Make a 2D selection to describe the local dimensions of the + // block we read and its offsets in the global spaces + const adios2::Box sel1( + {blockPosY * Ny, blockPosX * Nx}, {Ny, Nx}); + + std::cout << " Check block b = " << b << " start = {" + << sel1.first[0] << ", " << sel1.first[1] << "} count = {" + << sel1.second[0] << ", " << sel1.second[1] + << "} writer rank = " << inRank << " block pos = (" + << blockPosY << "," << blockPosX << ")" << std::endl; + + EXPECT_FALSE(i8Info[b].IsValue); + EXPECT_FALSE(i16Info[b].IsValue); + EXPECT_FALSE(i32Info[b].IsValue); + EXPECT_FALSE(i64Info[b].IsValue); + EXPECT_FALSE(u8Info[b].IsValue); + EXPECT_FALSE(u16Info[b].IsValue); + EXPECT_FALSE(u32Info[b].IsValue); + EXPECT_FALSE(u64Info[b].IsValue); + EXPECT_FALSE(r32Info[b].IsValue); + EXPECT_FALSE(r64Info[b].IsValue); + EXPECT_FALSE(cr32Info[b].IsValue); + EXPECT_FALSE(cr64Info[b].IsValue); + + // Generate data for one original writer's two blocks at once + SmallTestData250 currentTestData = + generateNewSmallTestData(m_TestData, static_cast(t), + static_cast(inRank), Nx * Ny); + + EXPECT_EQ(i8Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(i8Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(i8Info[b].Count[0], Ny); + EXPECT_EQ(i8Info[b].Count[1], Nx); + EXPECT_EQ(i8Info[b].WriterID, inRank); + + EXPECT_EQ(i16Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(i16Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(i16Info[b].Count[0], Ny); + EXPECT_EQ(i16Info[b].Count[1], Nx); + EXPECT_EQ(i16Info[b].WriterID, inRank); + + EXPECT_EQ(i32Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(i32Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(i32Info[b].Count[0], Ny); + EXPECT_EQ(i32Info[b].Count[1], Nx); + EXPECT_EQ(i32Info[b].WriterID, inRank); + + EXPECT_EQ(i64Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(i64Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(i64Info[b].Count[0], Ny); + EXPECT_EQ(i64Info[b].Count[1], Nx); + EXPECT_EQ(i64Info[b].WriterID, inRank); + + EXPECT_EQ(u8Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(u8Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(u8Info[b].Count[0], Ny); + EXPECT_EQ(u8Info[b].Count[1], Nx); + EXPECT_EQ(u8Info[b].WriterID, inRank); + + EXPECT_EQ(u16Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(u16Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(u16Info[b].Count[0], Ny); + EXPECT_EQ(u16Info[b].Count[1], Nx); + EXPECT_EQ(u16Info[b].WriterID, inRank); + + EXPECT_EQ(u32Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(u32Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(u32Info[b].Count[0], Ny); + EXPECT_EQ(u32Info[b].Count[1], Nx); + EXPECT_EQ(u32Info[b].WriterID, inRank); + + EXPECT_EQ(u64Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(u64Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(u64Info[b].Count[0], Ny); + EXPECT_EQ(u64Info[b].Count[1], Nx); + EXPECT_EQ(u64Info[b].WriterID, inRank); + + EXPECT_EQ(r32Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(r32Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(r32Info[b].Count[0], Ny); + EXPECT_EQ(r32Info[b].Count[1], Nx); + EXPECT_EQ(r32Info[b].WriterID, inRank); + + EXPECT_EQ(r64Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(r64Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(r64Info[b].Count[0], Ny); + EXPECT_EQ(r64Info[b].Count[1], Nx); + EXPECT_EQ(r64Info[b].WriterID, inRank); + + EXPECT_EQ(cr32Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(cr32Info[b].Start[1], blockPosX * Nx); + EXPECT_EQ(cr32Info[b].Count[0], Ny); + EXPECT_EQ(cr32Info[b].Count[1], Nx); + EXPECT_EQ(cr32Info[b].WriterID, inRank); + + EXPECT_EQ(cr64Info[b].Start[0], blockPosY * Ny); + EXPECT_EQ(cr64Info[b].Start[1], inRank * Nx); + EXPECT_EQ(cr64Info[b].Count[0], Ny); + EXPECT_EQ(cr64Info[b].Count[1], Nx); + EXPECT_EQ(cr64Info[b].WriterID, inRank); + + const size_t posFrom = blockPosY * Ny * Nx; + const size_t posTo = posFrom + Ny * Nx; + + int8_t i8Min, i8Max; + int16_t i16Min, i16Max; + int32_t i32Min, i32Max; + int64_t i64Min, i64Max; + uint8_t u8Min, u8Max; + uint16_t u16Min, u16Max; + uint32_t u32Min, u32Max; + uint64_t u64Min, u64Max; + float r32Min, r32Max; + double r64Min, r64Max; + std::complex cr32Min, cr32Max; + std::complex cr64Min, cr64Max; + + i8Min = *std::min_element(currentTestData.I8.begin() + posFrom, + currentTestData.I8.begin() + posTo); + i8Max = *std::max_element(currentTestData.I8.begin() + posFrom, + currentTestData.I8.begin() + posTo); + i16Min = *std::min_element(currentTestData.I16.begin() + posFrom, + currentTestData.I16.begin() + posTo); + i16Max = *std::max_element(currentTestData.I16.begin() + posFrom, + currentTestData.I16.begin() + posTo); + i32Min = *std::min_element(currentTestData.I32.begin() + posFrom, + currentTestData.I32.begin() + posTo); + i32Max = *std::max_element(currentTestData.I32.begin() + posFrom, + currentTestData.I32.begin() + posTo); + i64Min = *std::min_element(currentTestData.I64.begin() + posFrom, + currentTestData.I64.begin() + posTo); + i64Max = *std::max_element(currentTestData.I64.begin() + posFrom, + currentTestData.I64.begin() + posTo); + u8Min = *std::min_element(currentTestData.U8.begin() + posFrom, + currentTestData.U8.begin() + posTo); + u8Max = *std::max_element(currentTestData.U8.begin() + posFrom, + currentTestData.U8.begin() + posTo); + u16Min = *std::min_element(currentTestData.U16.begin() + posFrom, + currentTestData.U16.begin() + posTo); + u16Max = *std::max_element(currentTestData.U16.begin() + posFrom, + currentTestData.U16.begin() + posTo); + u32Min = *std::min_element(currentTestData.U32.begin() + posFrom, + currentTestData.U32.begin() + posTo); + u32Max = *std::max_element(currentTestData.U32.begin() + posFrom, + currentTestData.U32.begin() + posTo); + u64Min = *std::min_element(currentTestData.U64.begin() + posFrom, + currentTestData.U64.begin() + posTo); + u64Max = *std::max_element(currentTestData.U64.begin() + posFrom, + currentTestData.U64.begin() + posTo); + r32Min = *std::min_element(currentTestData.R32.begin() + posFrom, + currentTestData.R32.begin() + posTo); + r32Max = *std::max_element(currentTestData.R32.begin() + posFrom, + currentTestData.R32.begin() + posTo); + r64Min = *std::min_element(currentTestData.R64.begin() + posFrom, + currentTestData.R64.begin() + posTo); + r64Max = *std::max_element(currentTestData.R64.begin() + posFrom, + currentTestData.R64.begin() + posTo); + + cr32Min = currentTestData.CR32[posFrom]; + cr32Max = currentTestData.CR32[posFrom]; + for (auto it = currentTestData.CR32.begin() + posFrom; + it != currentTestData.CR32.begin() + posTo; ++it) + { + if (std::norm(*it) < std::norm(cr32Min)) + { + cr32Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr32Max)) + { + cr32Max = *it; + } + } + + cr64Min = currentTestData.CR64[posFrom]; + cr64Max = currentTestData.CR64[posFrom]; + for (auto it = currentTestData.CR64.begin() + posFrom; + it != currentTestData.CR64.begin() + posTo; ++it) + { + if (std::norm(*it) < std::norm(cr64Min)) + { + cr64Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr64Max)) + { + cr64Max = *it; + } + } + + EXPECT_EQ(i8Info[b].Min, i8Min); + EXPECT_EQ(i8Info[b].Max, i8Max); + EXPECT_EQ(i16Info[b].Min, i16Min); + EXPECT_EQ(i16Info[b].Max, i16Max); + EXPECT_EQ(i32Info[b].Min, i32Min); + EXPECT_EQ(i32Info[b].Max, i32Max); + EXPECT_EQ(i64Info[b].Min, i64Min); + EXPECT_EQ(i64Info[b].Max, i64Max); + + EXPECT_EQ(u8Info[b].Min, u8Min); + EXPECT_EQ(u8Info[b].Max, u8Max); + EXPECT_EQ(u16Info[b].Min, u16Min); + EXPECT_EQ(u16Info[b].Max, u16Max); + EXPECT_EQ(u32Info[b].Min, u32Min); + EXPECT_EQ(u32Info[b].Max, u32Max); + EXPECT_EQ(u64Info[b].Min, u64Min); + EXPECT_EQ(u64Info[b].Max, u64Max); + + EXPECT_EQ(r32Info[b].Min, r32Min); + EXPECT_EQ(r32Info[b].Max, r32Max); + EXPECT_EQ(r64Info[b].Min, r64Min); + EXPECT_EQ(r64Info[b].Max, r64Max); + + EXPECT_EQ(cr32Info[b].Min, cr32Min); + EXPECT_EQ(cr32Info[b].Max, cr32Max); + EXPECT_EQ(cr64Info[b].Min, cr64Min); + EXPECT_EQ(cr64Info[b].Max, cr64Max); + + var_i8.SetSelection(sel1); + bpReader.Get(var_i8, I8.data()); + + var_i16.SetSelection(sel1); + bpReader.Get(var_i16, I16.data()); + + var_i32.SetSelection(sel1); + bpReader.Get(var_i32, I32.data()); + + var_i64.SetSelection(sel1); + bpReader.Get(var_i64, I64.data()); + + var_u8.SetSelection(sel1); + bpReader.Get(var_u8, U8.data()); + + var_u16.SetSelection(sel1); + bpReader.Get(var_u16, U16.data()); + + var_u32.SetSelection(sel1); + bpReader.Get(var_u32, U32.data()); + + var_u64.SetSelection(sel1); + bpReader.Get(var_u64, U64.data()); + + var_r32.SetSelection(sel1); + bpReader.Get(var_r32, R32.data()); + + var_r64.SetSelection(sel1); + bpReader.Get(var_r64, R64.data()); + + var_cr32.SetSelection(sel1); + bpReader.Get(var_cr32, CR32.data()); + + var_cr64.SetSelection(sel1); + bpReader.Get(var_cr64, CR64.data()); + + bpReader.PerformGets(); + + for (size_t i = 0; i < Nx * Ny; ++i) + { + std::stringstream ss; + ss << "t=" << t << " i=" << i << " block=" << b; + std::string msg = ss.str(); + + EXPECT_EQ(I8[i], currentTestData.I8[i + posFrom]) << msg; + EXPECT_EQ(I16[i], currentTestData.I16[i + posFrom]) << msg; + EXPECT_EQ(I32[i], currentTestData.I32[i + posFrom]) << msg; + EXPECT_EQ(I64[i], currentTestData.I64[i + posFrom]) << msg; + EXPECT_EQ(U8[i], currentTestData.U8[i + posFrom]) << msg; + EXPECT_EQ(U16[i], currentTestData.U16[i + posFrom]) << msg; + EXPECT_EQ(U32[i], currentTestData.U32[i + posFrom]) << msg; + EXPECT_EQ(U64[i], currentTestData.U64[i + posFrom]) << msg; + EXPECT_EQ(R32[i], currentTestData.R32[i + posFrom]) << msg; + EXPECT_EQ(R64[i], currentTestData.R64[i + posFrom]) << msg; + EXPECT_EQ(CR32[i], currentTestData.CR32[i + posFrom]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i + posFrom]) << msg; + } + } + + bpReader.EndStep(); + ++t; + } + EXPECT_EQ(t, NSteps); + bpReader.Close(); +} + +//****************************************************************************** +// main +//****************************************************************************** + +int main(int argc, char **argv) +{ + int result; + ::testing::InitGoogleTest(&argc, argv); + + if (argc < 3) + { + throw std::runtime_error( + "Test needs 2 arguments: path-to-data engineName"); + } + + dataPath = std::string(argv[1]); + engineName = std::string(argv[2]); + result = RUN_ALL_TESTS(); + + return result; +} diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp b/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp new file mode 100644 index 0000000000..6af594a1b8 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp.dir/BP3AttributesArrayTypes.bp.0 b/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp.dir/BP3AttributesArrayTypes.bp.0 new file mode 100644 index 0000000000..62585f745f Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp.dir/BP3AttributesArrayTypes.bp.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp.dir/profiling.json b/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp.dir/profiling.json new file mode 100644 index 0000000000..a2e0f5db95 --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP3AttributesArrayTypes.bp.dir/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:33:59_2020", "threads": 1, "bytes": 2433, "aggregation_mus": 0, "meta_sort_merge_mus": 105, "mkdir_mus": 23, "minmax_mus": 0, "buffering_mus": 328, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 14, "write_mus": 7 },"transport_1": { "type": "File_POSIX", "close_mus": 1, "open_mus": 10, "write_mus": 5 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp new file mode 100644 index 0000000000..7662577f9d Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp.dir/BP3AttributesOfVariableArrayTypes.bp.0 b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp.dir/BP3AttributesOfVariableArrayTypes.bp.0 new file mode 100644 index 0000000000..a297afd659 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp.dir/BP3AttributesOfVariableArrayTypes.bp.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp.dir/profiling.json b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp.dir/profiling.json new file mode 100644 index 0000000000..b22cbb7c26 --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableArrayTypes.bp.dir/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:33:59_2020", "threads": 1, "bytes": 2681, "aggregation_mus": 0, "meta_sort_merge_mus": 110, "mkdir_mus": 21, "minmax_mus": 0, "buffering_mus": 337, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 16, "write_mus": 7 },"transport_1": { "type": "File_POSIX", "close_mus": 1, "open_mus": 10, "write_mus": 5 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp new file mode 100644 index 0000000000..09cd0b72bf Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp.dir/BP3AttributesOfVariableSingleTypes.bp.0 b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp.dir/BP3AttributesOfVariableSingleTypes.bp.0 new file mode 100644 index 0000000000..b2d5729076 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp.dir/BP3AttributesOfVariableSingleTypes.bp.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp.dir/profiling.json b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp.dir/profiling.json new file mode 100644 index 0000000000..6d3de3dc6f --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP3AttributesOfVariableSingleTypes.bp.dir/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:33:59_2020", "threads": 1, "bytes": 1958, "aggregation_mus": 0, "meta_sort_merge_mus": 110, "mkdir_mus": 22, "minmax_mus": 0, "buffering_mus": 357, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 13, "write_mus": 7 },"transport_1": { "type": "File_POSIX", "close_mus": 1, "open_mus": 10, "write_mus": 5 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp b/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp new file mode 100644 index 0000000000..67fd9a48c0 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp.dir/BP3AttributesSingleTypes.bp.0 b/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp.dir/BP3AttributesSingleTypes.bp.0 new file mode 100644 index 0000000000..2641d4c683 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp.dir/BP3AttributesSingleTypes.bp.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp.dir/profiling.json b/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp.dir/profiling.json new file mode 100644 index 0000000000..f18a05f6ec --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP3AttributesSingleTypes.bp.dir/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:33:59_2020", "threads": 1, "bytes": 1846, "aggregation_mus": 0, "meta_sort_merge_mus": 383, "mkdir_mus": 52, "minmax_mus": 0, "buffering_mus": 1164, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 3, "open_mus": 24, "write_mus": 14 },"transport_1": { "type": "File_POSIX", "close_mus": 2, "open_mus": 18, "write_mus": 8 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp new file mode 100644 index 0000000000..c57bd08be8 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.0 b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.0 new file mode 100644 index 0000000000..1c209974db Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.1 b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.1 new file mode 100644 index 0000000000..87de8a1a5e Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.1 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.2 b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.2 new file mode 100644 index 0000000000..ac6488e8b6 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.2 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.3 b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.3 new file mode 100644 index 0000000000..11c7f970c9 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/BP3Multiblock2D4x2.bp.3 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/profiling.json b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/profiling.json new file mode 100644 index 0000000000..66ed30bcca --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP3Multiblock2D4x2.bp.dir/profiling.json @@ -0,0 +1,6 @@ +[ +{ "rank": 0, "start": "Thu_May_14_10:37:58_2020", "threads": 1, "bytes": 19965, "aggregation_mus": 0, "meta_sort_merge_mus": 9316, "mkdir_mus": 65, "minmax_mus": 73, "buffering_mus": 10954, "memcpy_mus": 14, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 14, "write_mus": 33 },"transport_1": { "type": "File_POSIX", "close_mus": 17, "open_mus": 17, "write_mus": 13 } }, +{ "rank": 1, "start": "Thu_May_14_10:37:58_2020", "threads": 1, "bytes": 19965, "aggregation_mus": 0, "meta_sort_merge_mus": 4794, "mkdir_mus": 66, "minmax_mus": 78, "buffering_mus": 6607, "memcpy_mus": 23, "transport_0": { "type": "File_POSIX", "close_mus": 3, "open_mus": 14, "write_mus": 41 } }, +{ "rank": 2, "start": "Thu_May_14_10:37:58_2020", "threads": 1, "bytes": 19965, "aggregation_mus": 0, "meta_sort_merge_mus": 11421, "mkdir_mus": 65, "minmax_mus": 79, "buffering_mus": 13179, "memcpy_mus": 11, "transport_0": { "type": "File_POSIX", "close_mus": 3, "open_mus": 14, "write_mus": 42 } }, +{ "rank": 3, "start": "Thu_May_14_10:37:58_2020", "threads": 1, "bytes": 19965, "aggregation_mus": 0, "meta_sort_merge_mus": 11954, "mkdir_mus": 66, "minmax_mus": 77, "buffering_mus": 13643, "memcpy_mus": 12, "transport_0": { "type": "File_POSIX", "close_mus": 2, "open_mus": 21, "write_mus": 45 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/data.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/data.0 new file mode 100644 index 0000000000..2f43251c4a Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/data.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/md.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/md.0 new file mode 100644 index 0000000000..e08835e0bc Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/md.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/md.idx b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/md.idx new file mode 100644 index 0000000000..646a964a9f Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/md.idx differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/profiling.json b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/profiling.json new file mode 100644 index 0000000000..f8bd58d73a --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP4AttributesArrayTypes.bp/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:05:44_2020", "threads": 1, "bytes": 980, "aggregation_mus": 0, "meta_sort_merge_mus": 104, "mkdir_mus": 181, "minmax_mus": 0, "buffering_mus": 324, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 13, "write_mus": 7 },"transport_1": { "type": "File_POSIX", "close_mus": 0, "open_mus": 10, "write_mus": 6 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/data.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/data.0 new file mode 100644 index 0000000000..035e690dcc Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/data.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/md.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/md.0 new file mode 100644 index 0000000000..29763852f4 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/md.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/md.idx b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/md.idx new file mode 100644 index 0000000000..04f50af03b Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/md.idx differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/profiling.json b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/profiling.json new file mode 100644 index 0000000000..092a51ac30 --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableArrayTypes.bp/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:05:44_2020", "threads": 1, "bytes": 1090, "aggregation_mus": 0, "meta_sort_merge_mus": 113, "mkdir_mus": 483, "minmax_mus": 0, "buffering_mus": 295, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 12, "write_mus": 6 },"transport_1": { "type": "File_POSIX", "close_mus": 0, "open_mus": 10, "write_mus": 5 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/data.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/data.0 new file mode 100644 index 0000000000..0715ca2c22 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/data.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/md.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/md.0 new file mode 100644 index 0000000000..ed84c704f4 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/md.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/md.idx b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/md.idx new file mode 100644 index 0000000000..ee6f3ad250 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/md.idx differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/profiling.json b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/profiling.json new file mode 100644 index 0000000000..b422d0e01e --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP4AttributesOfVariableSingleTypes.bp/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:05:44_2020", "threads": 1, "bytes": 723, "aggregation_mus": 0, "meta_sort_merge_mus": 133, "mkdir_mus": 350, "minmax_mus": 0, "buffering_mus": 376, "memcpy_mus": 1, "transport_0": { "type": "File_POSIX", "close_mus": 1, "open_mus": 20, "write_mus": 8 },"transport_1": { "type": "File_POSIX", "close_mus": 0, "open_mus": 15, "write_mus": 6 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/data.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/data.0 new file mode 100644 index 0000000000..911d14f874 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/data.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/md.0 b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/md.0 new file mode 100644 index 0000000000..2392f7a81a Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/md.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/md.idx b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/md.idx new file mode 100644 index 0000000000..21d3cd9393 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/md.idx differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/profiling.json b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/profiling.json new file mode 100644 index 0000000000..71534f7c7f --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP4AttributesSingleTypes.bp/profiling.json @@ -0,0 +1,3 @@ +[ +{ "rank": 0, "start": "Thu_May_14_07:05:44_2020", "threads": 1, "bytes": 657, "aggregation_mus": 0, "meta_sort_merge_mus": 558, "mkdir_mus": 441, "minmax_mus": 0, "buffering_mus": 982, "memcpy_mus": 0, "transport_0": { "type": "File_POSIX", "close_mus": 2, "open_mus": 16, "write_mus": 7 },"transport_1": { "type": "File_POSIX", "close_mus": 0, "open_mus": 20, "write_mus": 6 } } +] diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.0 b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.0 new file mode 100644 index 0000000000..6abad2c617 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.1 b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.1 new file mode 100644 index 0000000000..1aa3bd81ac Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.1 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.2 b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.2 new file mode 100644 index 0000000000..38d64e9669 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.2 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.3 b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.3 new file mode 100644 index 0000000000..1fb6b8e620 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/data.3 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/md.0 b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/md.0 new file mode 100644 index 0000000000..5300915e78 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/md.0 differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/md.idx b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/md.idx new file mode 100644 index 0000000000..2e196415f1 Binary files /dev/null and b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/md.idx differ diff --git a/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/profiling.json b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/profiling.json new file mode 100644 index 0000000000..ba0e8ac560 --- /dev/null +++ b/testing/backward-compatibility/2.5.0/data/BP4Multiblock2D4x2.bp/profiling.json @@ -0,0 +1,6 @@ +[ +{ "rank": 0, "start": "Thu_May_14_10:37:44_2020", "threads": 1, "bytes": 9475, "aggregation_mus": 0, "meta_sort_merge_mus": 1719, "mkdir_mus": 70, "minmax_mus": 588, "buffering_mus": 4107, "memcpy_mus": 12, "transport_0": { "type": "File_POSIX", "close_mus": 2, "open_mus": 12, "write_mus": 30 },"transport_1": { "type": "File_POSIX", "close_mus": 0, "open_mus": 19, "write_mus": 42 } }, +{ "rank": 1, "start": "Thu_May_14_10:37:44_2020", "threads": 1, "bytes": 9475, "aggregation_mus": 0, "meta_sort_merge_mus": 1924, "mkdir_mus": 71, "minmax_mus": 498, "buffering_mus": 4144, "memcpy_mus": 12, "transport_0": { "type": "File_POSIX", "close_mus": 3, "open_mus": 18, "write_mus": 32 } }, +{ "rank": 2, "start": "Thu_May_14_10:37:44_2020", "threads": 1, "bytes": 9475, "aggregation_mus": 0, "meta_sort_merge_mus": 1419, "mkdir_mus": 70, "minmax_mus": 519, "buffering_mus": 3681, "memcpy_mus": 12, "transport_0": { "type": "File_POSIX", "close_mus": 2, "open_mus": 14, "write_mus": 29 } }, +{ "rank": 3, "start": "Thu_May_14_10:37:44_2020", "threads": 1, "bytes": 9475, "aggregation_mus": 0, "meta_sort_merge_mus": 2432, "mkdir_mus": 72, "minmax_mus": 455, "buffering_mus": 4355, "memcpy_mus": 12, "transport_0": { "type": "File_POSIX", "close_mus": 3, "open_mus": 10, "write_mus": 26 } } +] diff --git a/testing/backward-compatibility/CMakeLists.txt b/testing/backward-compatibility/CMakeLists.txt new file mode 100644 index 0000000000..8af7ab4619 --- /dev/null +++ b/testing/backward-compatibility/CMakeLists.txt @@ -0,0 +1,6 @@ +#------------------------------------------------------------------------------# +# Distributed under the OSI-approved Apache License, Version 2.0. See +# accompanying file Copyright.txt for details. +#------------------------------------------------------------------------------# + +add_subdirectory(2.5.0)