Dagger Types
Dagger.AnyScope
Dagger.ArrayDomain
Dagger.Blocks
Dagger.Context
Dagger.DArray
Dagger.EagerThunk
Dagger.Events.BytesAllocd
Dagger.Events.ProcessorSaturation
Dagger.Events.WorkerSaturation
Dagger.ExactScope
Dagger.NodeScope
Dagger.OSProc
Dagger.ProcessScope
Dagger.Processor
Dagger.TaintScope
Dagger.ThreadProc
Dagger.Thunk
Dagger.UnionScope
Dagger.UnitDomain
Dagger.ProcessorTypeScope
Task Types
Dagger.Thunk
— TypeThunk
Wraps a callable object to be run with Dagger. A Thunk
is typically created through a call to delayed
or its macro equivalent @par
.
Constructors
delayed(f; kwargs...)(args...)
@par [option=value]... f(args...)
Examples
julia> t = delayed(sin)(π) # creates a Thunk to be computed later
Thunk(sin, (π,))
julia> collect(t) # computes the result and returns it to the current process
1.2246467991473532e-16
Arguments
f
: The function to be called upon execution of theThunk
.args
: The arguments to be passed to theThunk
.kwargs
: The properties describing unique behavior of thisThunk
. Details
for each property are described in the next section.
option=value
: The same as passingkwargs
todelayed
.
Public Properties
meta::Bool=false
: Iftrue
, instead of fetching cached arguments from
Chunk
s and passing the raw arguments to f
, instead pass the Chunk
. Useful for doing manual fetching or manipulation of Chunk
references. Non-Chunk
arguments are still passed as-is.
processor::Processor=OSProc()
- The processor associated withf
. Useful if
f
is a callable struct that exists on a given processor and should be transferred appropriately.
scope::Dagger.AbstractScope=DefaultScope()
- The scope associated withf
.
Useful if f
is a function or callable struct that may only be transferred to, and executed within, the specified scope.
Options
options
: ASch.ThunkOptions
struct providing the options for theThunk
.
If omitted, options can also be specified by passing key-value pairs as kwargs
.
Dagger.EagerThunk
— TypeEagerThunk
Returned from spawn
/@spawn
calls. Represents a task that is in the scheduler, potentially ready to execute, executing, or finished executing. May be fetch
'd or wait
'd on at any time.
Task Options Types
Options
Sch.ThunkOptions
Sch.SchedulerOptions
Data Management Types
Chunk
Shard
Processor Types
Dagger.Processor
— TypeProcessor
An abstract type representing a processing device and associated memory, where data can be stored and operated on. Subtypes should be immutable, and instances should compare equal if they represent the same logical processing device/memory. Subtype instances should be serializable between different nodes. Subtype instances may contain a "parent" Processor
to make it easy to transfer data to/from other types of Processor
at runtime.
Dagger.OSProc
— TypeOSProc <: Processor
Julia CPU (OS) process, identified by Distributed pid. The logical parent of all processors on a given node, but otherwise does not participate in computations.
Dagger.ThreadProc
— TypeThreadProc <: Processor
Julia CPU (OS) thread, identified by Julia thread ID.
Scope Types
Dagger.AnyScope
— TypeWidest scope that contains all processors.
Dagger.NodeScope
— TypeScoped to the same physical node.
Dagger.ProcessScope
— TypeScoped to the same OS process.
Dagger.ProcessorTypeScope
— FunctionScoped to any processor with a given supertype.
Dagger.TaintScope
— TypeTaints a scope for later evaluation.
Dagger.UnionScope
— TypeUnion of two or more scopes.
Dagger.ExactScope
— TypeScoped to a specific processor.
Context Types
Dagger.Context
— TypeContext(xs::Vector{OSProc}) -> Context
Context(xs::Vector{Int}) -> Context
Create a Context, by default adding each available worker.
It is also possible to create a Context from a vector of OSProc
, or equivalently the underlying process ids can also be passed directly as a Vector{Int}
.
Special fields include:
- 'log_sink': A log sink object to use, if any.
log_file::Union{String,Nothing}
: Path to logfile. If specified, at
scheduler termination, logs will be collected, combined with input thunks, and written out in DOT format to this location.
profile::Bool
: Whether or not to perform profiling with Profile stdlib.
Array Types
Dagger.DArray
— TypeDArray{T,N,F}(domain, subdomains, chunks, concat)
DArray(T, domain, subdomains, chunks, [concat=cat])
An N-dimensional distributed array of element type T, with a concatenation function of type F.
Arguments
T
: element typedomain::ArrayDomain{N}
: the whole ArrayDomain of the arraysubdomains::AbstractArray{ArrayDomain{N}, N}
: aDomainBlocks
of the same dimensions as the arraychunks::AbstractArray{Union{Chunk,Thunk}, N}
: an array of chunks of dimension Nconcat::F
: a function of typeF
.concat(x, y; dims=d)
takes two chunksx
andy
and concatenates them along dimensiond
.cat
is used by default.
Dagger.Blocks
— TypeBlocks(xs...)
Indicates the size of an array operation, specified as xs
, whose length indicates the number of dimensions in the resulting array.
Dagger.ArrayDomain
— TypeArrayDomain{N}
An N
-dimensional domain over an array.
Dagger.UnitDomain
— TypeUnitDomain
Default domain – has no information about the value
Logging Event Types
Dagger.Events.BytesAllocd
— TypeBytesAllocd
Tracks memory allocated for Chunk
s.
Dagger.Events.ProcessorSaturation
— TypeProcessorSaturation
Tracks the compute saturation (running tasks) per-processor.
Dagger.Events.WorkerSaturation
— TypeWorkerSaturation
Tracks the compute saturation (running tasks).