Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't use xbt_assert for error checking.
[simgrid.git] / src / surf / network_cm02.cpp
index e34e829..b80ddfd 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "network_cm02.hpp"
 #include "maxmin_private.hpp"
 #include "simgrid/sg_config.h"
@@ -372,12 +378,12 @@ ActionPtr NetworkCm02Model::communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
 
   xbt_dynar_t route = xbt_dynar_new(sizeof(RoutingEdgePtr), NULL);
 
-  XBT_IN("(%s,%s,%g,%g)", src->p_name, dst->p_name, size, rate);
+  XBT_IN("(%s,%s,%g,%g)", src->getName(), dst->getName(), size, rate);
 
   routing_platf->getRouteAndLatency(src, dst, &route, &latency);
   xbt_assert(!xbt_dynar_is_empty(route) || latency,
              "You're trying to send data from %s to %s but there is no connection at all between these two hosts.",
-             src->p_name, dst->p_name);
+             src->getName(), dst->getName());
 
   xbt_dynar_foreach(route, i, _link) {
        link = static_cast<NetworkCm02LinkPtr>(_link);
@@ -434,7 +440,7 @@ ActionPtr NetworkCm02Model::communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
     link = *static_cast<NetworkCm02LinkPtr *>(xbt_dynar_get_ptr(route, 0));
     gapAppend(size, link, action);
     XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)",
-              action, src->p_name, dst->p_name, action->m_senderGap,
+              action, src->getName(), dst->getName(), action->m_senderGap,
               action->m_latency);
   }
 
@@ -624,10 +630,10 @@ void NetworkCm02Action::updateRemainingLazy(double now)
   delta = now - m_lastUpdate;
 
   if (m_remains > 0) {
-    XBT_DEBUG("Updating action(%p): remains was %lf, last_update was: %lf", this, m_remains, m_lastUpdate);
+    XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate);
     double_update(&(m_remains), m_lastValue * delta);
 
-    XBT_DEBUG("Updating action(%p): remains is now %lf", this, m_remains);
+    XBT_DEBUG("Updating action(%p): remains is now %f", this, m_remains);
   }
 
   if (m_maxDuration != NO_MAX_DURATION)