Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill dead code: haveGap_/senderGap_ are never used.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 3 Aug 2017 20:32:35 +0000 (22:32 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 3 Aug 2017 21:04:16 +0000 (23:04 +0200)
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_ib.cpp
src/surf/network_smpi.cpp
src/surf/network_smpi.hpp

index 5a4eb90..82384ee 100644 (file)
@@ -314,14 +314,6 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   action->latCurrent_ = action->latency_;
   action->latency_ *= latencyFactor(size);
   action->rate_ = bandwidthConstraint(action->rate_, bandwidth_bound, size);
-  if (haveGap_) {
-    xbt_assert(not route->empty(),
-               "Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!");
-
-    gapAppend(size, route->at(0), action);
-    XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)", action, src->getCname(), dst->getCname(), action->senderGap_,
-              action->latency_);
-  }
 
   int constraints_per_variable = route->size();
   if (back_route != nullptr)
@@ -364,10 +356,6 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   return action;
 }
 
-void NetworkCm02Model::gapAppend(double size, const LinkImpl* link, NetworkAction* action){
-    // Nothing
-};
-
 /************
  * Resource *
  ************/
@@ -514,8 +502,5 @@ void NetworkCm02Action::updateRemainingLazy(double now)
   lastValue_ = lmm_variable_getvalue(getVariable());
 }
 
-void NetworkCm02Link::gapAppend(double size, const LinkImpl* link, NetworkAction* action){
-    // Nothing
-};
 }
 }
index a04f215..8ffa8ef 100644 (file)
@@ -43,10 +43,6 @@ public:
   void updateActionsStateLazy(double now, double delta) override;
   void updateActionsStateFull(double now, double delta) override;
   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
-  virtual void gapAppend(double size, const LinkImpl* link, NetworkAction* action);
-
-protected:
-  bool haveGap_ = false;
 };
 
 /************
@@ -61,7 +57,6 @@ public:
   void apply_event(tmgr_trace_event_t event, double value) override;
   void setBandwidth(double value) override;
   void setLatency(double value) override;
-  virtual void gapAppend(double size, const LinkImpl* link, NetworkAction* action);
 };
 
 /**********
@@ -75,9 +70,6 @@ public:
   NetworkCm02Action(Model* model, double cost, bool failed) : NetworkAction(model, cost, failed){};
   virtual ~NetworkCm02Action() = default;
   void updateRemainingLazy(double now) override;
-
-protected:
-  double senderGap_;
 };
 }
 }
index 3293c9d..7756239 100644 (file)
@@ -104,7 +104,6 @@ namespace surf {
 
 NetworkIBModel::NetworkIBModel() : NetworkSmpiModel()
 {
-  haveGap_                      = false;
   const char* IB_factors_string = xbt_cfg_get_string("smpi/IB-penalty-factors");
   std::vector<std::string> radical_elements;
   boost::split(radical_elements, IB_factors_string, boost::is_any_of(";"));
index 8452508..1d0d2cd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -49,7 +49,6 @@ namespace surf {
 
 NetworkSmpiModel::NetworkSmpiModel() : NetworkCm02Model()
 {
-  haveGap_ = true;
 }
 
 NetworkSmpiModel::~NetworkSmpiModel() = default;
index 7a2f4db..1ab37a7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -16,7 +16,6 @@ namespace simgrid {
       NetworkSmpiModel();
       ~NetworkSmpiModel();
 
-      using NetworkCm02Model::gapAppend; // Explicit about overloaded method (silence Woverloaded-virtual from clang)
       double latencyFactor(double size);
       double bandwidthFactor(double size);
       double bandwidthConstraint(double rate, double bound, double size);