scheduling
scheduling
Section titled “scheduling”Classes
Section titled “Classes”| Name | Description |
|---|---|
AlgorithmTask |
|
ArrayBufferPool |
The ArrayBufferPool provides a pool of NCArrays for workers managed by a scheduler. |
DagScheduler |
The primary scheduler of processing work defined by a DAG. |
DummyDataSource |
|
IOGeneratorTask |
|
RandomDeviceReader |
|
ReadImageTask |
|
Task |
The Task represents the fundamental unit of processing work in a DAG. |
ValueTask |
|
WorkQueue |
A generic queue from which DAG tasks will be taken and scheduled. |
DummyDSTraits |
|
LocalityHint |
Details for placement of a task on specific resources. |
ResourceRequirements |
A representation of resource availability and concurrency tokens for task throttling. |
Enumerations
Section titled “Enumerations”| Name | Description |
|---|---|
ShmemType |
Enumerators to indicate the specificity of shared memory to use. |
ShmemType
Section titled “ShmemType”enum ShmemTypeEnumerators to indicate the specificity of shared memory to use.
When creating shared-memory partitions, the allocation can be created to be shared at varying levels of specificity and inclusion. At the top, the allocation is shared across the entire machine. However, it can be created to only be used by a smaller subset, e.g., by ranks associated to a NUMA domain.
| Value | Description |
|---|---|
MACHINE |
Whole node/machine shared memory. |
SOCKET |
By hardware socket. |
NUMA |
By NUMA domain. |
L3CACHE |
Sharing L3 cache. |
L2CACHE |
Sharing L2 cache. |
Typedefs
Section titled “Typedefs”| Return | Name | Description |
|---|---|---|
std::vector< ssize_t > |
ShapeKey |
Alias for the definition of an array’s shape - used mostly for buffer pools. |
std::tuple< numa_node_t, ShapeKey, ncarray::DType > |
PoolKey |
Alias for look-up of buffer pools by node locality, shape and datatype. |
sbio::RC< MPI_Win, sbio::MPIWinAllocator, sbio::MPIWinDeleter > |
RCWindow |
|
int |
numa_node_t |
ShapeKey
Section titled “ShapeKey”using ShapeKey = std::vector< ssize_t >Alias for the definition of an array’s shape - used mostly for buffer pools.
PoolKey
Section titled “PoolKey”using PoolKey = std::tuple< numa_node_t, ShapeKey, ncarray::DType >Alias for look-up of buffer pools by node locality, shape and datatype.
RCWindow
Section titled “RCWindow”using RCWindow = sbio::RC< MPI_Win, sbio::MPIWinAllocator, sbio::MPIWinDeleter >numa_node_t
Section titled “numa_node_t”using numa_node_t = intFunctions
Section titled “Functions”| Return | Name | Description |
|---|---|---|
void |
prepare_shmem_mpi_algo |
Setup an Algorithm using a shared-memory MPI strategy. |
numa_node_t |
get_current_thread_numa_node inline |
|
auto |
make_read_image_task |
prepare_shmem_mpi_algo
Section titled “prepare_shmem_mpi_algo”template<class Algo> void prepare_shmem_mpi_algo(Algo & algo, RCWindow & window, std::vector< MPI_Comm > & shmem_comms, MPI_Comm main_comm = MPI_COMM_WORLD, ShmemType shmem_type = ShmemType::MACHINE)Setup an Algorithm using a shared-memory MPI strategy.
Algorithms which require some staged data (e.g. constant matrices) can be setup to use various MPI shared communication strategies. Doing so, however, requires preparing the memory backing this data in a particular fashion. This function simplifies this process, setting up any needed communicators as well as ensuring proper synchronization so the memory will be valid for use by an rank running the Algorithm.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
algo |
Algo & |
The Algorithm to run the data staging for. |
window |
[RCWindow](#rcwindow) & |
The window which will back the shared, staged data. |
shmem_comms |
std::vector< MPI_Comm > & |
Any created communicators will be returned via this vector. |
main_comm |
MPI_Comm |
The starting communicator from which splitting will be done. |
shmem_type |
[ShmemType](#shmemtype) |
The granularity of the shared memory backing strategy. The enumerator specifies from machine/node down to cache level. |
get_current_thread_numa_node
Section titled “get_current_thread_numa_node”inline
inline numa_node_t get_current_thread_numa_node()make_read_image_task
Section titled “make_read_image_task”template<class DataSource, class DataFetcher, class MemTag = ncarray::HostTag> auto make_read_image_task(DataSource & ds, DataFetcher && fetcher, typename DataSource::DataFormat::StepIdxType idx)Variables
Section titled “Variables”| Return | Name | Description |
|---|---|---|
constexpr numa_node_t |
ANY_NODE constexpr |
|
thread_local numa_node_t |
g_current_numa_node |
ANY_NODE
Section titled “ANY_NODE”constexpr
constexpr numa_node_t ANY_NODE { -1 }g_current_numa_node
Section titled “g_current_numa_node”thread_local numa_node_t g_current_numa_node { }