You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sim/include/sim/ad.hpp
+52-6Lines changed: 52 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ namespace chimbuko_sim{
18
18
std::list<CallListIterator_t> m_step_exec_its; //iterators to events on this io step; flushed at end of step
19
19
std::unordered_map<unsignedlong, std::vector<CallListIterator_t>> m_step_func_exec_its; //map of function id to iterators on this io step; flushed at end of step
20
20
21
+
bool m_step_is_open; /**< Is an io step currently open? */
21
22
int m_step;
22
23
int m_window_size;
23
24
int m_pid;
@@ -30,46 +31,91 @@ namespace chimbuko_sim{
30
31
public:
31
32
voidinit(int window_size, int pid, int rid);
32
33
34
+
/**
35
+
* @brief Instantiate the AD simulator
36
+
* @param window_size The number of events around an anomaly that are recorded in the provDB
37
+
* @param pid The program index
38
+
* @param rid The rank index
39
+
*/
33
40
ADsim(int window_size, int pid, int rid): ADsim(){
@@ -115,6 +121,8 @@ void ADsim::endStep(const unsigned long step_end_time){
115
121
116
122
int nanom=0, nnorm=0;
117
123
for(constauto &exec_it : m_step_exec_its){
124
+
if(exec_it->get_exit() > step_end_time) fatal_error("Event " + exec_it->get_json(true, true).dump(4) + " has an exit time later than the end of the current step, " + std::to_string(step_end_time) );
0 commit comments