One step's oracle points shared out over the ranks of a communicator, with a layout-independent owner map. More...
#include <Eigen/Dense>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | pot::OracleBatchLayout |
| How a step's oracle points are shared out. More... | |
| struct | pot::OracleBatchOutcome |
Namespaces | |
| namespace | pot |
| Potential wrappers and the batched oracle interface. | |
Typedefs | |
| using | pot::OracleBatchComm = int |
Enumerations | |
| enum class | pot::OracleBatchStatus : int { pot::Ok = 0 , pot::Failed = 1 , pot::Restart = 2 , pot::WallClockLimit = 3 } |
| What one rank reports about its groups before the value collectives. More... | |
Functions | |
| OracleBatchComm | pot::oracleBatchWorld () noexcept |
| The communicator of the whole run, or the no-MPI placeholder. | |
| int | pot::oracleBatchOwner (Eigen::Index point, Eigen::Index count, const OracleBatchLayout &layout) noexcept |
Owner rank of one point of a batch of count points. | |
| std::vector< std::vector< Eigen::Index > > | pot::ownedOracleGroups (Eigen::Index count, const OracleBatchLayout &layout) |
| The groups this rank evaluates, each one batch call, in point order. | |
| OracleBatchOutcome | pot::agreeOracleBatchStatus (OracleBatchStatus local_status, const std::string &local_message, const OracleBatchLayout &layout) |
| void | pot::allreduceOwnedOracleValues (std::vector< double > &energies, Eigen::MatrixXd &gradients, const OracleBatchLayout &layout, double *communication_seconds) |
| void | pot::allreduceOwnedOracleMask (std::vector< char > &accepted, const OracleBatchLayout &layout) |
One step's oracle points shared out over the ranks of a communicator, with a layout-independent owner map.
Every band image, stencil displacement and probe a step needs is one point of a batch. The batch is cut into groups; each group is owned by one rank and evaluated there in one call, through the potential's batch surface where it has one. The owner map is a function of the point index and the layout alone, so the point a rank evaluates never depends on timing, and the values every rank holds afterwards are the owner's values bit for bit. A bitwise union preserves each owner's binary64 representation, including signed zero.
Two policies decide the groups, see OracleBatchLayout::chunk. A failure on any owner is agreed on by every rank before a value collective, so no rank waits in a reduction for a rank that left through an exception.
Definition in file OracleBatch.h.