Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 4 Mar 2016 10:25:01 +0000 (11:25 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 4 Mar 2016 10:25:01 +0000 (11:25 +0100)
38 files changed:
CMakeLists.txt
doc/doxygen/install.doc
examples/java/bittorrent/Common.java
examples/java/kademlia/Contact.java
examples/msg/gtnets/gtnets.c
include/simgrid/simix.h
include/simgrid_config.h.in
src/bindings/java/org/simgrid/NativeLib.java
src/bindings/java/org/simgrid/msg/As.java
src/bindings/java/org/simgrid/msg/File.java
src/bindings/java/org/simgrid/msg/Host.java
src/bindings/java/org/simgrid/msg/Process.java
src/bindings/java/org/simgrid/msg/Storage.java
src/include/surf/maxmin.h
src/msg/msg_task.cpp
src/simix/libsmx.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.in
src/simix/smx_network.cpp
src/simix/smx_network_private.h
src/simix/smx_private.h
src/surf/maxmin.cpp
src/surf/network_cm02.cpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.hpp
src/surf/trace_mgr.cpp
tools/cmake/Option.cmake
tools/cmake/PrintArgs.cmake
tools/cmake/src/internal_config.h.in
tools/jenkins/DynamicAnalysis.sh
tools/jenkins/build.sh

index fd5fe39..914ee76 100644 (file)
@@ -375,12 +375,6 @@ if(enable_jedule)
   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()
index 10d3360..bc070be 100644 (file)
@@ -216,9 +216,6 @@ accepts several options, as listed below.
   @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.
 
index 2f030f3..5833aaf 100644 (file)
@@ -8,29 +8,21 @@ package bittorrent;
 
 /* 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 */
 }
index 76e155b..0f95358 100644 (file)
@@ -23,10 +23,12 @@ public class Contact implements Comparable<Object> {
     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) {
index 83758ac..19d2b0b 100644 (file)
@@ -74,9 +74,6 @@ static int master(int argc, char *argv[])
 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];
 
@@ -103,25 +100,12 @@ static int slave(int argc, char *argv[])
     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) {
index 5eff1ca..5e930ff 100644 (file)
@@ -423,10 +423,6 @@ XBT_PUBLIC(void *) simcall_comm_get_dst_data(smx_synchro_t comm);
 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);
 
index 0f4db4c..47e50f5 100644 (file)
@@ -48,9 +48,6 @@
 /* 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@
 
index c89c57f..71b1595 100644 (file)
@@ -129,6 +129,7 @@ public final class NativeLib {
                public FileCleaner(File dir) {
                        this.dir = dir;
                }
+               @Override
                public void run() {
                        try {
                            for (File f : dir.listFiles())
index 40b68dc..16c6889 100644 (file)
@@ -13,6 +13,7 @@ public class As {
        protected As() {
        };
 
+       @Override
        public String toString (){
                return this.getName(); 
        }
index 015d080..456e474 100644 (file)
@@ -20,6 +20,7 @@ public class File {
        public File(String path) {
                open(path);
        }
+       @Override
        protected void finalize() {
 
        }
index aa058cf..ae953ee 100644 (file)
@@ -66,6 +66,7 @@ public class Host {
                this.data = null;
        };
 
+       @Override
        public String toString (){
                return this.name; 
 
index 502348c..f408d16 100644 (file)
@@ -328,13 +328,11 @@ public abstract class Process implements Runnable {
                }
        }
 
-       /**
-        * 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()];
index d9ccd5a..b6953bc 100644 (file)
@@ -17,23 +17,17 @@ public class Storage {
         */ 
        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; 
 
index 297683f..9aa09d2 100644 (file)
@@ -354,10 +354,6 @@ XBT_PUBLIC(lmm_constraint_t) lmm_get_first_active_constraint(lmm_system_t sys);
  */
 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
index 8c3a95f..b7e6a6d 100644 (file)
@@ -326,18 +326,6 @@ double MSG_task_get_remaining_communication(msg_task_t task)
   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.
  */
index 6e476ec..cdd3b40 100644 (file)
@@ -1011,13 +1011,6 @@ smx_process_t simcall_comm_get_dst_proc(smx_synchro_t comm)
   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
  *
index 6806eb0..d3c67e9 100644 (file)
@@ -1380,22 +1380,6 @@ static inline void* simcall_run_kernel__get__code(smx_simcall_t simcall) {
 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){
@@ -1477,10 +1461,6 @@ XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcal
 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);
index bdc2c1d..2a0c62d 100644 (file)
@@ -1845,30 +1845,6 @@ inline static void simcall_BODY_run_kernel(void* code) {
     }    
     
   }
-#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() {
index a523f45..4f357d8 100644 (file)
@@ -101,10 +101,6 @@ typedef enum {
   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,
index 67e0599..2306854 100644 (file)
@@ -106,10 +106,6 @@ const char* simcall_names[] = {
   "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",
@@ -523,14 +519,6 @@ case SIMCALL_RUN_KERNEL:
       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 );
index 90e4e5f..a98a6d3 100644 (file)
@@ -142,8 +142,6 @@ Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char
 
 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)
index b715647..58b1ac1 100644 (file)
@@ -252,12 +252,6 @@ smx_synchro_t SIMIX_comm_new(e_smx_comm_type_t type)
   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);
@@ -286,10 +280,6 @@ void SIMIX_comm_destroy(smx_synchro_t 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);
 
@@ -311,9 +301,6 @@ void SIMIX_comm_destroy(smx_synchro_t 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;
   }
@@ -1018,25 +1005,6 @@ smx_process_t SIMIX_comm_get_dst_proc(smx_synchro_t synchro)
   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                       */
 /******************************************************************************/
index 6fa2f7e..a1039d6 100644 (file)
@@ -24,10 +24,6 @@ typedef struct s_smx_rvpoint {
 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);
index 067611d..89efe32 100644 (file)
@@ -203,10 +203,6 @@ typedef struct s_smx_synchro {
     } io;
   };
 
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  int latency_limited;
-#endif
-
   char *category;                     /* simix action category for instrumentation */
 } s_smx_synchro_t;
 
index bf00e28..9ec893f 100644 (file)
@@ -1254,14 +1254,6 @@ XBT_INLINE lmm_constraint_t lmm_get_next_active_constraint(lmm_system_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.
  *
index 1f07518..35dae59 100644 (file)
@@ -305,11 +305,9 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
   }
 }
 
-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;
@@ -336,11 +334,7 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst,
         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;
@@ -375,8 +369,7 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst,
     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);
index 4629706..d3ce07e 100644 (file)
@@ -166,13 +166,6 @@ namespace simgrid {
       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);
         }
index 1b69f74..0bda751 100644 (file)
@@ -290,15 +290,6 @@ namespace simgrid {
 
       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;
@@ -306,12 +297,7 @@ namespace simgrid {
       const char* p_senderLinkName;
       double m_senderSize;
       xbt_fifo_item_t p_senderFifoItem;
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-      int m_latencyLimited;
-#endif
-
     };
-
   }
 }
 
index ea21715..dbd4db1 100644 (file)
@@ -399,13 +399,7 @@ NetworkNS3Action::NetworkNS3Action(Model *model, double cost, bool failed)
 : NetworkAction(model, cost, failed)
 {}
 
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  int NetworkNS3Action::getLatencyLimited() {
-    return m_latencyLimited;
-  }
-#endif
-
- void NetworkNS3Action::suspend()
+void NetworkNS3Action::suspend()
 {
   THROW_UNIMPLEMENTED;
 }
index 0a0dd90..3807ebe 100644 (file)
@@ -79,10 +79,6 @@ class NetworkNS3Action : public NetworkAction {
 public:
   NetworkNS3Action(Model *model, double cost, bool failed);
 
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  int getLatencyLimited();
-#endif
-
 bool isSuspended();
 int unref();
 void suspend();
index 803c934..fb652db 100644 (file)
@@ -308,12 +308,6 @@ void surf_cpu_action_set_bound(surf_action_t action, double bound) {
   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;
 }
index 4b3a940..9cba1d1 100644 (file)
@@ -226,9 +226,6 @@ private:
   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 */
index cc0eedd..32558c2 100644 (file)
@@ -17,7 +17,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_trace, surf, "Surf trace management");
 
 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()
@@ -25,224 +26,7 @@ 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;
@@ -362,8 +146,7 @@ void tmgr_trace_free(tmgr_trace_t trace)
 }
 
 /** @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;
 
@@ -372,8 +155,7 @@ tmgr_trace_iterator_t simgrid::trace_mgr::future_evt_set::add_trace(
   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);
 
index 540753a..28df01f 100644 (file)
@@ -18,7 +18,6 @@ option(enable_lua    "Whether the Lua bindings are activated." off)
 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)
index e991a29..c159e77 100644 (file)
@@ -113,7 +113,6 @@ message("        Documentation................: ${enable_documentation}")
 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}")
index de04a60..dcff601 100644 (file)
 /* 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. */
index 4062912..095a474 100755 (executable)
@@ -49,7 +49,7 @@ ctest -D ExperimentalStart || true
 
 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
 
@@ -67,7 +67,7 @@ ctest -D ExperimentalStart || true
 
 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
 
index ebf9aac..345caff 100755 (executable)
@@ -121,8 +121,7 @@ cmake -G"$GENERATOR"\
   -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