Which calculator group evaluates which system. More...
#include <GroupSchedule.h>
Public Member Functions | |
| GroupSchedule (int groups) | |
| int | groups () const noexcept |
| int | defaultHome (std::int64_t key, long position) const |
| The home of a key never seen: key mod G for a key of zero or more, the batch position mod G otherwise. | |
| std::vector< int > | assign (const std::vector< std::int64_t > &keys) |
| Groups for a batch of systems with these keys. | |
| void | record (std::int64_t key, const double *positions, long n3, const double *cell=nullptr) |
| Remember the geometry a key was last evaluated at. | |
| int | nearest (const double *positions, long n3, const double *cell=nullptr) const |
| The group for a single request: the home of the recorded geometry nearest to positions (root-mean-square over coordinates), group 0 when nothing of this size is recorded. | |
| void | settle (std::int64_t key, int group) |
| A single request's group becomes the home of the single-request key. | |
Private Member Functions | |
| int | homeOf (std::int64_t key, long position) const |
Private Attributes | |
| int | groups_ |
| std::map< std::int64_t, int > | home_ |
| std::map< std::int64_t, std::vector< double > > | last_ |
| std::map< std::int64_t, std::vector< double > > | cells_ |
Which calculator group evaluates which system.
A group keeps the converged orbitals of every system it evaluated, under the system's key (a NEB image, a ring bead). Sending a key back to the group that holds its orbitals is what makes the next SCF warm, so a key stays on its home group. A batch caps each group at ceil(M / G) systems: a key whose home group is full moves to the least-loaded group, which becomes its home, because one extra evaluation on a full group costs a whole SCF while a move costs the difference between a warm and a cooler start. A single request goes to the group that last evaluated the geometry nearest to it.
Every decision is made on the driver and sent to the other ranks, so the state here lives on the driver only.
Definition at line 39 of file GroupSchedule.h.
|
inlineexplicit |
Definition at line 41 of file GroupSchedule.h.
|
inlinenodiscard |
Groups for a batch of systems with these keys.
Definition at line 53 of file GroupSchedule.h.
|
inlinenodiscard |
The home of a key never seen: key mod G for a key of zero or more, the batch position mod G otherwise.
Definition at line 47 of file GroupSchedule.h.
|
inlinenodiscardnoexcept |
Definition at line 43 of file GroupSchedule.h.
|
inlinenodiscardprivate |
Definition at line 128 of file GroupSchedule.h.
|
inlinenodiscard |
The group for a single request: the home of the recorded geometry nearest to positions (root-mean-square over coordinates), group 0 when nothing of this size is recorded.
Definition at line 92 of file GroupSchedule.h.
|
inline |
Remember the geometry a key was last evaluated at.
Definition at line 79 of file GroupSchedule.h.
|
inline |
A single request's group becomes the home of the single-request key.
Definition at line 125 of file GroupSchedule.h.
|
private |
Definition at line 136 of file GroupSchedule.h.
|
private |
Definition at line 133 of file GroupSchedule.h.
|
private |
Definition at line 134 of file GroupSchedule.h.
|
private |
Definition at line 135 of file GroupSchedule.h.