/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/integration/map_scheduler.hh Source File#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
map_scheduler.hh
Go to the documentation of this file.
65 inline const char *to_string(const MapResource r) { return r == MapResource::host ? "host" : "device"; }
240 MapSlice schedule(size_t integrator_id, void *dest, size_t elem_size, size_t grid_size, size_t quadrature_volume,
Definition map_scheduler.hh:207
bool m_batched
Whether a DeferredMaps scope is open; see set_batched().
Definition map_scheduler.hh:334
double quantum() const
The explicit override, or 0 when the automatic defaults are in force.
Definition map_scheduler.hh:278
static size_t part(size_t grid_size, size_t r, size_t j)
Canonical partition: slice j of r covers [part(G, r, j), part(G, r, j + 1)).
Definition map_scheduler.hh:318
void set_quantum(double quantum)
static constexpr size_t verify_head
Batches at the start of a run that are always verified, whatever m_verify_every says.
Definition map_scheduler.hh:342
std::vector< uint > least_loaded(size_t r, MapResource resource) const
MapSlice schedule(size_t integrator_id, void *dest, size_t elem_size, size_t grid_size, size_t quadrature_volume, bool splittable, MapTarget target)
Register one map() call and return this rank's slice of it.
MapScheduler()
MapScheduler(uint rank, uint n_ranks)
Bind to an explicit rank and rank count instead of MPI_COMM_WORLD.
void finish_batch()
Land every other rank's slices out of the receive buffer, then close the batch.
void reset_load()
Zero every resource budget, sized to the rank count.
void set_batched(const bool batched)
Tell the scheduler whether the caller has a deferral scope open.
Definition map_scheduler.hh:272
void log_plan() const
bool m_simulated
Simulated instances (see the rank/n_ranks constructor) never communicate.
Definition map_scheduler.hh:352
double m_quantum_override
0 == no override, use the hardware-derived per-space thresholds.
Definition map_scheduler.hh:331
bool plan_contains(size_t integrator_id) const
static MapScheduler & instance()
uint64_t plan_hash() const
void poison(const char *reason)
std::array< std::vector< double >, n_map_resources > m_load
Definition map_scheduler.hh:350
void complete()
Exchange every slice registered since the last completion.
bool prepare_batch()
Decides, without any user input, which rank computes which part of each map().
Definition map_scheduler.hh:195
NoMapsHere(const NoMapsHere &)=delete
NoMapsHere & operator=(const NoMapsHere &)=delete
~NoMapsHere()
NoMapsHere()
constexpr double launch_threshold
Evaluations below which a slice cannot pay for the launch that computes it.
Definition map_scheduler.hh:50
double host_fill_threshold()
double device_fill_threshold()
Kernel evaluations needed to saturate one rank's compute resource.
Definition complex_math.hh:10
const char * to_string(const ThreadSource source)
The name of a thread-count source, as it appears in the precedence warning.
double map_fill_threshold()
The fill threshold alone, for callers that do not need the resource class.
Definition map_scheduler.hh:89
MapResource
The physical resource a map() competes for.
Definition map_scheduler.hh:62
@ device
MapTarget map_target()
The scheduling target of an execution space, selected at compile time.
Definition map_scheduler.hh:80
Definition map_scheduler.hh:307
std::vector< uint > owners
The r owning ranks, ascending. Slice j of the grid belongs to owners[j].
Definition map_scheduler.hh:314
This rank's window into the external grid of one QuadratureIntegrator::map() call.
Definition map_scheduler.hh:97
bool owns_all(const size_t grid_size) const
Definition map_scheduler.hh:103
size_t count
Number of grid points; 0 means this rank does not participate in this map().
Definition map_scheduler.hh:101
size_t offset
First external grid point this rank computes.
Definition map_scheduler.hh:99
Which resource a map() runs on and how many evaluations saturate one rank's share of it.
Definition map_scheduler.hh:68
Generated by