mirror of
https://github.com/nasa/trick.git
synced 2024-12-23 15:02:25 +00:00
80ab0767e2
Refs #396
25 lines
569 B
C++
25 lines
569 B
C++
|
|
#include <sys/resource.h>
|
|
|
|
#include "trick/MonteCarlo.hh"
|
|
#include "trick/message_proto.h"
|
|
#include "trick/message_type.h"
|
|
|
|
/** @par Detailed Design: */
|
|
int Trick::MonteCarlo::execute_monte() {
|
|
|
|
if (enabled) {
|
|
if (is_master()) {
|
|
if (master_init() != 0) {
|
|
message_publish(MSG_ERROR, "Monte : An error occurred during Monte Carlo initialization. Exiting.\n") ;
|
|
exit(0);
|
|
}
|
|
master();
|
|
} else {
|
|
slave_init();
|
|
execute_as_slave();
|
|
}
|
|
}
|
|
return(0);
|
|
}
|