@@ -154,6 +154,7 @@ CheckpointAction::execute()
154154void
155155CheckpointAction::createCheckpoint (Simulation_impl* sim)
156156{
157+
157158 if ( 0 == rank_.rank && 0 == rank_.thread ) {
158159 const double now = sst_get_cpu_time ();
159160 sim->getSimulationOutput ().output (
@@ -212,9 +213,11 @@ CheckpointAction::createCheckpoint(Simulation_impl* sim)
212213 // No need to barrier here since rank 0 thread 0 will be the first
213214 // to execute in the loop below and everything else will wait
214215 for ( uint32_t r = 0 ; r < num_ranks.rank ; ++r ) {
216+
215217 if ( r == rank_.rank ) {
216218 // If this is my rank go ahead
217219 for ( uint32_t t = 0 ; t < num_ranks.thread ; ++t ) {
220+
218221 // If this is my thread go ahead
219222 if ( t == rank_.thread ) {
220223 sim->checkpoint_append_registry (directory + " /" + registry_name, filename);
@@ -253,13 +256,18 @@ CheckpointAction::createCheckpoint(Simulation_impl* sim)
253256// SyncManager check whether a checkpoint needs to be generated
254257SimTime_t
255258CheckpointAction::check (SimTime_t current_time)
256- {
259+ {
260+ #if 0
261+ Simulation_impl* sim = Simulation_impl::getSimulation();
262+ sim->getSimulationOutput().output(
263+ "skk:T %d: checkpointAction.cc: check()\n", rank_.thread);
264+ #endif
257265 // The if-logic is a little weird, but it's trying to minimize the
258266 // number of branches in the normal case of no checkpoint being
259267 // initiated. This will also handle the case where both a sim and
260268 // real-time trigger happened at the same time
261269 if ( (current_time == next_sim_time_) || generate_ ) {
262- Simulation_impl* sim = Simulation_impl::getSimulation ();
270+ Simulation_impl* sim = Simulation_impl::getSimulation ();
263271 createCheckpoint (sim);
264272 generate_ = false ;
265273 // Only add to the simulation-interval checkpoint time if it
@@ -271,6 +279,11 @@ CheckpointAction::check(SimTime_t current_time)
271279 return next_sim_time_;
272280}
273281
282+ bool
283+ CheckpointAction::getCheckpoint ()
284+ {
285+ return generate_;
286+ }
274287void
275288CheckpointAction::setCheckpoint ()
276289{
0 commit comments