From 4b9aa23e40b6499deaa022a76484dd651f797caf Mon Sep 17 00:00:00 2001 From: williamfgc Date: Wed, 8 Aug 2018 16:18:46 -0400 Subject: [PATCH 1/4] Need to add tests for complex types --- source/adios2/toolkit/format/bp3/BP3Base.tcc | 9 ++---- .../toolkit/format/bp3/BP3Serializer.cpp | 31 ++++++++++++++++++- testing/adios2/engine/SmallTestData.h | 13 ++++++++ 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/source/adios2/toolkit/format/bp3/BP3Base.tcc b/source/adios2/toolkit/format/bp3/BP3Base.tcc index 3abcc2d831..f339dce9b0 100644 --- a/source/adios2/toolkit/format/bp3/BP3Base.tcc +++ b/source/adios2/toolkit/format/bp3/BP3Base.tcc @@ -342,8 +342,7 @@ BP3Base::ParseCharacteristics(const std::vector &buffer, size_t &position, if (characteristics.Count.empty() || characteristics.Count[0] == 1) { characteristics.Statistics.Value = - helper::ReadValue::ValueType>( - buffer, position); + helper::ReadValue(buffer, position); characteristics.Statistics.IsValue = true; } else // used for attributes @@ -360,16 +359,14 @@ BP3Base::ParseCharacteristics(const std::vector &buffer, size_t &position, case (characteristic_min): { characteristics.Statistics.Min = - helper::ReadValue::ValueType>(buffer, - position); + helper::ReadValue(buffer, position); break; } case (characteristic_max): { characteristics.Statistics.Max = - helper::ReadValue::ValueType>(buffer, - position); + helper::ReadValue(buffer, position); break; } diff --git a/source/adios2/toolkit/format/bp3/BP3Serializer.cpp b/source/adios2/toolkit/format/bp3/BP3Serializer.cpp index d240daf29e..de554bbcc1 100644 --- a/source/adios2/toolkit/format/bp3/BP3Serializer.cpp +++ b/source/adios2/toolkit/format/bp3/BP3Serializer.cpp @@ -1221,8 +1221,37 @@ void BP3Serializer::MergeSerializeIndices( break; } + case (type_complex): + { + auto characteristics = ReadElementIndexCharacteristics( + buffer, position, type_complex, true); + count = characteristics.EntryCount; + length = characteristics.EntryLength; + timeStep = characteristics.Statistics.Step; + break; + } + + case (type_double_complex): + { + auto characteristics = ReadElementIndexCharacteristics( + buffer, position, type_double_complex, true); + count = characteristics.EntryCount; + length = characteristics.EntryLength; + timeStep = characteristics.Statistics.Step; + break; + } + + case (type_long_double_complex): + { + auto characteristics = ReadElementIndexCharacteristics( + buffer, position, type_long_double_complex, true); + count = characteristics.EntryCount; + length = characteristics.EntryLength; + timeStep = characteristics.Statistics.Step; + break; + } + default: - // TODO: complex, long double throw std::invalid_argument( "ERROR: type " + std::to_string(dataType) + " not supported in BP3 Metadata Merge\n"); diff --git a/testing/adios2/engine/SmallTestData.h b/testing/adios2/engine/SmallTestData.h index 239c6bf1d9..b0823871cb 100644 --- a/testing/adios2/engine/SmallTestData.h +++ b/testing/adios2/engine/SmallTestData.h @@ -46,6 +46,19 @@ struct SmallTestData {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, 10> CR32 = { + {(0.1f, 1.1f), (1.1f, 2.1f), (2.1f, 3.1f), (3.1f, 4.1f), (4.1f, 5.1f), + (5.1f, 6.1f), (6.1f, 7.1f), (7.1f, 8.1f), (8.1f, 9.1f), + (9.1f, 10.1f)}}; + std::array, 10> CR64 = { + {(10.2, 11.2), (11.2, 12.2), (12.2, 13.2), (13.2, 14.2), (14.2, 15.2), + (15.2, 16.2), (16.2, 17.2), (17.2, 18.2), (18.2, 19.2), (19.2, 20.2)}}; + + std::array, 10> CRLD = { + {(10.2L, 11.2L), (11.2L, 12.2L), (12.2L, 13.2L), (13.2L, 14.2L), + (14.2L, 15.2L), (15.2L, 16.2L), (16.2L, 17.2L), (17.2L, 18.2L), + (18.2L, 19.2L), (19.2L, 20.2L)}}; }; SmallTestData generateNewSmallTestData(SmallTestData in, int step, int rank, From ec6a3f5c6482ad0e5149605670f06f09b83c7bab Mon Sep 17 00:00:00 2001 From: williamfgc Date: Mon, 13 Aug 2018 12:54:57 -0400 Subject: [PATCH 2/4] Adding tests Need to figure out std::complex support --- testing/adios2/engine/SmallTestData.h | 56 ++++++++++++++++--- .../engine/bp/TestBPWriteReadADIOS2.cpp | 55 +++++++++++++++++- 2 files changed, 102 insertions(+), 9 deletions(-) diff --git a/testing/adios2/engine/SmallTestData.h b/testing/adios2/engine/SmallTestData.h index b0823871cb..c14c9b1443 100644 --- a/testing/adios2/engine/SmallTestData.h +++ b/testing/adios2/engine/SmallTestData.h @@ -48,17 +48,30 @@ struct SmallTestData {10.2, 11.2, 12.2, 13.2, 14.2, 15.2, 16.2, 17.2, 18.2, 19.2}}; std::array, 10> CR32 = { - {(0.1f, 1.1f), (1.1f, 2.1f), (2.1f, 3.1f), (3.1f, 4.1f), (4.1f, 5.1f), - (5.1f, 6.1f), (6.1f, 7.1f), (7.1f, 8.1f), (8.1f, 9.1f), - (9.1f, 10.1f)}}; + {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 = { - {(10.2, 11.2), (11.2, 12.2), (12.2, 13.2), (13.2, 14.2), (14.2, 15.2), - (15.2, 16.2), (16.2, 17.2), (17.2, 18.2), (18.2, 19.2), (19.2, 20.2)}}; + {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)}}; std::array, 10> CRLD = { - {(10.2L, 11.2L), (11.2L, 12.2L), (12.2L, 13.2L), (13.2L, 14.2L), - (14.2L, 15.2L), (15.2L, 16.2L), (16.2L, 17.2L), (17.2L, 18.2L), - (18.2L, 19.2L), (19.2L, 20.2L)}}; + {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)}}; }; SmallTestData generateNewSmallTestData(SmallTestData in, int step, int rank, @@ -76,6 +89,19 @@ SmallTestData generateNewSmallTestData(SmallTestData in, int step, int rank, 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.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)); + }); + std::for_each(in.CRLD.begin(), in.CRLD.end(), + [&](std::complex &v) { + v.real(v.real() + static_cast(j)); + v.imag(v.imag() + static_cast(j)); + }); return in; } @@ -92,6 +118,20 @@ void UpdateSmallTestData(SmallTestData &in, int step, int rank, int size) 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.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)); + }); + std::for_each(in.CRLD.begin(), in.CRLD.end(), + [&](std::complex &v) { + v.real(v.real() + static_cast(j)); + v.imag(v.imag() + static_cast(j)); + }); } #endif // TESTING_ADIOS2_ENGINE_SMALLTESTDATA_H_ diff --git a/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp b/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp index 39633a7c05..0166ddf1b9 100644 --- a/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp +++ b/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp @@ -81,6 +81,12 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -114,6 +120,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); // Make a 1D selection to describe the local dimensions of the // variable we write and its offsets in the global spaces @@ -130,6 +140,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) var_u64.SetSelection(sel); var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); // Write each one // fill in the variable with values from starting index to @@ -147,6 +160,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) bpWriter.Put(var_u64, currentTestData.U64.data()); bpWriter.Put(var_r32, currentTestData.R32.data()); bpWriter.Put(var_r64, currentTestData.R64.data()); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); bpWriter.PerformPuts(); bpWriter.EndStep(); @@ -226,7 +242,25 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) ASSERT_EQ(var_r64.Steps(), NSteps); ASSERT_EQ(var_r64.Shape()[0], mpiSize * Nx); - // TODO: other types + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], mpiSize * Nx); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], mpiSize * Nx); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], mpiSize * Nx); + + // TODO: string arrays SmallTestData testData; @@ -241,6 +275,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) std::array U64; std::array R32; std::array R64; + std::array, Nx> CR32; + std::array, Nx> CR64; + std::array, Nx> CRLD; const adios2::Dims start{mpiRank * Nx}; const adios2::Dims count{Nx}; @@ -260,6 +297,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); + for (size_t t = 0; t < NSteps; ++t) { var_i8.SetStepSelection({t, 1}); @@ -275,6 +316,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) var_r32.SetStepSelection({t, 1}); var_r64.SetStepSelection({t, 1}); + var_cr32.SetStepSelection({t, 1}); + var_cr64.SetStepSelection({t, 1}); + var_crld.SetStepSelection({t, 1}); + // Generate test data for each rank uniquely SmallTestData currentTestData = generateNewSmallTestData( m_TestData, static_cast(t), mpiRank, mpiSize); @@ -294,6 +339,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) bpReader.Get(var_r32, R32.data()); bpReader.Get(var_r64, R64.data()); + bpReader.Get(var_cr32, CR32.data()); + bpReader.Get(var_cr64, CR64.data()); + bpReader.Get(var_crld, CRLD.data()); + bpReader.PerformGets(); EXPECT_EQ(IString, currentTestData.S1); @@ -314,6 +363,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead1D8) EXPECT_EQ(U64[i], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[i], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[i], currentTestData.R64[i]) << msg; + + EXPECT_EQ(CR32[i], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[i], currentTestData.CRLD[i]) << msg; } } bpReader.Close(); From 9fd8f797d4f2aaa3dd7d2cc3e53f959a68fa0a8c Mon Sep 17 00:00:00 2001 From: williamfgc Date: Tue, 14 Aug 2018 15:46:03 -0400 Subject: [PATCH 3/4] Added support to complex types C++11 only tests --- source/adios2/helper/adiosMath.inl | 2 + source/utils/bpls2/bpls2.cpp | 10 + source/utils/bpls2/bpls2.h | 3 +- .../engine/bp/TestBPWriteReadADIOS2.cpp | 164 ++++++ .../engine/bp/TestBPWriteReadMultiblock.cpp | 488 ++++++++++++++++++ 5 files changed, 666 insertions(+), 1 deletion(-) diff --git a/source/adios2/helper/adiosMath.inl b/source/adios2/helper/adiosMath.inl index b71194fa95..a07576d98c 100644 --- a/source/adios2/helper/adiosMath.inl +++ b/source/adios2/helper/adiosMath.inl @@ -36,6 +36,8 @@ template void GetMinMaxComplex(const std::complex *values, const size_t size, std::complex &min, std::complex &max) noexcept { + min = values[0]; + max = values[0]; T minNorm = std::norm(values[0]); T maxNorm = minNorm; diff --git a/source/utils/bpls2/bpls2.cpp b/source/utils/bpls2/bpls2.cpp index 0b40ae752a..a985182c5b 100644 --- a/source/utils/bpls2/bpls2.cpp +++ b/source/utils/bpls2/bpls2.cpp @@ -1335,6 +1335,10 @@ int getTypeInfo(enum ADIOS_DATATYPES adiosvartype, int *elemsize) *elemsize = 16; break; + case adios_long_double_complex: + *elemsize = 32; + break; + case adios_long_double: // do not know how to print //*elemsize = 16; default: @@ -1971,6 +1975,7 @@ const std::map adios_types_map = { {"double", adios_double}, {"float complex", adios_complex}, {"double complex", adios_double_complex}, + {"long double complex", adios_long_double_complex}, {"signed char", adios_byte}, {"short", adios_short}, {"long int", adios_long}, @@ -2330,6 +2335,11 @@ int print_data(const void *data, int item, enum ADIOS_DATATYPES adiosvartype, ((double *)data)[2 * item + 1]); break; + case adios_long_double_complex: + fprintf(outf, (f ? fmt : "(%Lg,i%Lg)"), ((long double *)data)[2 * item], + ((long double *)data)[2 * item + 1]); + break; + default: break; } // end switch diff --git a/source/utils/bpls2/bpls2.h b/source/utils/bpls2/bpls2.h index 94b3ed596e..3ec56492ab 100644 --- a/source/utils/bpls2/bpls2.h +++ b/source/utils/bpls2/bpls2.h @@ -54,7 +54,8 @@ enum ADIOS_DATATYPES adios_string = 9, adios_complex = 10, adios_double_complex = 11, - adios_string_array = 12 + adios_string_array = 12, + adios_long_double_complex = 13 }; struct Entry diff --git a/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp b/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp index 0166ddf1b9..8022ceb616 100644 --- a/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp +++ b/testing/adios2/engine/bp/TestBPWriteReadADIOS2.cpp @@ -435,6 +435,12 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -461,6 +467,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); // Make a 2D selection to describe the local dimensions of the // variable we write and its offsets in the global spaces @@ -476,6 +486,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) var_u64.SetSelection(sel); var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); // Write each one // fill in the variable with values from starting index to @@ -492,6 +505,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) bpWriter.Put(var_u64, currentTestData.U64.data()); bpWriter.Put(var_r32, currentTestData.R32.data()); bpWriter.Put(var_r64, currentTestData.R64.data()); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); bpWriter.PerformPuts(); bpWriter.EndStep(); @@ -581,6 +597,27 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) ASSERT_EQ(var_r64.Shape()[0], Ny); ASSERT_EQ(var_r64.Shape()[1], static_cast(mpiSize * Nx)); + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], Ny); + ASSERT_EQ(var_cr32.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], Ny); + ASSERT_EQ(var_cr64.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], Ny); + ASSERT_EQ(var_crld.Shape()[1], static_cast(mpiSize * Nx)); + std::string IString; std::array I8; std::array I16; @@ -592,6 +629,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) std::array U64; std::array R32; std::array R64; + std::array, Nx * Ny> CR32; + std::array, Nx * Ny> CR64; + std::array, Nx * Ny> CRLD; const adios2::Dims start{0, static_cast(mpiRank * Nx)}; const adios2::Dims count{Ny, Nx}; @@ -610,6 +650,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); for (size_t t = 0; t < NSteps; ++t) { @@ -626,6 +669,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) var_r32.SetStepSelection({t, 1}); var_r64.SetStepSelection({t, 1}); + var_cr32.SetStepSelection({t, 1}); + var_cr64.SetStepSelection({t, 1}); + var_crld.SetStepSelection({t, 1}); + bpReader.Get(var_iString, IString); bpReader.Get(var_i8, I8.data()); @@ -641,6 +688,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) bpReader.Get(var_r32, R32.data()); bpReader.Get(var_r64, R64.data()); + bpReader.Get(var_cr32, CR32.data()); + bpReader.Get(var_cr64, CR64.data()); + bpReader.Get(var_crld, CRLD.data()); + bpReader.PerformGets(); // Generate test data for each rank uniquely @@ -665,6 +716,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D2x4) EXPECT_EQ(U64[i], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[i], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[i], currentTestData.R64[i]) << msg; + EXPECT_EQ(CR32[i], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[i], currentTestData.CRLD[i]) << msg; } } bpReader.Close(); @@ -732,6 +786,12 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -758,6 +818,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); // Make a 2D selection to describe the local dimensions of the // variable we write and its offsets in the global spaces @@ -773,6 +837,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) var_u64.SetSelection(sel); var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); // Write each one // fill in the variable with values from starting index to @@ -788,6 +855,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) bpWriter.Put(var_u64, currentTestData.U64.data()); bpWriter.Put(var_r32, currentTestData.R32.data()); bpWriter.Put(var_r64, currentTestData.R64.data()); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); bpWriter.EndStep(); } @@ -870,6 +940,27 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) ASSERT_EQ(var_r64.Shape()[0], Ny); ASSERT_EQ(var_r64.Shape()[1], static_cast(mpiSize * Nx)); + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], Ny); + ASSERT_EQ(var_cr32.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], Ny); + ASSERT_EQ(var_cr64.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], Ny); + ASSERT_EQ(var_crld.Shape()[1], static_cast(mpiSize * Nx)); + // If the size of the array is smaller than the data // the result is weird... double and uint64_t would get // completely garbage data @@ -883,6 +974,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) std::array U64; std::array R32; std::array R64; + std::array, Nx * Ny> CR32; + std::array, Nx * Ny> CR64; + std::array, Nx * Ny> CRLD; const adios2::Dims start{0, static_cast(mpiRank * Nx)}; const adios2::Dims count{Ny, Nx}; @@ -902,6 +996,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); + for (size_t t = 0; t < NSteps; ++t) { var_i8.SetStepSelection({t, 1}); @@ -917,6 +1015,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) var_r32.SetStepSelection({t, 1}); var_r64.SetStepSelection({t, 1}); + var_cr32.SetStepSelection({t, 1}); + var_cr64.SetStepSelection({t, 1}); + var_crld.SetStepSelection({t, 1}); + bpReader.Get(var_i8, I8.data()); bpReader.Get(var_i16, I16.data()); bpReader.Get(var_i32, I32.data()); @@ -930,6 +1032,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) bpReader.Get(var_r32, R32.data()); bpReader.Get(var_r64, R64.data()); + bpReader.Get(var_cr32, CR32.data()); + bpReader.Get(var_cr64, CR64.data()); + bpReader.Get(var_crld, CRLD.data()); + bpReader.PerformGets(); // Generate test data for each rank uniquely @@ -952,6 +1058,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2) EXPECT_EQ(U64[i], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[i], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[i], currentTestData.R64[i]) << msg; + EXPECT_EQ(CR32[i], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[i], currentTestData.CRLD[i]) << msg; } } bpReader.Close(); @@ -1013,6 +1122,12 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -1039,6 +1154,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); // Make a 2D selection to describe the local dimensions of the // variable we write and its offsets in the global spaces @@ -1054,6 +1173,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) var_u64.SetSelection(sel); var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); // Write each one // fill in the variable with values from starting index to @@ -1069,6 +1191,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) bpWriter.Put(var_u64, currentTestData.U64.data()); bpWriter.Put(var_r32, currentTestData.R32.data()); bpWriter.Put(var_r64, currentTestData.R64.data()); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); bpWriter.EndStep(); } @@ -1151,6 +1276,27 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) ASSERT_EQ(var_r64.Shape()[0], Ny); ASSERT_EQ(var_r64.Shape()[1], static_cast(mpiSize * Nx)); + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], Ny); + ASSERT_EQ(var_cr32.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], Ny); + ASSERT_EQ(var_cr64.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], Ny); + ASSERT_EQ(var_crld.Shape()[1], static_cast(mpiSize * Nx)); + // If the size of the array is smaller than the data // the result is weird... double and uint64_t would get // completely garbage data @@ -1164,6 +1310,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) std::array U64; std::array R32; std::array R64; + std::array, NSteps * Nx * Ny> CR32; + std::array, NSteps * Nx * Ny> CR64; + std::array, NSteps * Nx * Ny> CRLD; const adios2::Dims start{0, static_cast(mpiRank * Nx)}; const adios2::Dims count{Ny, Nx}; @@ -1183,6 +1332,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) var_r32.SetSelection(sel); var_r64.SetSelection(sel); + var_cr32.SetSelection(sel); + var_cr64.SetSelection(sel); + var_crld.SetSelection(sel); + var_i8.SetStepSelection({tInitial, NSteps - tInitial}); var_i16.SetStepSelection({tInitial, NSteps - tInitial}); var_i32.SetStepSelection({tInitial, NSteps - tInitial}); @@ -1196,6 +1349,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) var_r32.SetStepSelection({tInitial, NSteps - tInitial}); var_r64.SetStepSelection({tInitial, NSteps - tInitial}); + var_cr32.SetStepSelection({tInitial, NSteps - tInitial}); + var_cr64.SetStepSelection({tInitial, NSteps - tInitial}); + var_crld.SetStepSelection({tInitial, NSteps - tInitial}); + bpReader.Get(var_i8, I8.data()); bpReader.Get(var_i16, I16.data()); bpReader.Get(var_i32, I32.data()); @@ -1209,6 +1366,10 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) bpReader.Get(var_r32, R32.data()); bpReader.Get(var_r64, R64.data()); + bpReader.Get(var_cr32, CR32.data()); + bpReader.Get(var_cr64, CR64.data()); + bpReader.Get(var_crld, CRLD.data()); + bpReader.PerformGets(); for (size_t t = tInitial; t < NSteps; ++t) @@ -1234,6 +1395,9 @@ TEST_F(BPWriteReadTestADIOS2, ADIOS2BPWriteRead2D4x2_ReadMultiSteps) EXPECT_EQ(U64[index], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[index], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[index], currentTestData.R64[i]) << msg; + EXPECT_EQ(CR32[index], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[index], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[index], currentTestData.CRLD[i]) << msg; } } diff --git a/testing/adios2/engine/bp/TestBPWriteReadMultiblock.cpp b/testing/adios2/engine/bp/TestBPWriteReadMultiblock.cpp index b7ff77d88b..bc99bbd26b 100644 --- a/testing/adios2/engine/bp/TestBPWriteReadMultiblock.cpp +++ b/testing/adios2/engine/bp/TestBPWriteReadMultiblock.cpp @@ -88,6 +88,12 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -121,6 +127,10 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); bpWriter.BeginStep(); bpWriter.Put(var_iString, currentTestData.S1); @@ -175,6 +185,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) var_r64.SetSelection(sel2); bpWriter.Put(var_r64, currentTestData.R64.data() + Nx / 2); + var_cr32.SetSelection(sel1); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + var_cr32.SetSelection(sel2); + bpWriter.Put(var_cr32, currentTestData.CR32.data() + Nx / 2); + + var_cr64.SetSelection(sel1); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + var_cr64.SetSelection(sel2); + bpWriter.Put(var_cr64, currentTestData.CR64.data() + Nx / 2); + + var_crld.SetSelection(sel1); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); + var_crld.SetSelection(sel2); + bpWriter.Put(var_crld, currentTestData.CRLD.data() + Nx / 2); + bpWriter.EndStep(); } @@ -252,6 +277,24 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) ASSERT_EQ(var_r64.Steps(), NSteps); ASSERT_EQ(var_r64.Shape()[0], mpiSize * Nx); + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], mpiSize * Nx); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], mpiSize * Nx); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], mpiSize * Nx); + // TODO: other types SmallTestData testData; @@ -267,6 +310,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) std::array U64; std::array R32; std::array R64; + std::array, Nx> CR32; + std::array, Nx> CR64; + std::array, Nx> CRLD; size_t t = 0; @@ -285,6 +331,10 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) const auto r32AllInfo = bpReader.AllStepsBlocksInfo(var_r32); const auto r64AllInfo = bpReader.AllStepsBlocksInfo(var_r64); + const auto cr32AllInfo = bpReader.AllStepsBlocksInfo(var_cr32); + const auto cr64AllInfo = bpReader.AllStepsBlocksInfo(var_cr64); + const auto crldAllInfo = bpReader.AllStepsBlocksInfo(var_crld); + EXPECT_EQ(iStringAllInfo.size(), NSteps); EXPECT_EQ(i8AllInfo.size(), NSteps); EXPECT_EQ(i16AllInfo.size(), NSteps); @@ -296,6 +346,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) EXPECT_EQ(u64AllInfo.size(), NSteps); EXPECT_EQ(r32AllInfo.size(), NSteps); EXPECT_EQ(r64AllInfo.size(), NSteps); + EXPECT_EQ(cr32AllInfo.size(), NSteps); + EXPECT_EQ(cr64AllInfo.size(), NSteps); + EXPECT_EQ(crldAllInfo.size(), NSteps); while (bpReader.BeginStep() == adios2::StepStatus::OK) { @@ -325,6 +378,13 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) const std::vector::Info> &r64Info = r64AllInfo.at(t); + const std::vector>::Info> + &cr32Info = cr32AllInfo.at(t); + const std::vector>::Info> + &cr64Info = cr64AllInfo.at(t); + const std::vector>::Info> + &crldInfo = crldAllInfo.at(t); + EXPECT_EQ(iStringInfo.size(), mpiSize); EXPECT_EQ(i8Info.size(), 2 * mpiSize); EXPECT_EQ(i16Info.size(), 2 * mpiSize); @@ -336,6 +396,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) EXPECT_EQ(u64Info.size(), 2 * mpiSize); EXPECT_EQ(r32Info.size(), 2 * mpiSize); EXPECT_EQ(r64Info.size(), 2 * mpiSize); + EXPECT_EQ(cr32Info.size(), 2 * mpiSize); + EXPECT_EQ(cr64Info.size(), 2 * mpiSize); + EXPECT_EQ(crldInfo.size(), 2 * mpiSize); // String for (size_t i = 0; i < mpiSize; ++i) @@ -376,6 +439,15 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) EXPECT_FALSE(r64Info[0].IsValue); EXPECT_EQ(r64Info[i].Count[0], Nx / 2); + EXPECT_FALSE(cr32Info[0].IsValue); + EXPECT_EQ(cr32Info[i].Count[0], Nx / 2); + + EXPECT_FALSE(cr64Info[0].IsValue); + EXPECT_EQ(cr64Info[i].Count[0], Nx / 2); + + EXPECT_FALSE(crldInfo[0].IsValue); + EXPECT_EQ(crldInfo[i].Count[0], Nx / 2); + const size_t inRank = i / 2; int8_t i8Min, i8Max; int16_t i16Min, i16Max; @@ -387,6 +459,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) uint64_t u64Min, u64Max; float r32Min, r32Max; double r64Min, r64Max; + std::complex cr32Min, cr32Max; + std::complex cr64Min, cr64Max; + std::complex crldMin, crldMax; SmallTestData currentTestData = generateNewSmallTestData(m_TestData, static_cast(t), @@ -404,6 +479,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) ASSERT_EQ(u64Info[i].Start[0], inRank * Nx); ASSERT_EQ(r32Info[i].Start[0], inRank * Nx); ASSERT_EQ(r64Info[i].Start[0], inRank * Nx); + ASSERT_EQ(cr32Info[i].Start[0], inRank * Nx); + ASSERT_EQ(cr64Info[i].Start[0], inRank * Nx); + ASSERT_EQ(crldInfo[i].Start[0], inRank * Nx); i8Min = *std::min_element(currentTestData.I8.begin(), @@ -465,6 +543,54 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) r64Max = *std::max_element(currentTestData.R64.begin(), currentTestData.R64.begin() + Nx / 2); + + cr32Min = currentTestData.CR32.front(); + cr32Max = currentTestData.CR32.front(); + for (auto it = currentTestData.CR32.begin(); + it != currentTestData.CR32.begin() + Nx / 2; ++it) + { + if (std::norm(*it) < std::norm(cr32Min)) + { + cr32Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr32Max)) + { + cr32Max = *it; + } + } + + cr64Min = currentTestData.CR64.front(); + cr64Max = currentTestData.CR64.front(); + for (auto it = currentTestData.CR64.begin(); + it != currentTestData.CR64.begin() + Nx / 2; ++it) + { + if (std::norm(*it) < std::norm(cr64Min)) + { + cr64Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr64Max)) + { + cr64Max = *it; + } + } + + crldMin = currentTestData.CRLD.front(); + crldMax = currentTestData.CRLD.front(); + for (auto it = currentTestData.CRLD.begin(); + it != currentTestData.CRLD.begin() + Nx / 2; ++it) + { + if (std::norm(*it) < std::norm(crldMin)) + { + crldMin = *it; + continue; + } + if (std::norm(*it) > std::norm(crldMax)) + { + crldMax = *it; + } + } } else { @@ -478,6 +604,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) ASSERT_EQ(u64Info[i].Start[0], inRank * Nx + Nx / 2); ASSERT_EQ(r32Info[i].Start[0], inRank * Nx + Nx / 2); ASSERT_EQ(r64Info[i].Start[0], inRank * Nx + Nx / 2); + ASSERT_EQ(cr32Info[i].Start[0], inRank * Nx + Nx / 2); + ASSERT_EQ(cr64Info[i].Start[0], inRank * Nx + Nx / 2); + ASSERT_EQ(crldInfo[i].Start[0], inRank * Nx + Nx / 2); i8Min = *std::min_element(currentTestData.I8.begin() + Nx / 2, @@ -548,6 +677,54 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) r64Max = *std::max_element(currentTestData.R64.begin() + Nx / 2, currentTestData.R64.begin() + Nx); + + cr32Min = currentTestData.CR32[Nx / 2]; + cr32Max = currentTestData.CR32[Nx / 2]; + for (auto it = currentTestData.CR32.begin() + Nx / 2; + it != currentTestData.CR32.begin() + Nx; ++it) + { + if (std::norm(*it) < std::norm(cr32Min)) + { + cr32Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr32Max)) + { + cr32Max = *it; + } + } + + cr64Min = currentTestData.CR64[Nx / 2]; + cr64Max = currentTestData.CR64[Nx / 2]; + for (auto it = currentTestData.CR64.begin() + Nx / 2; + it != currentTestData.CR64.begin() + Nx; ++it) + { + if (std::norm(*it) < std::norm(cr64Min)) + { + cr64Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr64Max)) + { + cr64Max = *it; + } + } + + crldMin = currentTestData.CRLD[Nx / 2]; + crldMax = currentTestData.CRLD[Nx / 2]; + for (auto it = currentTestData.CRLD.begin() + Nx / 2; + it != currentTestData.CRLD.begin() + Nx; ++it) + { + if (std::norm(*it) < std::norm(crldMin)) + { + crldMin = *it; + continue; + } + if (std::norm(*it) > std::norm(crldMax)) + { + crldMax = *it; + } + } } ASSERT_EQ(i8Info[i].Min, i8Min); @@ -572,6 +749,13 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) ASSERT_EQ(r32Info[i].Max, r32Max); ASSERT_EQ(r64Info[i].Min, r64Min); ASSERT_EQ(r64Info[i].Max, r64Max); + + ASSERT_EQ(cr32Info[i].Min, cr32Min); + ASSERT_EQ(cr32Info[i].Max, cr32Max); + ASSERT_EQ(cr64Info[i].Min, cr64Min); + ASSERT_EQ(cr64Info[i].Max, cr64Max); + ASSERT_EQ(crldInfo[i].Min, crldMin); + ASSERT_EQ(crldInfo[i].Max, crldMax); } // Generate test data for each rank uniquely @@ -630,6 +814,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) var_r64.SetSelection(sel2); bpReader.Get(var_r64, R64.data() + Nx / 2); + var_cr32.SetSelection(sel1); + bpReader.Get(var_cr32, CR32.data()); + var_cr32.SetSelection(sel2); + bpReader.Get(var_cr32, CR32.data() + Nx / 2); + + var_cr64.SetSelection(sel1); + bpReader.Get(var_cr64, CR64.data()); + var_cr64.SetSelection(sel2); + bpReader.Get(var_cr64, CR64.data() + Nx / 2); + + var_crld.SetSelection(sel1); + bpReader.Get(var_crld, CRLD.data()); + var_crld.SetSelection(sel2); + bpReader.Get(var_crld, CRLD.data() + Nx / 2); + bpReader.EndStep(); EXPECT_EQ(IString, currentTestData.S1); @@ -650,6 +849,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8) EXPECT_EQ(U64[i], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[i], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[i], currentTestData.R64[i]) << msg; + EXPECT_EQ(CR32[i], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[i], currentTestData.CRLD[i]) << msg; } ++t; @@ -729,6 +931,12 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -755,6 +963,10 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); bpWriter.BeginStep(); bpWriter.Put(var_iString, currentTestData.S1); @@ -809,6 +1021,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) var_r64.SetSelection(sel2); bpWriter.Put(var_r64, currentTestData.R64.data() + Ny * Nx / 2); + var_cr32.SetSelection(sel1); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + var_cr32.SetSelection(sel2); + bpWriter.Put(var_cr32, currentTestData.CR32.data() + Ny * Nx / 2); + + var_cr64.SetSelection(sel1); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + var_cr64.SetSelection(sel2); + bpWriter.Put(var_cr64, currentTestData.CR64.data() + Ny * Nx / 2); + + var_crld.SetSelection(sel1); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); + var_crld.SetSelection(sel2); + bpWriter.Put(var_crld, currentTestData.CRLD.data() + Ny * Nx / 2); + bpWriter.EndStep(); } @@ -896,6 +1123,27 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) ASSERT_EQ(var_r64.Shape()[0], Ny); ASSERT_EQ(var_r64.Shape()[1], static_cast(mpiSize * Nx)); + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], Ny); + ASSERT_EQ(var_cr32.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], Ny); + ASSERT_EQ(var_cr64.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], Ny); + ASSERT_EQ(var_crld.Shape()[1], static_cast(mpiSize * Nx)); + std::string IString; std::array I8; std::array I16; @@ -907,6 +1155,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) std::array U64; std::array R32; std::array R64; + std::array, Nx * Ny> CR32; + std::array, Nx * Ny> CR64; + std::array, Nx * Ny> CRLD; size_t t = 0; @@ -964,6 +1215,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) var_r64.SetSelection(sel2); bpReader.Get(var_r64, R64.data() + Ny * Nx / 2); + var_cr32.SetSelection(sel1); + bpReader.Get(var_cr32, CR32.data()); + var_cr32.SetSelection(sel2); + bpReader.Get(var_cr32, CR32.data() + Ny * Nx / 2); + + var_cr64.SetSelection(sel1); + bpReader.Get(var_cr64, CR64.data()); + var_cr64.SetSelection(sel2); + bpReader.Get(var_cr64, CR64.data() + Ny * Nx / 2); + + var_crld.SetSelection(sel1); + bpReader.Get(var_crld, CRLD.data()); + var_crld.SetSelection(sel2); + bpReader.Get(var_crld, CRLD.data() + Ny * Nx / 2); + bpReader.EndStep(); // Generate test data for each rank uniquely @@ -988,6 +1254,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D2x4) EXPECT_EQ(U64[i], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[i], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[i], currentTestData.R64[i]) << msg; + EXPECT_EQ(CR32[i], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[i], currentTestData.CRLD[i]) << msg; } ++t; @@ -1066,6 +1335,12 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) auto var_r32 = io.DefineVariable("r32", shape, start, count); auto var_r64 = io.DefineVariable("r64", shape, start, count); + auto var_cr32 = io.DefineVariable>( + "cr32", shape, start, count); + auto var_cr64 = io.DefineVariable>( + "cr64", shape, start, count); + auto var_crld = io.DefineVariable>( + "crld", shape, start, count); } // Create the BP Engine @@ -1092,6 +1367,10 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) auto var_u64 = io.InquireVariable("u64"); auto var_r32 = io.InquireVariable("r32"); auto var_r64 = io.InquireVariable("r64"); + auto var_cr32 = io.InquireVariable>("cr32"); + auto var_cr64 = io.InquireVariable>("cr64"); + auto var_crld = + io.InquireVariable>("crld"); bpWriter.BeginStep(); @@ -1145,6 +1424,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) var_r64.SetSelection(sel2); bpWriter.Put(var_r64, currentTestData.R64.data() + Ny * Nx / 2); + var_cr32.SetSelection(sel1); + bpWriter.Put(var_cr32, currentTestData.CR32.data()); + var_cr32.SetSelection(sel2); + bpWriter.Put(var_cr32, currentTestData.CR32.data() + Ny * Nx / 2); + + var_cr64.SetSelection(sel1); + bpWriter.Put(var_cr64, currentTestData.CR64.data()); + var_cr64.SetSelection(sel2); + bpWriter.Put(var_cr64, currentTestData.CR64.data() + Ny * Nx / 2); + + var_crld.SetSelection(sel1); + bpWriter.Put(var_crld, currentTestData.CRLD.data()); + var_crld.SetSelection(sel2); + bpWriter.Put(var_crld, currentTestData.CRLD.data() + Ny * Nx / 2); + bpWriter.EndStep(); } @@ -1227,6 +1521,27 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) ASSERT_EQ(var_r64.Shape()[0], Ny); ASSERT_EQ(var_r64.Shape()[1], static_cast(mpiSize * Nx)); + auto var_cr32 = io.InquireVariable>("cr32"); + EXPECT_TRUE(var_cr32); + ASSERT_EQ(var_cr32.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr32.Steps(), NSteps); + ASSERT_EQ(var_cr32.Shape()[0], Ny); + ASSERT_EQ(var_cr32.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_cr64 = io.InquireVariable>("cr64"); + EXPECT_TRUE(var_cr64); + ASSERT_EQ(var_cr64.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_cr64.Steps(), NSteps); + ASSERT_EQ(var_cr64.Shape()[0], Ny); + ASSERT_EQ(var_cr64.Shape()[1], static_cast(mpiSize * Nx)); + + auto var_crld = io.InquireVariable>("crld"); + EXPECT_TRUE(var_crld); + ASSERT_EQ(var_crld.ShapeID(), adios2::ShapeID::GlobalArray); + ASSERT_EQ(var_crld.Steps(), NSteps); + ASSERT_EQ(var_crld.Shape()[0], Ny); + ASSERT_EQ(var_crld.Shape()[1], static_cast(mpiSize * Nx)); + // If the size of the array is smaller than the data // the result is weird... double and uint64_t would get // completely garbage data @@ -1240,6 +1555,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) std::array U64; std::array R32; std::array R64; + std::array, Nx * Ny> CR32; + std::array, Nx * Ny> CR64; + std::array, Nx * Ny> CRLD; size_t t = 0; @@ -1266,6 +1584,16 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) 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()); + const std::vector>::Info> + crldInfo = + bpReader.BlocksInfo(var_crld, bpReader.CurrentStep()); + EXPECT_EQ(i8Info.size(), 2 * mpiSize); EXPECT_EQ(i16Info.size(), 2 * mpiSize); EXPECT_EQ(i32Info.size(), 2 * mpiSize); @@ -1276,6 +1604,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) EXPECT_EQ(u64Info.size(), 2 * mpiSize); EXPECT_EQ(r32Info.size(), 2 * mpiSize); EXPECT_EQ(r64Info.size(), 2 * mpiSize); + EXPECT_EQ(cr32Info.size(), 2 * mpiSize); + EXPECT_EQ(cr64Info.size(), 2 * mpiSize); + EXPECT_EQ(crldInfo.size(), 2 * mpiSize); for (size_t i = 0; i < 2 * mpiSize; ++i) { @@ -1289,6 +1620,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) EXPECT_FALSE(u64Info[0].IsValue); EXPECT_FALSE(r32Info[0].IsValue); EXPECT_FALSE(r64Info[0].IsValue); + EXPECT_FALSE(cr32Info[0].IsValue); + EXPECT_FALSE(cr64Info[0].IsValue); + EXPECT_FALSE(crldInfo[0].IsValue); const size_t inRank = i / 2; int8_t i8Min, i8Max; @@ -1301,6 +1635,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) uint64_t u64Min, u64Max; float r32Min, r32Max; double r64Min, r64Max; + std::complex cr32Min, cr32Max; + std::complex cr64Min, cr64Max; + std::complex crldMin, crldMax; SmallTestData currentTestData = generateNewSmallTestData(m_TestData, static_cast(t), @@ -1358,6 +1695,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) EXPECT_EQ(r64Info[i].Count[0], Ny / 2); EXPECT_EQ(r64Info[i].Count[1], Nx); + ASSERT_EQ(cr32Info[i].Start[0], 0); + ASSERT_EQ(cr32Info[i].Start[1], inRank * Nx); + EXPECT_EQ(cr32Info[i].Count[0], Ny / 2); + EXPECT_EQ(cr32Info[i].Count[1], Nx); + + ASSERT_EQ(cr64Info[i].Start[0], 0); + ASSERT_EQ(cr64Info[i].Start[1], inRank * Nx); + EXPECT_EQ(cr64Info[i].Count[0], Ny / 2); + EXPECT_EQ(cr64Info[i].Count[1], Nx); + + ASSERT_EQ(crldInfo[i].Start[0], 0); + ASSERT_EQ(crldInfo[i].Start[1], inRank * Nx); + EXPECT_EQ(crldInfo[i].Count[0], Ny / 2); + EXPECT_EQ(crldInfo[i].Count[1], Nx); + i8Min = *std::min_element(currentTestData.I8.begin(), currentTestData.I8.begin() + Ny * Nx / 2); @@ -1418,6 +1770,54 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) r64Max = *std::max_element(currentTestData.R64.begin(), currentTestData.R64.begin() + Ny * Nx / 2); + + cr32Min = currentTestData.CR32.front(); + cr32Max = currentTestData.CR32.front(); + for (auto it = currentTestData.CR32.begin(); + it != currentTestData.CR32.begin() + Ny * Nx / 2; ++it) + { + if (std::norm(*it) < std::norm(cr32Min)) + { + cr32Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr32Max)) + { + cr32Max = *it; + } + } + + cr64Min = currentTestData.CR64.front(); + cr64Max = currentTestData.CR64.front(); + for (auto it = currentTestData.CR64.begin(); + it != currentTestData.CR64.begin() + Ny * Nx / 2; ++it) + { + if (std::norm(*it) < std::norm(cr64Min)) + { + cr64Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr64Max)) + { + cr64Max = *it; + } + } + + crldMin = currentTestData.CRLD.front(); + crldMax = currentTestData.CRLD.front(); + for (auto it = currentTestData.CRLD.begin(); + it != currentTestData.CRLD.begin() + Ny * Nx / 2; ++it) + { + if (std::norm(*it) < std::norm(crldMin)) + { + crldMin = *it; + continue; + } + if (std::norm(*it) > std::norm(crldMax)) + { + crldMax = *it; + } + } } else { @@ -1471,6 +1871,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) EXPECT_EQ(r64Info[i].Count[0], Ny - Ny / 2); EXPECT_EQ(r64Info[i].Count[1], Nx); + ASSERT_EQ(cr32Info[i].Start[0], Ny / 2); + ASSERT_EQ(cr32Info[i].Start[1], inRank * Nx); + EXPECT_EQ(cr32Info[i].Count[0], Ny - Ny / 2); + EXPECT_EQ(cr32Info[i].Count[1], Nx); + + ASSERT_EQ(cr64Info[i].Start[0], Ny / 2); + ASSERT_EQ(cr64Info[i].Start[1], inRank * Nx); + EXPECT_EQ(cr64Info[i].Count[0], Ny - Ny / 2); + EXPECT_EQ(cr64Info[i].Count[1], Nx); + + ASSERT_EQ(crldInfo[i].Start[0], Ny / 2); + ASSERT_EQ(crldInfo[i].Start[1], inRank * Nx); + EXPECT_EQ(crldInfo[i].Count[0], Ny - Ny / 2); + EXPECT_EQ(crldInfo[i].Count[1], Nx); + i8Min = *std::min_element( currentTestData.I8.begin() + Ny * Nx / 2, currentTestData.I8.begin() + Ny * Nx); @@ -1540,6 +1955,54 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) r64Max = *std::max_element( currentTestData.R64.begin() + Ny * Nx / 2, currentTestData.R64.begin() + Ny * Nx); + + cr32Min = currentTestData.CR32[Ny * Nx / 2]; + cr32Max = currentTestData.CR32[Ny * Nx / 2]; + for (auto it = currentTestData.CR32.begin() + Ny * Nx / 2; + it != currentTestData.CR32.begin() + Ny * Nx; ++it) + { + if (std::norm(*it) < std::norm(cr32Min)) + { + cr32Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr32Max)) + { + cr32Max = *it; + } + } + + cr64Min = currentTestData.CR64[Ny * Nx / 2]; + cr64Max = currentTestData.CR64[Ny * Nx / 2]; + for (auto it = currentTestData.CR64.begin() + Ny * Nx / 2; + it != currentTestData.CR64.begin() + Ny * Nx; ++it) + { + if (std::norm(*it) < std::norm(cr64Min)) + { + cr64Min = *it; + continue; + } + if (std::norm(*it) > std::norm(cr64Max)) + { + cr64Max = *it; + } + } + + crldMin = currentTestData.CRLD[Ny * Nx / 2]; + crldMax = currentTestData.CRLD[Ny * Nx / 2]; + for (auto it = currentTestData.CRLD.begin() + Ny * Nx / 2; + it != currentTestData.CRLD.begin() + Ny * Nx; ++it) + { + if (std::norm(*it) < std::norm(crldMin)) + { + crldMin = *it; + continue; + } + if (std::norm(*it) > std::norm(crldMax)) + { + crldMax = *it; + } + } } ASSERT_EQ(i8Info[i].Min, i8Min); ASSERT_EQ(i8Info[i].Max, i8Max); @@ -1563,6 +2026,13 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) ASSERT_EQ(r32Info[i].Max, r32Max); ASSERT_EQ(r64Info[i].Min, r64Min); ASSERT_EQ(r64Info[i].Max, r64Max); + + ASSERT_EQ(cr32Info[i].Min, cr32Min); + ASSERT_EQ(cr32Info[i].Max, cr32Max); + ASSERT_EQ(cr64Info[i].Min, cr64Min); + ASSERT_EQ(cr64Info[i].Max, cr64Max); + ASSERT_EQ(crldInfo[i].Min, crldMin); + ASSERT_EQ(crldInfo[i].Max, crldMax); } var_i8.SetSelection(sel1); @@ -1615,6 +2085,21 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) var_r64.SetSelection(sel2); bpReader.Get(var_r64, R64.data() + Ny * Nx / 2); + var_cr32.SetSelection(sel1); + bpReader.Get(var_cr32, CR32.data()); + var_cr32.SetSelection(sel2); + bpReader.Get(var_cr32, CR32.data() + Ny * Nx / 2); + + var_cr64.SetSelection(sel1); + bpReader.Get(var_cr64, CR64.data()); + var_cr64.SetSelection(sel2); + bpReader.Get(var_cr64, CR64.data() + Ny * Nx / 2); + + var_crld.SetSelection(sel1); + bpReader.Get(var_crld, CRLD.data()); + var_crld.SetSelection(sel2); + bpReader.Get(var_crld, CRLD.data() + Ny * Nx / 2); + bpReader.EndStep(); // Generate test data for each rank uniquely @@ -1637,6 +2122,9 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock2D4x2) EXPECT_EQ(U64[i], currentTestData.U64[i]) << msg; EXPECT_EQ(R32[i], currentTestData.R32[i]) << msg; EXPECT_EQ(R64[i], currentTestData.R64[i]) << msg; + EXPECT_EQ(CR32[i], currentTestData.CR32[i]) << msg; + EXPECT_EQ(CR64[i], currentTestData.CR64[i]) << msg; + EXPECT_EQ(CRLD[i], currentTestData.CRLD[i]) << msg; } ++t; From 1a7024f51cda5abfe5d033b89cf6220528b5e694 Mon Sep 17 00:00:00 2001 From: williamfgc Date: Tue, 14 Aug 2018 16:17:27 -0400 Subject: [PATCH 4/4] #785 complex types Fixing formatting issues in bpls2.h --- source/utils/bpls2/bpls2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utils/bpls2/bpls2.h b/source/utils/bpls2/bpls2.h index 3ec56492ab..19a9186dfe 100644 --- a/source/utils/bpls2/bpls2.h +++ b/source/utils/bpls2/bpls2.h @@ -54,8 +54,8 @@ enum ADIOS_DATATYPES adios_string = 9, adios_complex = 10, adios_double_complex = 11, - adios_string_array = 12, - adios_long_double_complex = 13 + adios_string_array = 12, + adios_long_double_complex = 13 }; struct Entry