Skip to content

Commit f3406d3

Browse files
franzpoeschelopencode
andauthored
Conda CI: Use sockets transport for testing SST (#1956)
* ADIOS2: Configure SST transports via environment variables Add OPENPMD_ADIOS2_SST_DATA_TRANSPORT, OPENPMD_ADIOS2_SST_WAN_TRANSPORT and OPENPMD_ADIOS2_SST_CONTROL_TRANSPORT. Also route existing environment-based engine parameters through the shared setParameter helper. * CI: Use WAN data transport for SST in conda job Avoid the system-specific UCX data plane in the conda_ompi_all job by using the WAN/sockets transport for SST. --------- Co-authored-by: opencode <noreply@opencode.ai>
1 parent 2e9ddd7 commit f3406d3

3 files changed

Lines changed: 86 additions & 84 deletions

File tree

‎.github/workflows/linux.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,11 @@ jobs:
353353
channel-priority: true
354354
- name: Build
355355
shell: bash -eo pipefail -l {0}
356-
env: {CXXFLAGS: -Werror}
356+
env:
357+
CXXFLAGS: -Werror
358+
OPENPMD_ADIOS2_SST_DATA_TRANSPORT: WAN
359+
OPENPMD_ADIOS2_SST_WAN_TRANSPORT: sockets
360+
OPENPMD_ADIOS2_SST_CONTROL_TRANSPORT: tcp
357361
run: |
358362
share/openPMD/download_samples.sh build
359363
cmake -S . -B build \

‎docs/source/backends/adios2.rst‎

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,27 @@ The ADIOS2 SST engine for streaming can be picked by specifying the ending ``.ss
7575
The following environment variables control ADIOS2 I/O behavior at runtime.
7676
Fine-tuning these is especially useful when running at large scale.
7777

78-
======================================= ========== ================================================================================
79-
environment variable default description
80-
======================================= ========== ================================================================================
81-
``OPENPMD_ADIOS2_HAVE_PROFILING`` ``1`` Turns on/off profiling information right after a run.
82-
``OPENPMD_ADIOS2_HAVE_METADATA_FILE`` ``1`` Online creation of the adios journal file (``1``: yes, ``0``: no).
83-
``OPENPMD_ADIOS2_NUM_SUBSTREAMS`` ``0`` Number of files to be created, 0 indicates maximum number possible.
84-
``OPENPMD_ADIOS2_ENGINE`` ``File`` `ADIOS2 engine <https://adios2.readthedocs.io/en/latest/engines/engines.html>`_
85-
``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>`).
86-
``OPENPMD2_ADIOS2_USE_GROUP_TABLE`` ``0`` Use group table (see below)
87-
``OPENPMD_ADIOS2_STATS_LEVEL`` see below Whether to generate statistics for variables in ADIOS2. (``1``: yes, ``0``: no)
88-
``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``).
89-
``OPENPMD_ADIOS2_BP5_BufferChunkMB`` ``0`` ADIOS2 BP5 engine: applies when using either EveryoneWrites or EveryoneWritesSerial aggregation
90-
``OPENPMD_ADIOS2_BP5_MaxShmMB`` ``0`` ADIOS2 BP5 engine: applies when using TwoLevelShm aggregation
91-
``OPENPMD_ADIOS2_BP5_NumSubFiles`` ``0`` ADIOS2 BP5 engine: num of subfiles
92-
``OPENPMD_ADIOS2_BP5_NumAgg`` ``0`` ADIOS2 BP5 engine: num of aggregators
93-
``OPENPMD_ADIOS2_BP5_TypeAgg`` *empty* ADIOS2 BP5 engine: aggregation type. (EveryoneWrites, EveryoneWritesSerial, TwoLevelShm)
94-
``OPENPMD_BP5_GROUPENCODING_MAX_STEPS`` ``100`` ADIOS2 BP5 engine: max number of allowed output steps in group encoding.
95-
======================================= ========== ================================================================================
78+
======================================== ========== ================================================================================
79+
environment variable default description
80+
======================================== ========== ================================================================================
81+
``OPENPMD_ADIOS2_HAVE_PROFILING`` ``1`` Turns on/off profiling information right after a run.
82+
``OPENPMD_ADIOS2_HAVE_METADATA_FILE`` ``1`` Online creation of the adios journal file (``1``: yes, ``0``: no).
83+
``OPENPMD_ADIOS2_NUM_SUBSTREAMS`` ``0`` Number of files to be created, 0 indicates maximum number possible.
84+
``OPENPMD_ADIOS2_ENGINE`` ``File`` `ADIOS2 engine <https://adios2.readthedocs.io/en/latest/engines/engines.html>`_
85+
``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>`).
86+
``OPENPMD2_ADIOS2_USE_GROUP_TABLE`` ``0`` Use group table (see below)
87+
``OPENPMD_ADIOS2_STATS_LEVEL`` see below Whether to generate statistics for variables in ADIOS2. (``1``: yes, ``0``: no)
88+
``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``).
89+
``OPENPMD_ADIOS2_SST_DATA_TRANSPORT`` varies ADIOS2 SST engine: data transport (``UCX``, ``MPI``, ``RDMA``, ``WAN``).
90+
``OPENPMD_ADIOS2_SST_WAN_TRANSPORT`` sockets ADIOS2 SST engine: EVPath transport when ``DataTransport`` is ``WAN``.
91+
``OPENPMD_ADIOS2_SST_CONTROL_TRANSPORT`` tcp ADIOS2 SST engine: control transport (``tcp`` or ``scalable``).
92+
``OPENPMD_ADIOS2_BP5_BufferChunkMB`` ``0`` ADIOS2 BP5 engine: applies when using either EveryoneWrites or EveryoneWritesSerial aggregation
93+
``OPENPMD_ADIOS2_BP5_MaxShmMB`` ``0`` ADIOS2 BP5 engine: applies when using TwoLevelShm aggregation
94+
``OPENPMD_ADIOS2_BP5_NumSubFiles`` ``0`` ADIOS2 BP5 engine: num of subfiles
95+
``OPENPMD_ADIOS2_BP5_NumAgg`` ``0`` ADIOS2 BP5 engine: num of aggregators
96+
``OPENPMD_ADIOS2_BP5_TypeAgg`` *empty* ADIOS2 BP5 engine: aggregation type. (EveryoneWrites, EveryoneWritesSerial, TwoLevelShm)
97+
``OPENPMD_BP5_GROUPENCODING_MAX_STEPS`` ``100`` ADIOS2 BP5 engine: max number of allowed output steps in group encoding.
98+
======================================== ========== ================================================================================
9699

97100
Please refer to the `ADIOS2 documentation <https://adios2.readthedocs.io/en/latest/engines/engines.html>`_ for details on I/O tuning.
98101

‎src/IO/ADIOS/ADIOS2File.cpp‎

Lines changed: 60 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -641,54 +641,39 @@ void ADIOS2File::configure_IO()
641641
return it == alreadyConfigured.end();
642642
};
643643

644-
// read parameters from environment
645-
if (notYetConfigured("CollectiveMetadata"))
646-
{
647-
if (1 == auxiliary::getEnvNum("OPENPMD_ADIOS2_HAVE_METADATA_FILE", 1))
648-
{
649-
m_IO.SetParameter("CollectiveMetadata", "On");
650-
}
651-
else
652-
{
653-
m_IO.SetParameter("CollectiveMetadata", "Off");
654-
}
655-
}
656-
if (notYetConfigured("Profile"))
657-
{
658-
if (1 == auxiliary::getEnvNum("OPENPMD_ADIOS2_HAVE_PROFILING", 1) &&
659-
notYetConfigured("Profile"))
644+
auto setParameter = [&](std::string const &parameter, std::string value) {
645+
if (notYetConfigured(parameter) && !value.empty())
660646
{
661-
m_IO.SetParameter("Profile", "On");
647+
m_IO.SetParameter(parameter, std::move(value));
662648
}
663-
else
664-
{
665-
m_IO.SetParameter("Profile", "Off");
666-
}
667-
}
668-
if (notYetConfigured("AsyncWrite"))
649+
};
650+
651+
// read parameters from environment
652+
setParameter(
653+
"CollectiveMetadata",
654+
1 == auxiliary::getEnvNum("OPENPMD_ADIOS2_HAVE_METADATA_FILE", 1)
655+
? "On"
656+
: "Off");
657+
setParameter(
658+
"Profile",
659+
1 == auxiliary::getEnvNum("OPENPMD_ADIOS2_HAVE_PROFILING", 1) ? "On"
660+
: "Off");
661+
bool asyncWrite =
662+
1 == auxiliary::getEnvNum("OPENPMD_ADIOS2_ASYNC_WRITE", 0);
663+
if (asyncWrite && notYetConfigured("AsyncWrite") &&
664+
!wasTheFlushTargetSpecifiedViaJSON)
669665
{
670-
if (1 == auxiliary::getEnvNum("OPENPMD_ADIOS2_ASYNC_WRITE", 0) &&
671-
notYetConfigured("AsyncWrite"))
672-
{
673-
m_IO.SetParameter("AsyncWrite", "On");
674-
if (!wasTheFlushTargetSpecifiedViaJSON)
675-
{
676-
m_impl->m_flushTarget = FlushTarget::Buffer;
677-
}
678-
}
679-
else
680-
{
681-
m_IO.SetParameter("AsyncWrite", "Off");
682-
}
666+
m_impl->m_flushTarget = FlushTarget::Buffer;
683667
}
668+
setParameter("AsyncWrite", asyncWrite ? "On" : "Off");
684669

685670
#if openPMD_HAVE_MPI
686671
{
687672
auto num_substreams =
688673
auxiliary::getEnvNum("OPENPMD_ADIOS2_NUM_SUBSTREAMS", 0);
689-
if (notYetConfigured("SubStreams") && 0 != num_substreams)
674+
if (num_substreams != 0)
690675
{
691-
m_IO.SetParameter("SubStreams", std::to_string(num_substreams));
676+
setParameter("SubStreams", std::to_string(num_substreams));
692677
}
693678

694679
// BP5 parameters
@@ -701,18 +686,17 @@ void ADIOS2File::configure_IO()
701686
auto BufferChunkMB =
702687
auxiliary::getEnvNum("OPENPMD_ADIOS2_BP5_BufferChunkMB", 0);
703688

704-
if (notYetConfigured("NumAggregators") && (numAgg > 0))
705-
m_IO.SetParameter("NumAggregators", std::to_string(numAgg));
706-
if (notYetConfigured("NumSubFiles") && (numSubFiles > 0))
707-
m_IO.SetParameter("NumSubFiles", std::to_string(numSubFiles));
708-
if (notYetConfigured("AggregationType") && (AggTypeStr.size() > 0))
709-
m_IO.SetParameter("AggregationType", AggTypeStr);
710-
if (notYetConfigured("BufferChunkSize") && (BufferChunkMB > 0))
711-
m_IO.SetParameter(
689+
if (numAgg > 0)
690+
setParameter("NumAggregators", std::to_string(numAgg));
691+
if (numSubFiles > 0)
692+
setParameter("NumSubFiles", std::to_string(numSubFiles));
693+
setParameter("AggregationType", AggTypeStr);
694+
if (BufferChunkMB > 0)
695+
setParameter(
712696
"BufferChunkSize",
713697
std::to_string((uint64_t)BufferChunkMB * (uint64_t)1048576));
714-
if (notYetConfigured("MaxShmSize") && (MaxShmMB > 0))
715-
m_IO.SetParameter(
698+
if (MaxShmMB > 0)
699+
setParameter(
716700
"MaxShmSize",
717701
std::to_string((uint64_t)MaxShmMB * (uint64_t)1048576));
718702
}
@@ -724,24 +708,35 @@ void ADIOS2File::configure_IO()
724708
constexpr int default_stats_level = 0;
725709
#endif
726710

727-
if (notYetConfigured("StatsLevel"))
711+
/*
712+
* Up until and including ADIOS2 v2.12.0:
713+
*
714+
* Switch those off by default since they are expensive to compute
715+
* and to enable it, set the JSON option "StatsLevel" or the
716+
* environment variable "OPENPMD_ADIOS2_STATS_LEVEL" be positive.
717+
* The ADIOS2 default was "1" (on).
718+
*
719+
* Beginning ADIOS2 v2.12.1:
720+
*
721+
* Performance for Stats computation has been improved through
722+
* vectorization, so we switch it on by default.
723+
*/
724+
auto stats_level =
725+
auxiliary::getEnvNum("OPENPMD_ADIOS2_STATS_LEVEL", default_stats_level);
726+
setParameter("StatsLevel", std::to_string(stats_level));
727+
728+
if (m_impl->realEngineType() == "sst")
728729
{
729-
/*
730-
* Up until and including ADIOS2 v2.12.0:
731-
*
732-
* Switch those off by default since they are expensive to compute
733-
* and to enable it, set the JSON option "StatsLevel" or the
734-
* environment variable "OPENPMD_ADIOS2_STATS_LEVEL" be positive.
735-
* The ADIOS2 default was "1" (on).
736-
*
737-
* Beginning ADIOS2 v2.12.1:
738-
*
739-
* Performance for Stats computation has been improved through
740-
* vectorization, so we switch it on by default.
741-
*/
742-
auto stats_level = auxiliary::getEnvNum(
743-
"OPENPMD_ADIOS2_STATS_LEVEL", default_stats_level);
744-
m_IO.SetParameter("StatsLevel", std::to_string(stats_level));
730+
setParameter(
731+
"DataTransport",
732+
auxiliary::getEnvString("OPENPMD_ADIOS2_SST_DATA_TRANSPORT", ""));
733+
setParameter(
734+
"WANDataTransport",
735+
auxiliary::getEnvString("OPENPMD_ADIOS2_SST_WAN_TRANSPORT", ""));
736+
setParameter(
737+
"ControlTransport",
738+
auxiliary::getEnvString(
739+
"OPENPMD_ADIOS2_SST_CONTROL_TRANSPORT", ""));
745740
}
746741
if (m_impl->realEngineType() == "sst" && notYetConfigured("QueueLimit"))
747742
{

0 commit comments

Comments
 (0)