|
ADS-IDAC Engine 5.0.0
|
#include "ADSIDAC.h"#include "Solver/RelapSolver.h"#include "Solver/RestApiSolver.h"#include "Solver/AdsidacCallback.h"#include "Notification/Notification.h"#include "Global/DETCheckpoint.h"#include "Global/SharedConfig.h"#include "Global/CheckedIO.h"#include <algorithm>#include <fstream>#include <sstream>#include <memory>#include <cassert>#include <chrono>#include <csignal>#include "Global/PEOutput.h"#include "Global/OutputMerge.h"#include <iomanip>#include <thread>Go to the source code of this file.
Macros | |
| #define | _CONSOLE |
Functions | |
| static void | sigusr1_handler (int) |
| static void | sigint_handler (int) |
| static int | show_interrupt_menu (int seq_completed) |
| static DETCheckpoint | build_serial_checkpoint (int seq_completed) |
| static std::string | compute_ancestry_path () |
| static void | log_seq_fingerprint (double term_time) |
| static int | run_merge_only (int argc, char *argv[]) |
| int | main (int argc, char *argv[]) |
| void | interfc_ () |
| Called every RELAP5 timestep from dtstep.f. Triggers crew/diagnosis decisions. More... | |
| void | actte_ () |
| Execute crew actions at each timestep. More... | |
| void | secini_ () |
| Security initialization callback. More... | |
| void | actonce_ () |
| Execute crew actions once per transient. More... | |
| void | initiate_branching_ () |
| void | restartforanewsequence_ () |
| Find next unexplored branch, generate indeck.i restart input. More... | |
| void | initiationforrestart_ () |
| Initialize restart mode for next sequence. More... | |
| void | mutiproactonce_ () |
| void | setrnode_ () |
| Set restart node information in r5pars_. More... | |
| void | outputErrMessageToFile (string str) |
Variables | |
| static std::unique_ptr< ThermalHydraulicSolver > | solver_ptr |
| static ThermalHydraulicSolver * | solver_raw = nullptr |
| AdsidacCallback | engine_callback |
| static volatile sig_atomic_t | checkpoint_requested = 0 |
| static volatile sig_atomic_t | sigint_received = 0 |
| #define _CONSOLE |
Definition at line 24 of file ADSIDAC.cpp.
| void actonce_ | ( | ) |
Execute crew actions once per transient.
Definition at line 592 of file ADSIDAC.cpp.
References getActiveSolver(), and getActiveSolverCallback().
| void actte_ | ( | ) |
Execute crew actions at each timestep.
Definition at line 580 of file ADSIDAC.cpp.
References getActiveSolver(), and getActiveSolverCallback().
|
static |
Definition at line 62 of file ADSIDAC.cpp.
References SimulationContext::Branch_center, BranchRecord::branch_cluster, PendingBranch::branch_index, DETCheckpoint::capture_branch_center(), PendingBranch::cid, DETCheckpoint::cid_source, SimulationContext::cid_to_source_sequence, DETCheckpoint::compress_queue, DETCheckpoint::config_fingerprint, SimulationContext::config_fingerprint, g_sim, BranchRecord::getIDOfRecentGeneratedBranch(), BranchRecord::getIDOfRecentGeneratedES(), DETCheckpoint::max_branch_id, DETCheckpoint::pending_tasks, read_file_verified(), SimulationContext::restart_buffers, SimulationContext::restart_info, restart_path(), DETCheckpoint::restart_states, DETCheckpoint::sequence_counter, DETCheckpoint::sequences_completed, DETCheckpoint::source_blobs, and DETCheckpoint::task_restart_states.
Referenced by main().
|
static |
Definition at line 632 of file ADSIDAC.cpp.
References BranchCluster::all_branch, SimulationContext::Branch_center, BranchRecord::findBrnachCluster(), g_sim, BranchCluster::getIDOfMotherCluster(), Time::getTimeAtWhichThisEventHappen(), SimulationContext::seq_restart_branch_num, and SimulationContext::seq_restart_cid.
Referenced by log_seq_fingerprint().
| void initiate_branching_ | ( | ) |
Definition at line 598 of file ADSIDAC.cpp.
References getActiveSolver(), and getActiveSolverCallback().
| void initiationforrestart_ | ( | ) |
Initialize restart mode for next sequence.
Definition at line 610 of file ADSIDAC.cpp.
References engine_callback, AdsidacCallback::initiationForRestart(), and solver_raw.
| void interfc_ | ( | ) |
Called every RELAP5 timestep from dtstep.f. Triggers crew/diagnosis decisions.
Definition at line 574 of file ADSIDAC.cpp.
References getActiveSolver(), and getActiveSolverCallback().
|
static |
Definition at line 666 of file ADSIDAC.cpp.
References compute_ancestry_path(), SimulationContext::current_seq_events, and g_sim.
Referenced by main().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
< Run ended mid-tree via checkpoint: outputs stay in natural-ID form
< do-loop to run all sequences
< remove the side product file generated by RELAP5
After the first run of RELAP5, change the input deck name to indeck.i
if terminateall is true, then the simulation is terminated
Definition at line 196 of file ADSIDAC.cpp.
References SimulationContext::Action_Taker, BranchRecord::addAnEndState(), AnalysisInfoContainer::addRecordWithTime(), SimConfig::aggregate_pe_output, SimulationContext::All_procedure, SimulationContext::Aux_info, SimulationContext::Branch_center, BranchRecord::branch_cluster, SimulationContext::branches_generated_this_sequence, build_serial_checkpoint(), SimConfig::checkpoint_dir, SimConfig::checkpoint_interval, checkpoint_requested, SimConfig::checkpoint_stop, SimulationContext::cid_to_source_sequence, cleanup_fort_temps(), BranchRecord::clearBranchRecordAll(), CommandControlCenter::clearCommandControlCenteFromSimulation(), CommunicationPlace::clearCommunicationPlaceAllPointers(), OperatorAT::clearOperatorATFinal(), OperatorDM::clearOperatorDMFinal(), SimulationContext::Command_handler, SimulationContext::Communication_place, SimConfig::compress_queue, SimulationContext::config, SimulationContext::config_fingerprint, Console, SimulationContext::Decision_Maker, Operator::diagnosis_matrix, e, BranchRecord::end_state, BranchRecord::endSimulation(), engine_callback, SimulationContext::expected_abort, adsidac::pe::finalize_sequential(), SimulationContext::fresh_restart, g_sim, get_rss_mb(), BranchRecord::getIDOfRecentGeneratedES(), Scheduler::getPEDirectory(), Scheduler::getProjectDirectory(), Scheduler::getSequenceTruncationTime(), SimulationContext::Indicator, BranchRecord::initiationForSimulation(), Operator::initiationForSimulation(), ConvertToString::initiationForSimulation(), Procedures::initiationForSimulation(), SystemModule::initiationForSimulation(), Scheduler::initiationForSimulation(), SimConfig::is_mpi_environment, Operator::knowledge_base, SimulationContext::KPS, DETCheckpoint::load(), log_seq_fingerprint(), lz4_decompress(), SimConfig::memory_limit_mb, SimConfig::memory_restart, NoKB, sim::Operator::OAT, sim::Operator::ODM, KeyParameterHistory::outputHistoryToFile(), Scheduler::parseOptions(), SimulationContext::Plant, RunSummary::project, r5pars_, PG::rank, RunSummary::ranks, ControlPanel::readInfoFromFile(), SimulationContext::restart_buffers, SimulationContext::restart_info, restart_path(), AdsidacCallback::restartForNewSequence(), SimConfig::resume_file, SimConfig::resume_has_end_states, run_merge_only(), AnalysisInfoContainer::saveInfoToFile(), send_completion_notification(), RunSummary::sequences, adsidac::set_shared_control_panel(), adsidac::set_shared_diagnosis_matrix(), adsidac::set_shared_kb(), adsidac::set_shared_procedures(), BranchEndState::setConsequenceDescription(), BranchRecord::setIDOfRecentGeneratedBranch(), BranchRecord::setIDOfRecentGeneratedBranchCluster(), BranchRecord::setIDOfRecentGeneratedES(), BranchEndState::setTypeOfConsequence(), should_use_memory_restart(), show_interrupt_menu(), sigint_handler(), sigint_received, sigusr1_handler(), RunSummary::solver, solver_ptr, solver_raw, SimConfig::solver_url, SimulationContext::SScheduler, SimConfig::thermo_cache_mode, SimulationContext::Translator, RunSummary::truncation_time, RunSummary::wall_seconds, and write_file_or_die().
| void mutiproactonce_ | ( | ) |
Definition at line 614 of file ADSIDAC.cpp.
| void outputErrMessageToFile | ( | string | str | ) |
Definition at line 624 of file ADSIDAC.cpp.
References r5pars_.
| void restartforanewsequence_ | ( | ) |
Find next unexplored branch, generate indeck.i restart input.
Definition at line 606 of file ADSIDAC.cpp.
References engine_callback, AdsidacCallback::restartForNewSequence(), and solver_raw.
|
static |
Definition at line 149 of file ADSIDAC.cpp.
References SimConfig::aggregate_pe_output, SimulationContext::config, adsidac::merge::discover_ranks(), g_sim, Scheduler::getProjectDirectory(), adsidac::merge::looks_finalized(), adsidac::merge::manifest_aggregate(), adsidac::merge::manifest_basename(), adsidac::merge::manifest_exists(), adsidac::merge::merge_project(), SimConfig::merge_threads, Scheduler::parseOptions(), adsidac::merge::ranks_hold_outputs(), and SimulationContext::SScheduler.
Referenced by main().
| void secini_ | ( | ) |
Security initialization callback.
Definition at line 586 of file ADSIDAC.cpp.
References getActiveSolver(), and getActiveSolverCallback().
| void setrnode_ | ( | ) |
Set restart node information in r5pars_.
Definition at line 618 of file ADSIDAC.cpp.
|
static |
Definition at line 44 of file ADSIDAC.cpp.
Referenced by main().
|
static |
Definition at line 41 of file ADSIDAC.cpp.
References sigint_received.
Referenced by main().
|
static |
Definition at line 37 of file ADSIDAC.cpp.
References checkpoint_requested.
Referenced by main().
|
static |
Definition at line 36 of file ADSIDAC.cpp.
Referenced by main(), and sigusr1_handler().
| AdsidacCallback engine_callback |
Definition at line 33 of file ADSIDAC.cpp.
Referenced by initiationforrestart_(), main(), and restartforanewsequence_().
|
static |
Definition at line 40 of file ADSIDAC.cpp.
Referenced by main(), and sigint_handler().
|
static |
Definition at line 31 of file ADSIDAC.cpp.
Referenced by main().
|
static |
Definition at line 32 of file ADSIDAC.cpp.
Referenced by initiationforrestart_(), main(), and restartforanewsequence_().