Loading...
Searching...
No Matches
eonc::CalculatorGroupUse Struct Reference

How a job used its calculator groups: the seconds each group spent inside engine calls, the systems it evaluated, and the driver's wall time inside grouped requests. More...

#include <CalculatorGroupUse.h>

Public Member Functions

std::size_t groups () const noexcept
double meanBusy () const noexcept
double maxBusy () const noexcept
double loadBalance () const noexcept
 Mean over max busy time: 1 when every group carried the same work.
double communicationEfficiency () const noexcept
 Max busy over wall: the share of the driver's wait that the busiest group spent computing.
double parallelEfficiency () const noexcept
double idleFraction (std::size_t group) const noexcept
 Fraction of the grouped wall time a group spent outside engine calls.
std::string table () const

Public Attributes

std::vector< double > busy
 seconds in engine calls, per group
std::vector< double > systems
 systems evaluated, per group
double wall {0.0}
 driver seconds inside grouped requests
double singleWall {0.0}
 of which single-system requests
long batches {0}
 grouped batch requests
long singles {0}
 single-system requests (group 0 only)

Detailed Description

How a job used its calculator groups: the seconds each group spent inside engine calls, the systems it evaluated, and the driver's wall time inside grouped requests.

The ratios follow the POP parallel efficiency model: parallel efficiency is load balance times communication efficiency.

Definition at line 28 of file CalculatorGroupUse.h.

Member Function Documentation

◆ communicationEfficiency()

double eonc::CalculatorGroupUse::communicationEfficiency ( ) const
inlinenodiscardnoexcept

Max busy over wall: the share of the driver's wait that the busiest group spent computing.

Waits for a slower group in one batch, serial requests on group 0 and the result broadcasts all lower it.

Definition at line 59 of file CalculatorGroupUse.h.

59 {
60 return wall > 0.0 ? std::min(1.0, maxBusy() / wall) : 1.0;
61 }
double maxBusy() const noexcept
double wall
driver seconds inside grouped requests

◆ groups()

std::size_t eonc::CalculatorGroupUse::groups ( ) const
inlinenodiscardnoexcept

Definition at line 36 of file CalculatorGroupUse.h.

36{ return busy.size(); }
std::vector< double > busy
seconds in engine calls, per group

◆ idleFraction()

double eonc::CalculatorGroupUse::idleFraction ( std::size_t group) const
inlinenodiscardnoexcept

Fraction of the grouped wall time a group spent outside engine calls.

Definition at line 68 of file CalculatorGroupUse.h.

68 {
69 if (group >= busy.size() || wall <= 0.0) {
70 return 0.0;
71 }
72 return std::clamp(1.0 - busy[group] / wall, 0.0, 1.0);
73 }

◆ loadBalance()

double eonc::CalculatorGroupUse::loadBalance ( ) const
inlinenodiscardnoexcept

Mean over max busy time: 1 when every group carried the same work.

Definition at line 51 of file CalculatorGroupUse.h.

51 {
52 const double m = maxBusy();
53 return m > 0.0 ? meanBusy() / m : 1.0;
54 }
double meanBusy() const noexcept

◆ maxBusy()

double eonc::CalculatorGroupUse::maxBusy ( ) const
inlinenodiscardnoexcept

Definition at line 46 of file CalculatorGroupUse.h.

46 {
47 return busy.empty() ? 0.0 : *std::max_element(busy.begin(), busy.end());
48 }

◆ meanBusy()

double eonc::CalculatorGroupUse::meanBusy ( ) const
inlinenodiscardnoexcept

Definition at line 38 of file CalculatorGroupUse.h.

38 {
39 if (busy.empty()) {
40 return 0.0;
41 }
42 return std::accumulate(busy.begin(), busy.end(), 0.0) /
43 static_cast<double>(busy.size());
44 }

◆ parallelEfficiency()

double eonc::CalculatorGroupUse::parallelEfficiency ( ) const
inlinenodiscardnoexcept

Definition at line 63 of file CalculatorGroupUse.h.

63 {
65 }
double communicationEfficiency() const noexcept
Max busy over wall: the share of the driver's wait that the busiest group spent computing.
double loadBalance() const noexcept
Mean over max busy time: 1 when every group carried the same work.

◆ table()

std::string eonc::CalculatorGroupUse::table ( ) const
inlinenodiscard

Definition at line 75 of file CalculatorGroupUse.h.

75 {
76 std::string out = std::format(
77 "calculator groups: {} groups, {} batches and {} single requests, "
78 "{:.1f} s grouped wall ({:.1f} s single)\n",
80 out += std::format("{:>6} {:>8} {:>10} {:>6}\n", "group", "systems",
81 "busy_s", "idle");
82 for (std::size_t g = 0; g < busy.size(); ++g) {
83 const double n = g < systems.size() ? systems[g] : 0.0;
84 out += std::format("{:>6} {:>8.0f} {:>10.2f} {:>5.1f}%\n", g, n, busy[g],
85 100.0 * idleFraction(g));
86 }
87 out += std::format("load balance {:.3f}, communication efficiency {:.3f}, "
88 "parallel efficiency {:.3f}\n",
91 return out;
92 }
double idleFraction(std::size_t group) const noexcept
Fraction of the grouped wall time a group spent outside engine calls.
double singleWall
of which single-system requests
long singles
single-system requests (group 0 only)
double parallelEfficiency() const noexcept
std::vector< double > systems
systems evaluated, per group
long batches
grouped batch requests
std::size_t groups() const noexcept

Member Data Documentation

◆ batches

long eonc::CalculatorGroupUse::batches {0}

grouped batch requests

Definition at line 33 of file CalculatorGroupUse.h.

33{0};

◆ busy

std::vector<double> eonc::CalculatorGroupUse::busy

seconds in engine calls, per group

Definition at line 29 of file CalculatorGroupUse.h.

◆ singles

long eonc::CalculatorGroupUse::singles {0}

single-system requests (group 0 only)

Definition at line 34 of file CalculatorGroupUse.h.

34{0};

◆ singleWall

double eonc::CalculatorGroupUse::singleWall {0.0}

of which single-system requests

Definition at line 32 of file CalculatorGroupUse.h.

32{0.0};

◆ systems

std::vector<double> eonc::CalculatorGroupUse::systems

systems evaluated, per group

Definition at line 30 of file CalculatorGroupUse.h.

◆ wall

double eonc::CalculatorGroupUse::wall {0.0}

driver seconds inside grouped requests

Definition at line 31 of file CalculatorGroupUse.h.

31{0.0};

The documentation for this struct was generated from the following file: