Skip to content

scheduling

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.
Name Description
ShmemType Enumerators to indicate the specificity of shared memory to use.

enum ShmemType

Enumerators 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.
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

using ShapeKey = std::vector< ssize_t >

Alias for the definition of an array’s shape - used mostly for buffer pools.


using PoolKey = std::tuple< numa_node_t, ShapeKey, ncarray::DType >

Alias for look-up of buffer pools by node locality, shape and datatype.


using RCWindow = sbio::RC< MPI_Win, sbio::MPIWinAllocator, sbio::MPIWinDeleter >

using numa_node_t = int
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

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.

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.

inline

inline numa_node_t get_current_thread_numa_node()

template<class DataSource, class DataFetcher, class MemTag = ncarray::HostTag> auto make_read_image_task(DataSource & ds, DataFetcher && fetcher, typename DataSource::DataFormat::StepIdxType idx)
Return Name Description
constexpr numa_node_t ANY_NODE constexpr
thread_local numa_node_t g_current_numa_node

constexpr

constexpr numa_node_t ANY_NODE { -1 }

thread_local numa_node_t g_current_numa_node { }