Namespaces | |
| detail | |
Classes | |
| struct | Context |
| Context information for the current process/rank. More... | |
Typedefs | |
| using | Rank = std::int32_t |
| Type alias for communicator::Rank. | |
Enumerations | |
| enum class | Backend { AUTO , FILE } |
| Backend types for process coordination and bootstrapping. More... | |
Functions | |
| Context | init (Backend backend=Backend::AUTO) |
| Initialize the bootstrap context from environment variables. More... | |
| void | broadcast (Context const &ctx, void *data, std::size_t size, Rank root=0) |
| Broadcast data from root rank to all other ranks. More... | |
| void | barrier (Context const &ctx) |
| Perform a barrier synchronization across all ranks. More... | |
| void | put (Context const &ctx, std::string const &key, std::string const &value) |
| Store a key-value pair in the coordination backend. More... | |
| std::string | get (Context const &ctx, std::string const &key, Duration timeout=std::chrono::seconds{30}) |
| Retrieve a value from the coordination backend. More... | |
SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. SPDX-License-Identifier: Apache-2.0
|
strong |
Backend types for process coordination and bootstrapping.
Definition at line 28 of file bootstrap.hpp.
| void rapidsmpf::bootstrap::barrier | ( | Context const & | ctx | ) |
Perform a barrier synchronization across all ranks.
This ensures all ranks reach this point before any rank proceeds.
| ctx | Bootstrap context. |
| void rapidsmpf::bootstrap::broadcast | ( | Context const & | ctx, |
| void * | data, | ||
| std::size_t | size, | ||
| Rank | root = 0 |
||
| ) |
Broadcast data from root rank to all other ranks.
This is a helper function for broadcasting small amounts of data during bootstrapping. It uses the underlying backend's coordination mechanism.
| ctx | Bootstrap context. |
| data | Data buffer to broadcast (both input on root, output on others). |
| size | Size of data in bytes. |
| root | Root rank performing the broadcast (default: 0). |
| std::string rapidsmpf::bootstrap::get | ( | Context const & | ctx, |
| std::string const & | key, | ||
| Duration | timeout = std::chrono::seconds{30} |
||
| ) |
Retrieve a value from the coordination backend.
This function blocks until the key is available or timeout occurs.
| ctx | Bootstrap context. |
| key | Key name to retrieve. |
| timeout | Timeout duration. |
| std::runtime_error | if key not found within timeout. |
| Context rapidsmpf::bootstrap::init | ( | Backend | backend = Backend::AUTO | ) |
Initialize the bootstrap context from environment variables.
This function reads environment variables to determine rank, nranks, and backend configuration. It should be called early in the application lifecycle.
Environment variables checked (in order of precedence):
| backend | Backend to use (default: AUTO for auto-detection). |
| std::runtime_error | if environment is not properly configured. |
| void rapidsmpf::bootstrap::put | ( | Context const & | ctx, |
| std::string const & | key, | ||
| std::string const & | value | ||
| ) |
Store a key-value pair in the coordination backend.
This is useful for custom coordination beyond UCXX address exchange.
| ctx | Bootstrap context. |
| key | Key name. |
| value | Value to store. |