mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Implemented call to clear Monte Carlo job queues when the Executive restarts.
This commit is contained in:
parent
04822023de
commit
ece3c702f6
@ -777,6 +777,13 @@ namespace Trick {
|
||||
int write(char* data, int size);
|
||||
int read(char* data, int size);
|
||||
|
||||
|
||||
/** Reset job queues for checkpoint restart
|
||||
*
|
||||
*
|
||||
*/
|
||||
void clear_job_queues();
|
||||
|
||||
#if 0
|
||||
/**
|
||||
Overload default implentation of Scheduler::add_sim_object
|
||||
|
@ -9,6 +9,9 @@
|
||||
#include "trick/memorymanager_c_intf.h"
|
||||
#include "trick/ScheduledJobQueue.hh"
|
||||
#include "trick/Threads.hh"
|
||||
#include "trick/MonteCarlo.hh"
|
||||
|
||||
extern Trick::MonteCarlo *the_mc;
|
||||
|
||||
/**
|
||||
@details
|
||||
@ -43,6 +46,10 @@ int Trick::Executive::restart() {
|
||||
all_jobs_vector.clear() ;
|
||||
all_tagged_jobs.clear() ;
|
||||
|
||||
if(the_mc) {
|
||||
the_mc->clear_job_queues();
|
||||
}
|
||||
|
||||
/* Create a temporary all_jobs map to use to restore job data from all_jobs_for_checkpoint */
|
||||
for ( sit = sim_objects.begin() ; sit != sim_objects.end() ; sit++ ) {
|
||||
for ( jit = (*sit)->jobs.begin() ; jit != (*sit)->jobs.end() ; jit++ ) {
|
||||
|
@ -0,0 +1,17 @@
|
||||
|
||||
#include "trick/MonteCarlo.hh"
|
||||
#include "trick/message_proto.h"
|
||||
#include "trick/message_type.h"
|
||||
|
||||
void Trick::MonteCarlo::clear_job_queues() {
|
||||
|
||||
master_init_queue.clear();
|
||||
master_pre_queue.clear();
|
||||
master_post_queue.clear();
|
||||
master_shutdown_queue.clear();
|
||||
slave_init_queue.clear();
|
||||
slave_pre_queue.clear();
|
||||
slave_post_queue.clear();
|
||||
slave_shutdown_queue.clear();
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user