Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add comments
authorTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Thu, 6 Jun 2013 14:54:45 +0000 (16:54 +0200)
committerTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Thu, 6 Jun 2013 14:54:45 +0000 (16:54 +0200)
examples/msg/cloud/bound.c
src/msg/msg_vm.c

index 20d081c..ec22eef 100644 (file)
@@ -72,6 +72,7 @@ static int worker_busy_loop_main(int argc, char *argv[])
   return 0;
 }
 
+/* FIXME: */
 #define DOUBLE_MAX 100000000000L
 
 static void test_dynamic_change(void)
@@ -108,8 +109,8 @@ static void test_dynamic_change(void)
       double task0_flops_per_sec = task0_remain_prev - task0_remain_now;
       double task1_flops_per_sec = task1_remain_prev - task1_remain_now;
 
-      XBT_INFO("VM0: %f flops/s", task0_flops_per_sec / 100);
-      XBT_INFO("VM1: %f flops/s", task1_flops_per_sec / 100);
+      XBT_INFO("Task0@VM0: %f flops/s", task0_flops_per_sec / 100);
+      XBT_INFO("Task1@VM1: %f flops/s", task1_flops_per_sec / 100);
 
       task0_remain_prev = task0_remain_now;
       task1_remain_prev = task1_remain_now;
@@ -338,7 +339,7 @@ static int master_main(int argc, char *argv[])
   }
 
 
-  XBT_INFO("# 10. Change a bound dynamically");
+  XBT_INFO("# 10. Change a bound dynamically.");
   test_dynamic_change();
 
   return 0;
@@ -360,7 +361,11 @@ int main(int argc, char *argv[])
   MSG_init(&argc, argv);
 
   /* load the platform file */
-  xbt_assert(argc == 2);
+  if (argc != 2) {
+    printf("Usage: %s example/msg/cloud/simple_plat.xml\n", argv[0]);
+    return 1;
+  }
+
   MSG_create_environment(argv[1]);
 
   xbt_dynar_t hosts_dynar = MSG_hosts_as_dynar();
index 6cbe343..8055867 100644 (file)
@@ -1184,6 +1184,7 @@ msg_host_t MSG_vm_get_pm(msg_vm_t vm)
 /** @brief Set a CPU bound for a given VM.
  *  @ingroup msg_VMs
  *
+ * 1.
  * Note that in some cases MSG_task_set_bound() may not intuitively work for VMs.
  *
  * For example,
@@ -1207,6 +1208,10 @@ msg_host_t MSG_vm_get_pm(msg_vm_t vm)
  *
  * The current solution is to use MSG_vm_set_bound(), which allows us to
  * directly set the bound of the dummy CPU action.
+ *
+ *
+ * 2.
+ * Note that bound == 0 means no bound (i.e., unlimited).
  */
 void MSG_vm_set_bound(msg_vm_t vm, double bound)
 {