set(HAVE_JEDULE 1)
endif()
-if(enable_latency_bound_tracking)
- SET(HAVE_LATENCY_BOUND_TRACKING 1)
-else()
- SET(HAVE_LATENCY_BOUND_TRACKING 0)
-endif()
-
if(enable_mallocators)
SET(MALLOCATOR_IS_WANTED 1)
else()
@li <b>enable_ns3</b> (ON/OFF): whether you want to use ns3.
See section @ref pls_simgrid_configuration_ns3.
@li <b>NS3_HINT</b> (path): Where to search for NS3 (eg /usr or /opt).
- @li <b>enable_latency_bound_tracking</b> (ON/OFF): enable it if you
- want to be warned when communications are limited by round trip
- time while doing packet-level simulation.
@li <b>enable_documentation</b> (ON/OFF) : whether the documentation should be
generated during the compilation. Default is ON.
/* Common constants for use in the simulation */
public class Common {
- public static String TRACKER_MAILBOX = "tracker_mailbox";
- public static int FILE_SIZE = 5120;
- public static int FILE_PIECE_SIZE = 512;
- public static int FILE_PIECES = 10;
- public static int PIECES_BLOCKS = 5;
- public static int BLOCKS_REQUESTED = 2;
- public static int PIECE_COMM_SIZE = 1;
- /* Information message size */
- public static int MESSAGE_SIZE = 1;
- /* Max number of peers sent by the tracker to clients */
- public static int MAXIMUM_PEERS = 50;
- /* Interval of time where the peer should send a request to the tracker */
- public static int TRACKER_QUERY_INTERVAL = 1000;
- /* Communication size for a task to the tracker */
- public static double TRACKER_COMM_SIZE = 0.01;
- /* Timeout for the get peers data */
- public static int GET_PEERS_TIMEOUT = 10000;
- public static int TIMEOUT_MESSAGE = 10;
- public static int TRACKER_RECEIVE_TIMEOUT = 10;
- /* Number of peers that can be unchocked at a given time */
- public static int MAX_UNCHOKED_PEERS = 4;
- /* Interval between each update of the choked peers */
- public static int UPDATE_CHOKED_INTERVAL = 30;
- /* Number of pieces the peer asks for simultaneously */
- public static int MAX_PIECES = 1;
+ public static final String TRACKER_MAILBOX = "tracker_mailbox";
+ public static final int FILE_SIZE = 5120;
+ public static final int FILE_PIECE_SIZE = 512;
+ public static final int FILE_PIECES = 10;
+ public static final int PIECES_BLOCKS = 5;
+ public static final int BLOCKS_REQUESTED = 2;
+ public static final int PIECE_COMM_SIZE = 1;
+ public static final int MESSAGE_SIZE = 1; /* Information message size */
+ public static final int MAXIMUM_PEERS = 50; /* Max number of peers sent by the tracker to clients */
+ public static final int TRACKER_QUERY_INTERVAL = 1000; /* Interval of time where the peer should send a request to the tracker */
+ public static final double TRACKER_COMM_SIZE = 0.01; /* Communication size for a task to the tracker */
+ public static final int GET_PEERS_TIMEOUT = 10000; /* Timeout for the get peers data */
+ public static final int TIMEOUT_MESSAGE = 10;
+ public static final int TRACKER_RECEIVE_TIMEOUT = 10;
+ public static final int MAX_UNCHOKED_PEERS = 4; /* Number of peers that can be unchocked at a given time */
+ public static final int UPDATE_CHOKED_INTERVAL = 30; /* Interval between each update of the choked peers */
+ public static final int MAX_PIECES = 1; /* Number of pieces the peer asks for simultaneously */
}
return distance;
}
+ @Override
public boolean equals(Object x) {
return x.equals(id) ;
}
+ @Override
public int compareTo(Object o) {
Contact c = (Contact)o;
if (distance < c.distance) {
static int slave(int argc, char *argv[])
{
msg_task_t task = NULL;
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- int limited_latency = 0;
-#endif
double remaining = 0;
char id_alias[10];
for (id = 0; id < NTASKS; id++) {
if (gl_task_array[id] == NULL) continue;
if (gl_task_array[id] == task) {
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- limited_latency = MSG_task_is_latency_bounded(gl_task_array[id]);
- if (limited_latency) {
- XBT_INFO("WARNING FLOW[%d] is limited by latency!!", id);
- }
-#endif
XBT_INFO ("===> Estimated Bw of FLOW[%d] : %f ; message from %s to %s with remaining : %f",
id, gl_data_size[id] / elapsed_time, masternames[id], slavenames[id], 0.0);
MSG_task_destroy(gl_task_array[id]);
gl_task_array[id]=NULL;
} else {
remaining = MSG_task_get_remaining_communication(gl_task_array[id]);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- limited_latency = MSG_task_is_latency_bounded(gl_task_array[id]);
-
- if (limited_latency) {
- XBT_INFO("WARNING FLOW[%d] is limited by latency!!", id);
- }
-#endif
XBT_INFO ("===> Estimated Bw of FLOW[%d] : %f ; message from %s to %s with remaining : %f",
id, (gl_data_size[id] - remaining) / elapsed_time, masternames[id], slavenames[id], remaining);
if(remaining==0) {
XBT_PUBLIC(smx_process_t) simcall_comm_get_src_proc(smx_synchro_t comm);
XBT_PUBLIC(smx_process_t) simcall_comm_get_dst_proc(smx_synchro_t comm);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) simcall_comm_is_latency_bounded(smx_synchro_t comm);
-#endif
-
/************************** Tracing handling **********************************/
XBT_PUBLIC(void) simcall_set_category(smx_synchro_t synchro, const char *category);
/* Define if xbt contexts are based on our threads implementation or not */
#cmakedefine HAVE_THREAD_CONTEXTS @HAVE_THREAD_CONTEXTS@
-/* Tracking of latency bound */
-#cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
-
/* If __thread is available */
#cmakedefine HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@
public FileCleaner(File dir) {
this.dir = dir;
}
+ @Override
public void run() {
try {
for (File f : dir.listFiles())
protected As() {
};
+ @Override
public String toString (){
return this.getName();
}
public File(String path) {
open(path);
}
+ @Override
protected void finalize() {
}
this.data = null;
};
+ @Override
public String toString (){
return this.name;
}
}
- /**
- * This method runs the process. Il calls the method function that you must overwrite.
- */
+ /** This method runs the process. Il calls the method function that you must overwrite. */
+ @Override
public void run() {
String[] args = null; /* do not fill it before the signal or this.args will be empty */
- //waitSignal(); /* wait for other people to fill the process in */
try {
args = new String[this.args.size()];
*/
private long bind;
- /**
- * Storage name
- */
+ /** Storage name */
protected String name;
- /**
- * User data.
- */
+ /** User data. */
private Object data;
- /**
- *
- */
protected Storage() {
this.bind = 0;
this.data = null;
};
+ @Override
public String toString (){
return this.name;
*/
XBT_PUBLIC(lmm_constraint_t) lmm_get_next_active_constraint(lmm_system_t sys, lmm_constraint_t cnst);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) lmm_is_variable_limited_by_latency(lmm_variable_t var);
-#endif
-
/**
* @brief Get the data associated to a constraint
* @param cnst A constraint
return simcall_comm_get_remains(task->simdata->comm);
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-/** \ingroup m_task_management
- * \brief Return 1 if communication task is limited by latency, 0 otherwise
- */
-int MSG_task_is_latency_bounded(msg_task_t task)
-{
- xbt_assert((task != NULL) && (task->simdata != NULL), "Invalid parameter");
- XBT_DEBUG("calling simcall_communication_is_latency_bounded(%p)", task->simdata->comm);
- return simcall_comm_is_latency_bounded(task->simdata->comm);
-}
-#endif
-
/** \ingroup m_task_management
* \brief Returns the size of the data attached to a task #msg_task_t.
*/
return simcall_BODY_comm_get_dst_proc(comm);
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-int simcall_comm_is_latency_bounded(smx_synchro_t comm)
-{
- return simcall_BODY_comm_is_latency_bounded(comm);
-}
-#endif
-
/**
* \ingroup simix_synchro_management
*
static inline void simcall_run_kernel__set__code(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-
-static inline smx_synchro_t simcall_comm_is_latency_bounded__get__comm(smx_simcall_t simcall) {
- return (smx_synchro_t) simcall->args[0].dp;
-}
-static inline void simcall_comm_is_latency_bounded__set__comm(smx_simcall_t simcall, void* arg) {
- simcall->args[0].dp = arg;
-}
-static inline int simcall_comm_is_latency_bounded__get__result(smx_simcall_t simcall){
- return simcall->result.i;
-}
-static inline void simcall_comm_is_latency_bounded__set__result(smx_simcall_t simcall, int result){
- simcall->result.i = result;
-}
-#endif
-
#ifdef HAVE_MC
static inline mc_snapshot_t simcall_mc_snapshot__get__result(smx_simcall_t simcall){
XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t name);
XBT_PRIVATE xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char* name);
XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-
-#endif
-
#ifdef HAVE_MC
XBT_PRIVATE mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
XBT_PRIVATE int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
}
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-
-inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
- smx_process_t self = SIMIX_process_self();
-
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_comm_is_latency_bounded(comm);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
- memset(&self->simcall.result, 0, sizeof(self->simcall.result));
- memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) comm;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return (int) self->simcall.result.i;
- }
-#endif
-
#ifdef HAVE_MC
inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
SIMCALL_MC_RANDOM,
SIMCALL_SET_CATEGORY,
SIMCALL_RUN_KERNEL,
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- SIMCALL_COMM_IS_LATENCY_BOUNDED,
-#endif
-
#ifdef HAVE_MC
SIMCALL_MC_SNAPSHOT,
SIMCALL_MC_COMPARE_SNAPSHOTS,
"SIMCALL_MC_RANDOM",
"SIMCALL_SET_CATEGORY",
"SIMCALL_RUN_KERNEL",
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- "SIMCALL_COMM_IS_LATENCY_BOUNDED",
-#endif
-
#ifdef HAVE_MC
"SIMCALL_MC_SNAPSHOT",
"SIMCALL_MC_COMPARE_SNAPSHOTS",
SIMIX_simcall_answer(simcall);
break;
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-case SIMCALL_COMM_IS_LATENCY_BOUNDED:
- simcall->result.i = SIMIX_comm_is_latency_bounded((smx_synchro_t) simcall->args[0].dp);
- SIMIX_simcall_answer(simcall);
- break;
-
-#endif
-
#ifdef HAVE_MC
case SIMCALL_MC_SNAPSHOT:
simcall->result.dp = simcall_HANDLER_mc_snapshot(simcall );
Proc - run_kernel (void) (code, void*)
-## HAVE_LATENCY_BOUND_TRACKING
-Func - comm_is_latency_bounded (int) (comm, void*, smx_synchro_t)
## HAVE_MC
Func H mc_snapshot (void*, mc_snapshot_t)
Func H mc_compare_snapshots (int) (s1, void*, mc_snapshot_t) (s2, void*, mc_snapshot_t)
synchro->comm.src_data=NULL;
synchro->comm.dst_data=NULL;
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- //initialize with unknown value
- synchro->latency_limited = -1;
-#endif
-
synchro->category = NULL;
XBT_DEBUG("Create communicate synchro %p", synchro);
XBT_DEBUG("Really free communication %p; refcount is now %d", synchro,
synchro->comm.refcount);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- synchro->latency_limited = SIMIX_comm_is_latency_bounded( synchro ) ;
-#endif
-
xbt_free(synchro->name);
SIMIX_comm_destroy_internal_actions(synchro);
void SIMIX_comm_destroy_internal_actions(smx_synchro_t synchro)
{
if (synchro->comm.surf_comm){
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- synchro->latency_limited = SIMIX_comm_is_latency_bounded(synchro);
-#endif
synchro->comm.surf_comm->unref();
synchro->comm.surf_comm = NULL;
}
return synchro->comm.dst_proc;
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-/**
- * \brief verify if communication is latency bounded
- * \param comm The communication
- */
-int SIMIX_comm_is_latency_bounded(smx_synchro_t synchro)
-{
- if(!synchro){
- return 0;
- }
- if (synchro->comm.surf_comm){
- XBT_DEBUG("Getting latency limited for surf_action (%p)", synchro->comm.surf_comm);
- synchro->latency_limited = surf_network_action_get_latency_limited(synchro->comm.surf_comm);
- XBT_DEBUG("synchro limited is %d", synchro->latency_limited);
- }
- return synchro->latency_limited;
-}
-#endif
-
/******************************************************************************/
/* SIMIX_comm_copy_data callbacks */
/******************************************************************************/
XBT_PRIVATE void SIMIX_network_init(void);
XBT_PRIVATE void SIMIX_network_exit(void);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_synchro_t comm);
-#endif
-
XBT_PRIVATE smx_mailbox_t SIMIX_rdv_create(const char *name);
XBT_PRIVATE void SIMIX_rdv_destroy(smx_mailbox_t rdv);
XBT_PRIVATE smx_mailbox_t SIMIX_rdv_get_by_name(const char *name);
} io;
};
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- int latency_limited;
-#endif
-
char *category; /* simix action category for instrumentation */
} s_smx_synchro_t;
return (lmm_constraint_t)xbt_swag_getNext(cnst, (sys->active_constraint_set).offset);
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) lmm_is_variable_limited_by_latency(lmm_variable_t var)
-{
- return (double_equals(var->bound, var->value, var->bound*sg_maxmin_precision));
-}
-#endif
-
-
/** \brief Update the constraint set propagating recursively to
* other constraints so the system should not be entirely computed.
*
}
}
-Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst,
- double size, double rate)
+Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, double rate)
{
int failed = 0;
- NetworkCm02Action *action = NULL;
double bandwidth_bound;
double latency = 0.0;
std::vector<Link*> * back_route = NULL;
failed = 1;
}
- action = new NetworkCm02Action(this, size, failed);
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- action->m_latencyLimited = 0;
-#endif
+ NetworkCm02Action *action = new NetworkCm02Action(this, size, failed);
action->m_weight = action->m_latency = latency;
action->m_rate = rate;
constraints_per_variable += back_route->size();
if (action->m_latency > 0) {
- action->p_variable = lmm_variable_new(p_maxminSystem, action, 0.0, -1.0,
- constraints_per_variable);
+ action->p_variable = lmm_variable_new(p_maxminSystem, action, 0.0, -1.0, constraints_per_variable);
if (p_updateMechanism == UM_LAZY) {
// add to the heap the event when the latency is payed
XBT_DEBUG("Added action (%p) one latency event at date %f", action, action->m_latency + action->m_lastUpdate);
for(ActionList::iterator it(runningActions->begin()), itend(runningActions->end())
; it != itend ; ++it) {
action = static_cast<NetworkAction*>(&*it);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- if (lmm_is_variable_limited_by_latency(action->getVariable())) {
- action->m_latencyLimited = 1;
- } else {
- action->m_latencyLimited = 0;
- }
-#endif
if (action->m_latency > 0) {
minRes = (minRes < 0) ? action->m_latency : std::min(minRes, action->m_latency);
}
void setState(e_surf_action_state_t state);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- /**
- * @brief Check if the action is limited by latency.
- *
- * @return 1 if action is limited by latency, 0 otherwise
- */
- virtual int getLatencyLimited() {return m_latencyLimited;}
-#endif
-
double m_latency;
double m_latCurrent;
double m_weight;
const char* p_senderLinkName;
double m_senderSize;
xbt_fifo_item_t p_senderFifoItem;
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- int m_latencyLimited;
-#endif
-
};
-
}
}
: NetworkAction(model, cost, failed)
{}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- int NetworkNS3Action::getLatencyLimited() {
- return m_latencyLimited;
- }
-#endif
-
- void NetworkNS3Action::suspend()
+void NetworkNS3Action::suspend()
{
THROW_UNIMPLEMENTED;
}
public:
NetworkNS3Action(Model *model, double cost, bool failed);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- int getLatencyLimited();
-#endif
-
bool isSuspended();
int unref();
void suspend();
static_cast<simgrid::surf::CpuAction*>(action)->setBound(bound);
}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-double surf_network_action_get_latency_limited(surf_action_t action) {
- return static_cast<simgrid::surf::NetworkAction*>(action)->getLatencyLimited();
-}
-#endif
-
surf_file_t surf_storage_action_get_file(surf_action_t action){
return static_cast<simgrid::surf::StorageAction*>(action)->p_file;
}
double m_start; /**< start time */
char *p_category = NULL; /**< tracing category for categorized resource utilization monitoring */
- #ifdef HAVE_LATENCY_BOUND_TRACKING
- int m_latencyLimited; /**< Set to 1 if is limited by latency, 0 otherwise */
- #endif
double m_cost;
simgrid::surf::Model *p_model;
void *p_data = NULL; /**< for your convenience */
static xbt_dict_t trace_list = NULL;
-simgrid::trace_mgr::future_evt_set::future_evt_set() {
+simgrid::trace_mgr::future_evt_set::future_evt_set()
+{
}
simgrid::trace_mgr::future_evt_set::~future_evt_set()
xbt_heap_free(p_heap);
}
-#if 0 /* probabilistic dead code. Should be reimplemented, not killed (please) */
-/**
- * \brief Create a #tmgr_trace_t from probabilist generators
- *
- * This trace will generate an infinite set of events.
- * It needs two #probabilist_event_generator_t. The date when the event are
- * triggered is directed by date_generator, and will be interpreted as seconds.
- * The value of the event is set by value_generator. The value should be between
- * 0 and 1.
- *
- * \param id The name of the trace
- * \param date_generator The #probabilist_event_generator_t which generates the time
- * between two events
- * \param generator2 The #probabilist_event_generator_t which generates the value
- * of each events.
- * \return The new #tmgr_trace_t
- */
-tmgr_trace_t tmgr_trace_generator_value(const char *id,
- probabilist_event_generator_t date_generator,
- probabilist_event_generator_t value_generator)
-{
- tmgr_trace_t trace = NULL;
-
- trace = xbt_new0(s_tmgr_trace_t, 1);
- trace->type = e_trace_probabilist;
-
- trace->s_probabilist.event_generator[0] = date_generator;
- trace->s_probabilist.event_generator[1] = value_generator;
- trace->s_probabilist.is_state_trace = 0;
-
- return trace;
-}
-
-/**
- * \brief Create a #tmgr_trace_t from probabilist generators
- *
- * This trace will generate an infinite set of events. Value of the events
- * will be alternatively 0 and 1, so this should be used as a state trace.
- *
- * \param id The name of the trace
- * \param date_generator The #probabilist_event_generator_t which generates the time
- * between two events
- * \param first_event_value Set the first event value
- * \return The new #tmgr_trace_t
- */
-tmgr_trace_t tmgr_trace_generator_state(const char *id,
- probabilist_event_generator_t date_generator,
- int first_event_hostIsOn)
-{
- tmgr_trace_t trace = NULL;
-
- trace = xbt_new0(s_tmgr_trace_t, 1);
- trace->type = e_trace_probabilist;
-
- trace->s_probabilist.event_generator[0] = date_generator;
- trace->s_probabilist.event_generator[1] = date_generator;
- trace->s_probabilist.is_state_trace = 1;
- trace->s_probabilist.next_event = first_event_hostIsOn;
-
- return trace;
-}
-
-/**
- * \brief Create a #tmgr_trace_t from probabilist generators
- *
- * This trace will generate an infinite set of events. Value of the events
- * will be alternatively 0 and 1, so this should be used as a state trace.
- *
- * \param id The name of the trace
- * \param avail_duration_generator The #probabilist_event_generator_t which
- * set the duration of the available state, (ie 1 value)
- * \param unavail_duration_generator The #probabilist_event_generator_t which
- * set the duration of the unavailable state, (ie 0 value)
- * \param first_event_value Set the first event value
- * \return The new #tmgr_trace_t
- */
-tmgr_trace_t tmgr_trace_generator_avail_unavail(const char *id,
- probabilist_event_generator_t avail_duration_generator,
- probabilist_event_generator_t unavail_duration_generator,
- int first_event_hostIsOn)
-{
- tmgr_trace_t trace = NULL;
-
- trace = xbt_new0(s_tmgr_trace_t, 1);
- trace->type = e_trace_probabilist;
-
- trace->s_probabilist.event_generator[0] = unavail_duration_generator;
- trace->s_probabilist.event_generator[1] = avail_duration_generator;
- trace->s_probabilist.is_state_trace = 1;
- trace->s_probabilist.next_event = first_event_hostIsOn;
-
- return trace;
-}
-
-/**
- * \brief Create a new #probabilist_event_generator_t following the uniform distribution
- *
- * This generator will generate uniformly distributed random values between min and max
- * The id is important : it controls the seed of the generator. So, generators with the
- * same id and the same parameters will generate the same values.
- *
- * \param id The name of the generator
- * \param min The minimal generated value
- * \param max The maximal generated value
- * \return a new #probabilist_event_generator_t
- */
-probabilist_event_generator_t tmgr_event_generator_new_uniform(const char* id,
- double min,
- double max)
-{
- probabilist_event_generator_t event_generator = NULL;
- RngStream rng_stream = NULL;
-
- rng_stream = sg_platf_rng_stream_get(id);
-
- event_generator = xbt_new0(s_probabilist_event_generator_t, 1);
- event_generator->type = e_generator_uniform;
- event_generator->s_uniform_parameters.min = min;
- event_generator->s_uniform_parameters.max = max;
- event_generator->rng_stream = rng_stream;
-
- tmgr_event_generator_next_value(event_generator);
-
- return event_generator;
-}
-
-
-/**
- * \brief Create a new #probabilist_event_generator_t following the exponential distribution
- *
- * This generator will generate random values following the exponential distribution.
- * The mean value is 1/rate .
- * The id is important : it controls the seed of the generator. So, generators with the
- * same id and the same parameters will generate the same values.
- *
- * \param id The name of the generator
- * \param rate The rate parameter
- * \return a new #probabilist_event_generator_t
- */
-probabilist_event_generator_t tmgr_event_generator_new_exponential(const char* id,
- double rate)
-{
- probabilist_event_generator_t event_generator = NULL;
- RngStream rng_stream = NULL;
-
- rng_stream = sg_platf_rng_stream_get(id);
-
- event_generator = xbt_new0(s_probabilist_event_generator_t, 1);
- event_generator->type = e_generator_exponential;
- event_generator->s_exponential_parameters.rate = rate;
- event_generator->rng_stream = rng_stream;
-
- tmgr_event_generator_next_value(event_generator);
-
- return event_generator;
-}
-
-/**
- * \brief Create a new #probabilist_event_generator_t following the weibull distribution
- *
- * This generator will generate random values following the weibull distribution.
- * The id is important : it controls the seed of the generator. So, generators with the
- * same id and the same parameters will generate the same values.
- *
- * \param id The name of the generator
- * \param scale The scale parameter
- * \param shape The shape parameter
- * \return a new #probabilist_event_generator_t
- */
-probabilist_event_generator_t tmgr_event_generator_new_weibull(const char* id,
- double scale,
- double shape)
-{
- probabilist_event_generator_t event_generator = NULL;
- RngStream rng_stream = NULL;
-
- rng_stream = sg_platf_rng_stream_get(id);
-
- event_generator = xbt_new0(s_probabilist_event_generator_t, 1);
- event_generator->type = e_generator_weibull;
- event_generator->s_weibull_parameters.scale = scale;
- event_generator->s_weibull_parameters.shape = shape;
- event_generator->rng_stream = rng_stream;
-
- tmgr_event_generator_next_value(event_generator);
-
- return event_generator;
-}
-/**
- * \brief Get the next random value of a #probabilist_event_generator_t
- * \param generator The #probabilist_event_generator_t
- * \return the next random value
- */
-double tmgr_event_generator_next_value(probabilist_event_generator_t generator)
-{
-
- switch(generator->type) {
- case e_generator_uniform:
- generator->next_value = (RngStream_RandU01(generator->rng_stream)
- * (generator->s_uniform_parameters.max - generator->s_uniform_parameters.min))
- + generator->s_uniform_parameters.min;
- break;
- case e_generator_exponential:
- generator->next_value = -log(RngStream_RandU01(generator->rng_stream))
- / generator->s_exponential_parameters.rate;
- break;
- case e_generator_weibull:
- generator->next_value = generator->s_weibull_parameters.scale
- * pow( -log(RngStream_RandU01(generator->rng_stream)),
- 1.0 / generator->s_weibull_parameters.shape );
- }
-
- return generator->next_value;
-}
-#endif /* probabilistic dead code */
-
-tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
- double periodicity)
+tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input, double periodicity)
{
tmgr_trace_t trace = NULL;
int linecount = 0;
}
/** @brief Registers a new trace into the future event set, and get an iterator over the integrated trace */
-tmgr_trace_iterator_t simgrid::trace_mgr::future_evt_set::add_trace(
- tmgr_trace_t trace, double start_time, surf::Resource *resource)
+tmgr_trace_iterator_t simgrid::trace_mgr::future_evt_set::add_trace(tmgr_trace_t trace, double start_time, surf::Resource *resource)
{
tmgr_trace_iterator_t trace_iterator = NULL;
trace_iterator->idx = 0;
trace_iterator->resource = resource;
- xbt_assert((trace_iterator->idx < xbt_dynar_length(trace->event_list)),
- "Your trace should have at least one event!");
+ xbt_assert((trace_iterator->idx < xbt_dynar_length(trace->event_list)), "Your trace should have at least one event!");
xbt_heap_push(p_heap, trace_iterator, start_time);
option(enable_compile_warnings "Whether compilation warnings should be turned into errors." off)
option(enable_maintainer_mode "Whether flex and flexml files should be rebuilt." off)
option(enable_tracing "Tracing simulations for visualization." on)
-option(enable_latency_bound_tracking "" off)
option(enable_coverage "Whether coverage should be enabled." off)
mark_as_advanced(enable_coverage)
message(" Model checking ..............: ${HAVE_MC}")
message(" Tracing mode ................: ${enable_tracing}")
message(" Jedule mode ................: ${enable_jedule}")
-message(" Latency bound ...............: ${enable_latency_bound_tracking}")
message(" Graphviz mode ...............: ${HAVE_GRAPHVIZ}")
message(" Sigc++ mode .................: ${SIMGRID_HAVE_LIBSIG}")
message(" Mallocators .................: ${enable_mallocators}")
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS @STDC_HEADERS@
-/* Tracking of latency bound */
-#cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
- `char[]'. */
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */
#cmakedefine YYTEXT_POINTER
/* Define to `unsigned int' if <sys/types.h> does not define. */
cmake -Denable_documentation=OFF -Denable_lua=OFF -Denable_tracing=ON \
-Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
- -Denable_latency_bound_tracking=OFF -Denable_jedule=OFF -Denable_mallocators=OFF \
+ -Denable_jedule=OFF -Denable_mallocators=OFF \
-Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_model-checking=OFF \
-Denable_memcheck_xml=ON $WORKSPACE
cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=ON -Denable_tracing=ON \
-Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
- -Denable_latency_bound_tracking=ON -Denable_jedule=ON -Denable_mallocators=ON \
+ -Denable_jedule=ON -Denable_mallocators=ON \
-Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_model-checking=ON \
-Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=ON -Denable_coverage=ON $WORKSPACE
-Denable_mallocators=$(onoff test "$build_mode" != "DynamicAnalysis") \
-Denable_memcheck=$(onoff test "$build_mode" = "DynamicAnalysis") \
-Denable_compile_warnings=$(onoff test "$GENERATOR" != "MSYS Makefiles") -Denable_smpi=ON \
- -Denable_latency_bound_tracking=OFF -Denable_jedule=OFF \
- -Denable_tracing=ON -Denable_java=ON -Denable_lua=OFF $SRCFOLDER
+ -Denable_jedule=OFF -Denable_tracing=ON -Denable_java=ON -Denable_lua=OFF $SRCFOLDER
# -Denable_lua=$(onoff test "$build_mode" != "DynamicAnalysis") \
make -j$NUMBER_OF_PROCESSORS VERBOSE=1