diff --git a/source/adios2/engine/bp5/BP5Writer.cpp b/source/adios2/engine/bp5/BP5Writer.cpp index ff1889577e..856ef2134b 100644 --- a/source/adios2/engine/bp5/BP5Writer.cpp +++ b/source/adios2/engine/bp5/BP5Writer.cpp @@ -507,9 +507,11 @@ void BP5Writer::MarshalAttributes() #ifdef ADIOS2_HAVE_DERIVED_VARIABLE void BP5Writer::ComputeDerivedVariables() { + PERFSTUBS_SCOPED_TIMER("BP5Writer::ComputeDerivedVariables"); auto const &m_VariablesDerived = m_IO.GetDerivedVariables(); auto const &m_Variables = m_IO.GetVariables(); // parse all derived variables + m_Profiler.Start("DeriveVars"); for (auto it = m_VariablesDerived.begin(); it != m_VariablesDerived.end(); it++) { // identify the variables used in the derived variable @@ -562,6 +564,7 @@ void BP5Writer::ComputeDerivedVariables() free(std::get<0>(derivedBlock)); } } + m_Profiler.Stop("DeriveVars"); } #endif diff --git a/source/adios2/toolkit/derived/Function.cpp b/source/adios2/toolkit/derived/Function.cpp index 441be6a7c6..da64e37f60 100644 --- a/source/adios2/toolkit/derived/Function.cpp +++ b/source/adios2/toolkit/derived/Function.cpp @@ -5,6 +5,7 @@ #include "Function.tcc" #include "adios2/common/ADIOSMacros.h" #include "adios2/helper/adiosFunctions.h" +#include #include namespace adios2 @@ -14,6 +15,7 @@ namespace derived DerivedData AddFunc(std::vector inputData, DataType type) { + PERFSTUBS_SCOPED_TIMER("derived::Function::AddFunc"); size_t dataSize = std::accumulate(std::begin(inputData[0].Count), std::end(inputData[0].Count), 1, std::multiplies()); @@ -31,6 +33,7 @@ DerivedData AddFunc(std::vector inputData, DataType type) DerivedData MagnitudeFunc(std::vector inputData, DataType type) { + PERFSTUBS_SCOPED_TIMER("derived::Function::MagnitudeFunc"); size_t dataSize = std::accumulate(std::begin(inputData[0].Count), std::end(inputData[0].Count), 1, std::multiplies()); #define declare_type_mag(T) \ @@ -147,6 +150,7 @@ float linear_interp(DerivedData input, size_t index, size_t dim) */ DerivedData Curl3DFunc(const std::vector inputData, DataType type) { + PERFSTUBS_SCOPED_TIMER("derived::Function::Curl3DFunc"); size_t dataSize = inputData[0].Count[0] * inputData[0].Count[1] * inputData[0].Count[2]; DerivedData curl; diff --git a/source/adios2/toolkit/profiling/iochrono/IOChrono.cpp b/source/adios2/toolkit/profiling/iochrono/IOChrono.cpp index 0cfd7eef26..1002d110ae 100644 --- a/source/adios2/toolkit/profiling/iochrono/IOChrono.cpp +++ b/source/adios2/toolkit/profiling/iochrono/IOChrono.cpp @@ -56,6 +56,8 @@ JSONProfiler::JSONProfiler(helper::Comm const &comm) : m_Comm(comm) AddTimerWatch("DC_WaitOnAsync2"); AddTimerWatch("PDW"); + AddTimerWatch("DeriveVars"); + m_Profiler.m_Bytes.emplace("buffering", 0); AddTimerWatch("DataRead"); m_Profiler.m_Bytes.emplace("dataread", 0);