Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/backends/adios2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ environment variable default description
``OPENPMD_ADIOS2_ENGINE`` ``File`` `ADIOS2 engine <https://adios2.readthedocs.io/en/latest/engines/engines.html>`_
``OPENPMD_ADIOS2_PRETEND_ENGINE`` *empty* Pretend that an (unknown) ADIOS2 engine is in fact another one (also see the ``adios2.pretend_engine`` :ref:`parameter <backendconfig-adios2>`).
``OPENPMD2_ADIOS2_USE_GROUP_TABLE`` ``0`` Use group table (see below)
``OPENPMD_ADIOS2_STATS_LEVEL`` ``0`` whether to generate statistics for variables in ADIOS2. (``1``: yes, ``0``: no).
``OPENPMD_ADIOS2_STATS_LEVEL`` see below Whether to generate statistics for variables in ADIOS2. (``1``: yes, ``0``: no)
``OPENPMD_ADIOS2_ASYNC_WRITE`` ``0`` ADIOS2 BP5 engine: 1 means setting "AsyncWrite" in ADIOS2 to "on". Flushes will go to the buffer by default (see ``preferred_flush_target``).
``OPENPMD_ADIOS2_BP5_BufferChunkMB`` ``0`` ADIOS2 BP5 engine: applies when using either EveryoneWrites or EveryoneWritesSerial aggregation
``OPENPMD_ADIOS2_BP5_MaxShmMB`` ``0`` ADIOS2 BP5 engine: applies when using TwoLevelShm aggregation
Expand All @@ -98,7 +98,7 @@ Please refer to the `ADIOS2 documentation <https://adios2.readthedocs.io/en/late

Notice that the ADIOS2 backend is alternatively configurable via :ref:`JSON parameters <backendconfig>`.

Due to performance considerations, the ADIOS2 backend configures ADIOS2 not to compute any dataset statistics (Min/Max) by default.
Due to performance considerations, the ADIOS2 backend configures ADIOS2 not to compute any dataset statistics (Min/Max) by default for ADIOS2 versions up until v2.12.0. Starting with `v2.12.1 <https://github.com/ornladios/ADIOS2/releases/tag/v2.12.1>`_, the performance of statistics computation has been improved, so it is turned on by default.
Statistics may be activated by setting the :ref:`JSON parameter <backendconfig>` ``adios2.engine.parameters.StatsLevel = "1"``.

The ADIOS2 backend overrides the default unlimited queueing behavior of the SST engine with a more cautious limit of 2 steps that may be held in the queue at one time.
Expand Down
5 changes: 5 additions & 0 deletions include/openPMD/IO/ADIOS/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
ADIOS2_VERSION_PATCH >= \
2101)

#define openPMD_HAS_ADIOS_2_12_1 \
(ADIOS2_VERSION_MAJOR * 1000 + ADIOS2_VERSION_MINOR * 10 + \
ADIOS2_VERSION_PATCH >= \
2121)

#if defined(ADIOS2_HAVE_BP5) || openPMD_HAS_ADIOS_2_10
// ADIOS2 v2.10 no longer defines this
#define openPMD_HAVE_ADIOS2_BP5 1
Expand Down
18 changes: 16 additions & 2 deletions src/IO/ADIOS/ADIOS2File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,16 +718,30 @@ void ADIOS2File::configure_IO()
std::to_string((uint64_t)MaxShmMB * (uint64_t)1048576));
}
#endif

#if openPMD_HAS_ADIOS_2_12_1
constexpr int default_stats_level = 1;
#else
constexpr int default_stats_level = 0;
#endif

if (notYetConfigured("StatsLevel"))
{
/*
* Up until and including ADIOS2 v2.12.0:
*
* Switch those off by default since they are expensive to compute
* and to enable it, set the JSON option "StatsLevel" or the
* environment variable "OPENPMD_ADIOS2_STATS_LEVEL" be positive.
* The ADIOS2 default was "1" (on).
*
* Beginning ADIOS2 v2.12.1:
*
* Performance for Stats computation has been improved through
* vectorization, so we switch it on by default.
*/
auto stats_level =
auxiliary::getEnvNum("OPENPMD_ADIOS2_STATS_LEVEL", 0);
auto stats_level = auxiliary::getEnvNum(
"OPENPMD_ADIOS2_STATS_LEVEL", default_stats_level);
m_IO.SetParameter("StatsLevel", std::to_string(stats_level));
}
if (m_impl->realEngineType() == "sst" && notYetConfigured("QueueLimit"))
Expand Down
Loading