|
ADS-IDAC Engine 5.0.0
|
Namespaces | |
| namespace | merge |
| namespace | pe |
Classes | |
| struct | RestartLayout |
| Byte offsets of the structural landmarks in a restart buffer. An offset is meaningful only when its have_* flag is true. More... | |
Functions | |
| template<class Archive , class T > | |
| void | save_array_state (Archive &ar, const std::vector< std::unique_ptr< T > > &v) |
| template<class Archive , class T > | |
| void | load_array_state (Archive &ar, std::vector< std::unique_ptr< T > > &v, const char *what) |
| void | fingerprint_feed (uint64_t &h, const char *data, size_t n) |
Fold n bytes at data into the running 64-bit FNV-1a hash h (xor the byte, then multiply by the FNV prime 1099511628211). More... | |
| void | fingerprint_feed_file (uint64_t &h, const std::filesystem::path &p) |
Fold the contents of file p into h, read in 64 KiB blocks. A file that cannot be opened contributes nothing and is not reported. More... | |
| uint64_t | compute_config_fingerprint (const std::string &project_dir, const std::string &deck_path) |
| Digest the configuration inputs of a project. More... | |
| RestartLayout | scan_restart (const std::vector< char > &buf, std::int32_t want) |
| Walk the record chain and locate the header, the base dump and the target dump. More... | |
| bool | has_complete_restart (const std::vector< char > &buf) |
| Does this buffer contain a complete restart dump (the base)? More... | |
| std::vector< char > | extract_header_and_base (const std::vector< char > &buf) |
[header][complete base], the run-wide constant that is cached per rank and published as <project>/restart_base.bin. More... | |
| std::vector< char > | extract_record_no_base (const std::vector< char > &buf, std::int32_t want) |
[header][target], the wire payload with the base omitted. More... | |
| std::vector< char > | splice_base (const std::vector< char > &hdr_base, const std::vector< char > &body) |
| Put the cached base back in front of a base-less transfer. More... | |
| std::vector< char > | extract_restart_record (const std::vector< char > &buf, std::int32_t want) |
[header][complete base][target]: self-contained, no cache needed. More... | |
| const Procedures * | shared_procedures () |
| void | set_shared_procedures (const Procedures *master) |
| const ControlPanel * | shared_control_panel () |
| void | set_shared_control_panel (const ControlPanel *master) |
| const KB * | shared_kb (int operator_type) |
| void | set_shared_kb (int operator_type, const KB *master) |
| const EventSymptomMatrix * | shared_diagnosis_matrix (int operator_type) |
| void | set_shared_diagnosis_matrix (int operator_type, const EventSymptomMatrix *master) |
|
inline |
Digest the configuration inputs of a project.
Feeds, in ascending order of the key, each file's key followed by its bytes. The key is the file's path relative to project_dir (computed lexically, '/' separators); a file outside the project, such as a deck stored elsewhere, is keyed by its file name alone. A deck located under Input/ is listed twice (as the deck and by the Input/ sweep) and is fed twice, which is deterministic. Files that do not exist are skipped, so the result is never an error: a project with none of the inputs yields the FNV offset basis 1469598103934665603. Reads files only; safe to call concurrently from several ranks.
| project_dir | Project directory (holds ZCtrlPar.txt and Input/). |
| deck_path | Input deck path, absolute or relative to the working directory; empty = no deck. |
Definition at line 65 of file ConfigFingerprint.h.
References e, fingerprint_feed(), and fingerprint_feed_file().
Referenced by Scheduler::initiationForSimulation().
|
inline |
[header][complete base], the run-wide constant that is cached per rank and published as <project>/restart_base.bin.
buf has no dump or no complete dump. Definition at line 113 of file RestartTrim.h.
References adsidac::RestartLayout::base, adsidac::RestartLayout::base_end, adsidac::RestartLayout::have_base, adsidac::RestartLayout::have_header, adsidac::RestartLayout::header_end, and scan_restart().
Referenced by AdsidacCallback::onBranchingPoint(), RelapSolver::restore(), and Client::restore_buffer().
|
inline |
[header][target], the wire payload with the base omitted.
If the target is itself the base dump, the result contains it and is self-contained.
| buf | Full restart buffer. |
| want | ncount of the dump to keep (the value card 103 selects on). |
Definition at line 132 of file RestartTrim.h.
References adsidac::RestartLayout::have_header, adsidac::RestartLayout::have_target, adsidac::RestartLayout::header_end, scan_restart(), adsidac::RestartLayout::target, and adsidac::RestartLayout::target_end.
Referenced by AdsidacCallback::onBranchingPoint().
|
inline |
[header][complete base][target]: self-contained, no cache needed.
When the target is the base dump it is emitted once. Not called by the engine, which ships [header][target] (extract_record_no_base).
Definition at line 168 of file RestartTrim.h.
References adsidac::RestartLayout::base, adsidac::RestartLayout::base_end, adsidac::RestartLayout::have_base, adsidac::RestartLayout::have_header, adsidac::RestartLayout::have_target, adsidac::RestartLayout::header_end, scan_restart(), adsidac::RestartLayout::target, and adsidac::RestartLayout::target_end.
|
inline |
Fold n bytes at data into the running 64-bit FNV-1a hash h (xor the byte, then multiply by the FNV prime 1099511628211).
Definition at line 34 of file ConfigFingerprint.h.
Referenced by compute_config_fingerprint(), and fingerprint_feed_file().
|
inline |
Fold the contents of file p into h, read in 64 KiB blocks. A file that cannot be opened contributes nothing and is not reported.
Definition at line 43 of file ConfigFingerprint.h.
References fingerprint_feed().
Referenced by compute_config_fingerprint().
|
inline |
Does this buffer contain a complete restart dump (the base)?
The test is presence anywhere in the buffer, not position. Callers use it to tell a self-contained buffer from a base-less [header][target] transfer, which RELAP cannot restore until the base is spliced back on.
Definition at line 105 of file RestartTrim.h.
References adsidac::RestartLayout::have_base, and scan_restart().
Referenced by RelapSolver::restore(), and Client::restore_buffer().
| void adsidac::load_array_state | ( | Archive & | ar, |
| std::vector< std::unique_ptr< T > > & | v, | ||
| const char * | what | ||
| ) |
Definition at line 24 of file PanelOverlayIO.h.
References e.
Referenced by ControlPanelAlarm::load(), ControlPanelControl::load(), and ControlPanelDisplay::load().
| void adsidac::save_array_state | ( | Archive & | ar, |
| const std::vector< std::unique_ptr< T > > & | v | ||
| ) |
Definition at line 16 of file PanelOverlayIO.h.
References e.
Referenced by ControlPanelAlarm::save(), ControlPanelControl::save(), and ControlPanelDisplay::save().
|
inline |
Walk the record chain and locate the header, the base dump and the target dump.
The walk stops, keeping what it has found, at a negative record length or a record that would run past the end of the buffer.
| buf | Restart buffer in the layout described above. |
| want | ncount of the dump to locate; pass -1 (any negative value) to locate no target. |
Definition at line 70 of file RestartTrim.h.
References adsidac::RestartLayout::base, adsidac::RestartLayout::base_end, adsidac::RestartLayout::have_base, adsidac::RestartLayout::have_header, adsidac::RestartLayout::have_target, adsidac::RestartLayout::header_end, adsidac::RestartLayout::target, and adsidac::RestartLayout::target_end.
Referenced by extract_header_and_base(), extract_record_no_base(), extract_restart_record(), has_complete_restart(), and splice_base().
| void adsidac::set_shared_control_panel | ( | const ControlPanel * | master | ) |
Definition at line 15 of file SharedConfig.cpp.
Referenced by Client::Client(), main(), AdsidacCallback::onFirstInit(), and Server::Simulation().
| void adsidac::set_shared_diagnosis_matrix | ( | int | operator_type, |
| const EventSymptomMatrix * | master | ||
| ) |
Definition at line 37 of file SharedConfig.cpp.
References sim::Operator::ODM.
Referenced by Client::Client(), main(), AdsidacCallback::onFirstInit(), and Server::Simulation().
| void adsidac::set_shared_kb | ( | int | operator_type, |
| const KB * | master | ||
| ) |
Definition at line 25 of file SharedConfig.cpp.
References sim::Operator::ODM.
Referenced by Client::Client(), main(), AdsidacCallback::onFirstInit(), and Server::Simulation().
| void adsidac::set_shared_procedures | ( | const Procedures * | master | ) |
Definition at line 12 of file SharedConfig.cpp.
Referenced by Client::Client(), main(), AdsidacCallback::onFirstInit(), and Server::Simulation().
| const ControlPanel * adsidac::shared_control_panel | ( | ) |
Definition at line 14 of file SharedConfig.cpp.
Referenced by ControlPanel::load().
| const EventSymptomMatrix * adsidac::shared_diagnosis_matrix | ( | int | operator_type | ) |
Definition at line 34 of file SharedConfig.cpp.
References sim::Operator::ODM.
Referenced by Operator::seedDiagnosisMatrixFromMaster().
| const KB * adsidac::shared_kb | ( | int | operator_type | ) |
Definition at line 22 of file SharedConfig.cpp.
References sim::Operator::ODM.
Referenced by Operator::seedKnowledgeBaseFromMaster().
| const Procedures * adsidac::shared_procedures | ( | ) |
Definition at line 11 of file SharedConfig.cpp.
Referenced by Procedures::load().
|
inline |
Put the cached base back in front of a base-less transfer.
hdr_base is [header][base]; body is [header][target]. The header is a run-wide constant too, so the result is hdr_base followed by body's portion after its own header. hdr_base is copied as is, without checks.
[header][base][target], or empty if no dump is found in body. Definition at line 150 of file RestartTrim.h.
References adsidac::RestartLayout::have_header, adsidac::RestartLayout::header_end, and scan_restart().
Referenced by RelapSolver::restore(), and Client::restore_buffer().