Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the smpi factor parsing was still returning wrong values
[simgrid.git] / src / surf / network.c
index ed1db7b..5bc5bab 100644 (file)
@@ -122,9 +122,10 @@ static double smpi_bandwidth_factor(double size)
 
   unsigned int iter = 0;
   s_smpi_factor_t fact;
+
   xbt_dynar_foreach(smpi_bw_factor, iter, fact) {
-    if (size >= fact.factor) {
-      XBT_DEBUG("%lf >= %ld return %f", size, fact.factor, fact.value);
+    if (size < fact.factor) {
+      XBT_DEBUG("%lf < %ld return %f", size, fact.factor, fact.value);
       return fact.value;
     }
   }
@@ -140,11 +141,13 @@ static double smpi_latency_factor(double size)
 
   unsigned int iter = 0;
   s_smpi_factor_t fact;
+
   xbt_dynar_foreach(smpi_lat_factor, iter, fact) {
-    if (size >= fact.factor) {
-      XBT_DEBUG("%lf >= %ld return %f", size, fact.factor, fact.value);
+    if (size < fact.factor) {
+      XBT_DEBUG("%lf < %ld return %f", size, fact.factor, fact.value);
       return fact.value;
     }
+
   }
 
   return 1.0;