Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to make TestHostOnOff do something
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 2 Jun 2016 15:47:49 +0000 (17:47 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 2 Jun 2016 15:47:49 +0000 (17:47 +0200)
  + kill a redundant platform
  + adapt another one
  + update other tests (including broken ones)
  + ... still not functional

examples/java/cloud/migration/Main.java
examples/java/cloud/migration/Test.java
examples/java/cloud/migration/TestHostOnOff.java
examples/java/cloud/migration/cloud_migration.tesh
examples/msg/cloud-multicore/cloud-multicore.c
examples/msg/cloud-multicore/cloud-multicore.tesh
examples/platforms/three_multicore_hosts.xml
examples/platforms/two_hosts_platform.xml [deleted file]
examples/s4u/basic/s4u_basic.cpp
examples/s4u/basic/s4u_basic.tesh
tools/cmake/DefinePackages.cmake

index 244569f..af1aa25 100644 (file)
@@ -32,7 +32,7 @@ public class Main {
 
     /* construct the platform and deploy the application */
     Msg.createEnvironment(args[0]);
-    new cloud.migration.Test("host0","Test").start();
+    new cloud.migration.Test("PM0","Test").start();
     Msg.run();
   }
 }
index 5eee62d..2e59f4b 100644 (file)
@@ -27,8 +27,8 @@ public class Test extends Process{
     Host host1 = null;
 
     try {
-      host0 = Host.getByName("host0");
-      host1 = Host.getByName("host1");
+      host0 = Host.getByName("PM0");
+      host1 = Host.getByName("PM1");
     }catch (HostNotFoundException e) {
       e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
     }
@@ -114,31 +114,31 @@ public class Test extends Process{
 
     Msg.info("Round trip of VM1 (load "+load1+"%)");
     vm1.setLoad(load1);
-    Msg.info("     - Launch migration from host 0 to host 1");
+    Msg.info("     - Launch migration from PM0 to PM1");
     startTime = Msg.getClock();
     vm1.migrate(host1);
     endTime = Msg.getClock();
-    Msg.info("     - End of Migration from host 0 to host 1 (duration:"+(endTime-startTime)+")");
-    Msg.info("     - Launch migration from host 1 to host 0");
+    Msg.info("     - End of Migration from PM0 to PM1 (duration:"+(endTime-startTime)+")");
+    Msg.info("     - Launch migration from PM1 to PM0");
     startTime = Msg.getClock();
     vm1.migrate(host0);
     endTime = Msg.getClock();
-    Msg.info("     - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
+    Msg.info("     - End of Migration from PM1 to PM0 (duration:"+(endTime-startTime)+")");
 
     Msg.info("");
     Msg.info("");
     Msg.info("Round trip of VM1 (load "+load2+"%)");
     vm1.setLoad(load2);
-    Msg.info("     - Launch migration from host 0 to host 1");
+    Msg.info("     - Launch migration from PM0 to PM1");
     startTime = Msg.getClock();
     vm1.migrate(host1);
     endTime = Msg.getClock();
-    Msg.info("     - End of Migration from host 0 to host 1 (duration:"+(endTime-startTime)+")");
-    Msg.info("     - Launch migration from host 1 to host 0");
+    Msg.info("     - End of Migration from PM0 to PM1 (duration:"+(endTime-startTime)+")");
+    Msg.info("     - Launch migration from PM1 to PM0");
     startTime = Msg.getClock();
     vm1.migrate(host0);
     endTime = Msg.getClock();
-    Msg.info("     - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
+    Msg.info("     - End of Migration from PM1 to PM0 (duration:"+(endTime-startTime)+")");
 
     Main.setEndOfTest();
     Msg.info("Forcefully destroy VMs");
index 0ffa765..5fccb0b 100644 (file)
@@ -15,38 +15,38 @@ import org.simgrid.msg.Process;
 // node or on the DST node. 
 public class TestHostOnOff extends Process{
 
-  public static Host host0 = null;
-  public static Host host1 = null;
-  public static Host host2 = null;
+  protected Host host0 = null;
+  protected Host host1 = null;
+  protected Host host2 = null;
 
-  TestHostOnOff(Host host, String name, String[] args) throws NativeException {
-    super(host, name, args);
+  TestHostOnOff(String hostname, String name) throws  HostNotFoundException, NativeException {
+    super(hostname, name);
   }
 
   public void main(String[] strings) throws MsgException {
     /* get hosts 1 and 2*/
     try {
-      host0 = Host.getByName("host0");
-      host1 = Host.getByName("host1");
-      host1 = Host.getByName("host2");
+      host0 = Host.getByName("PM0");
+      host1 = Host.getByName("PM1");
+      host2 = Host.getByName("PM2");
     }catch (HostNotFoundException e) {
       e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
     }
 
     // Robustness on the SRC node
-    //for (int i =0 ; i < 55000 ; i++)
-    //  testVMMigrate(host1, i);
+    for (int i =100 ; i < 55000 ; i+=100)
+     testVMMigrate(host1, i);
 
     // Robustness on the DST node
-    //for (int i =0 ; i < 55000 ; i++)
-    //  testVMMigrate(host2, i);
+    for (int i =0 ; i < 55000 ; i++)
+      testVMMigrate(host2, i);
 
     /* End of Tests */
     Msg.info("Nor more tests, Bye Bye !");
     Main.setEndOfTest();
   }
 
-  public static void testVMMigrate (Host hostToKill, long killAt) throws MsgException {
+  public void testVMMigrate (Host hostToKill, long killAt) throws MsgException {
     Msg.info("**** **** **** ***** ***** Test Migrate with host shutdown ***** ***** **** **** ****");
     Msg.info("Turn on one host, assign a VM on this host, launch a process inside the VM, migrate the VM and "
              + "turn off either the SRC or DST");
@@ -74,9 +74,9 @@ public class TestHostOnOff extends Process{
     String[] args = new String[3];
 
     args[0] = "vm0";
-    args[1] = "host1";
-    args[2] = "host2";
-    new Process(host1, "Migrate-" + new Random().nextDouble(), args) {
+    args[1] = "PM1";
+    args[2] = "PM2";
+    new Process(host1, "Migrate-" + killAt, args) {
       public void main(String[] args) {
         Host destHost = null;
         Host sourceHost = null;
@@ -94,8 +94,8 @@ public class TestHostOnOff extends Process{
               Msg.info("Migrate vm "+args[0]+" to node "+destHost.getName());
               VM.getVMByName(args[0]).migrate(destHost);
             } catch (HostFailureException e) {
-              e.printStackTrace();
               Msg.info("Something occurs during the migration that cannot validate the operation");
+              e.printStackTrace();
             }
           }
         }
@@ -104,10 +104,8 @@ public class TestHostOnOff extends Process{
 
     // Wait killAt ms before killing thehost
     Process.sleep(killAt);
+    Msg.info("The migration process should be stopped and we should catch an exception");
     hostToKill.off();
-    Process.sleep(5);
-    Msg.info("The migration process should be stopped and we should catch an exception\n");
-    Process.sleep(5);
 
     Process.sleep(50000);
     Msg.info("Destroy VMs");
@@ -115,7 +113,7 @@ public class TestHostOnOff extends Process{
     Process.sleep(20000);
   }
 
-  public static void testVMShutdownDestroy () throws HostFailureException {
+  public void testVMShutdownDestroy () throws HostFailureException {
     Msg.info("**** **** **** ***** ***** Test shutdown a VM ***** ***** **** **** ****");
     Msg.info("Turn on host1, assign a VM on host1, launch a process inside the VM, and turn off the vm, " +
         "and check whether you can reallocate the same VM");
index 73aec7c..4dfee29 100644 (file)
@@ -1,33 +1,33 @@
 #! tesh
 
-$ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms/two_hosts_platform.xml
+$ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms/three_multicore_hosts.xml
 > [0.000000] [jmsg/INFO] Using regular java threads.
-> [host0:Test:(1) 0.000000] [jmsg/INFO] This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes
-> [host0:Test:(1) 0.000000] [jmsg/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% " (see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information) 
-> [host0:Test:(1) 0.000000] [jmsg/INFO] Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see whether it impacts or not the migration time
-> [host0:Test:(1) 0.000000] [jmsg/INFO] Round trip of VM1 (load 90%)
-> [host0:Test:(1) 0.000000] [jmsg/INFO]      - Launch migration from host 0 to host 1
-> [host0:Test:(1) 0.000000] [jmsg/INFO] Start migration of VM vm0 to host1
-> [host0:Test:(1) 0.000000] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:8.10E+11
-> [host0:Test:(1) 35.084170] [jmsg/INFO] End of migration of VM vm0 to node host1
-> [host0:Test:(1) 35.084170] [jmsg/INFO]      - End of Migration from host 0 to host 1 (duration:35.0841702956701)
-> [host0:Test:(1) 35.084170] [jmsg/INFO]      - Launch migration from host 1 to host 0
-> [host0:Test:(1) 35.084170] [jmsg/INFO] Start migration of VM vm0 to host0
-> [host0:Test:(1) 35.084170] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:6.22E+11
-> [host0:Test:(1) 67.551019] [jmsg/INFO] End of migration of VM vm0 to node host0
-> [host0:Test:(1) 67.551019] [jmsg/INFO]      - End of Migration from host 1 to host 0 (duration:32.46684874546391)
-> [host0:Test:(1) 67.551019] [jmsg/INFO] 
-> [host0:Test:(1) 67.551019] [jmsg/INFO] 
-> [host0:Test:(1) 67.551019] [jmsg/INFO] Round trip of VM1 (load 80%)
-> [host0:Test:(1) 67.551019] [jmsg/INFO]      - Launch migration from host 0 to host 1
-> [host0:Test:(1) 67.551019] [jmsg/INFO] Start migration of VM vm0 to host1
-> [host0:Test:(1) 67.551019] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:4.64E+11
-> [host0:Test:(1) 102.635189] [jmsg/INFO] End of migration of VM vm0 to node host1
-> [host0:Test:(1) 102.635189] [jmsg/INFO]      - End of Migration from host 0 to host 1 (duration:35.08417029567006)
-> [host0:Test:(1) 102.635189] [jmsg/INFO]      - Launch migration from host 1 to host 0
-> [host0:Test:(1) 102.635189] [jmsg/INFO] Start migration of VM vm0 to host0
-> [host0:Test:(1) 102.635189] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:2.77E+11
-> [host0:Test:(1) 135.102038] [jmsg/INFO] End of migration of VM vm0 to node host0
-> [host0:Test:(1) 135.102038] [jmsg/INFO]      - End of Migration from host 1 to host 0 (duration:32.46684874546395)
-> [host0:Test:(1) 135.102038] [jmsg/INFO] Forcefully destroy VMs
+> [PM0:Test:(1) 0.000000] [jmsg/INFO] This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes
+> [PM0:Test:(1) 0.000000] [jmsg/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% " (see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information) 
+> [PM0:Test:(1) 0.000000] [jmsg/INFO] Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see whether it impacts or not the migration time
+> [PM0:Test:(1) 0.000000] [jmsg/INFO] Round trip of VM1 (load 90%)
+> [PM0:Test:(1) 0.000000] [jmsg/INFO]      - Launch migration from PM0 to PM1
+> [PM0:Test:(1) 0.000000] [jmsg/INFO] Start migration of VM vm0 to PM1
+> [PM0:Test:(1) 0.000000] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:8.10E+11
+> [PM0:Test:(1) 35.084170] [jmsg/INFO] End of migration of VM vm0 to node PM1
+> [PM0:Test:(1) 35.084170] [jmsg/INFO]      - End of Migration from PM0 to PM1 (duration:35.0841702956701)
+> [PM0:Test:(1) 35.084170] [jmsg/INFO]      - Launch migration from PM1 to PM0
+> [PM0:Test:(1) 35.084170] [jmsg/INFO] Start migration of VM vm0 to PM0
+> [PM0:Test:(1) 35.084170] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:6.22E+11
+> [PM0:Test:(1) 67.551019] [jmsg/INFO] End of migration of VM vm0 to node PM0
+> [PM0:Test:(1) 67.551019] [jmsg/INFO]      - End of Migration from PM1 to PM0 (duration:32.46684874546391)
+> [PM0:Test:(1) 67.551019] [jmsg/INFO] 
+> [PM0:Test:(1) 67.551019] [jmsg/INFO] 
+> [PM0:Test:(1) 67.551019] [jmsg/INFO] Round trip of VM1 (load 80%)
+> [PM0:Test:(1) 67.551019] [jmsg/INFO]      - Launch migration from PM0 to PM1
+> [PM0:Test:(1) 67.551019] [jmsg/INFO] Start migration of VM vm0 to PM1
+> [PM0:Test:(1) 67.551019] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:4.64E+11
+> [PM0:Test:(1) 102.635189] [jmsg/INFO] End of migration of VM vm0 to node PM1
+> [PM0:Test:(1) 102.635189] [jmsg/INFO]      - End of Migration from PM0 to PM1 (duration:35.08417029567006)
+> [PM0:Test:(1) 102.635189] [jmsg/INFO]      - Launch migration from PM1 to PM0
+> [PM0:Test:(1) 102.635189] [jmsg/INFO] Start migration of VM vm0 to PM0
+> [PM0:Test:(1) 102.635189] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:2.77E+11
+> [PM0:Test:(1) 135.102038] [jmsg/INFO] End of migration of VM vm0 to node PM0
+> [PM0:Test:(1) 135.102038] [jmsg/INFO]      - End of Migration from PM1 to PM0 (duration:32.46684874546395)
+> [PM0:Test:(1) 135.102038] [jmsg/INFO] Forcefully destroy VMs
 > [135.102038] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
index 9e2d68e..ebb0a22 100644 (file)
@@ -61,12 +61,12 @@ static void test_pm_pin(void)
   t3.task = MSG_task_create("Task3", 1e16, 0, NULL);
   t4.task = MSG_task_create("Task4", 1e16, 0, NULL);
 
-  MSG_process_create("worker1", worker_main, t1.task, pm1);
-  MSG_process_create("worker2", worker_main, t2.task, pm1);
-  MSG_process_create("worker3", worker_main, t3.task, pm1);
-  MSG_process_create("worker4", worker_main, t4.task, pm1);
+  MSG_process_create("worker1", worker_main, t1.task, pm2);
+  MSG_process_create("worker2", worker_main, t2.task, pm2);
+  MSG_process_create("worker3", worker_main, t3.task, pm2);
+  MSG_process_create("worker4", worker_main, t4.task, pm2);
 
-  XBT_INFO("## 1. start 4 tasks on PM1 (2 cores)");
+  XBT_INFO("## 1. start 4 tasks on PM2 (2 cores)");
   task_data_init_clock(&t1);
   task_data_init_clock(&t2);
   task_data_init_clock(&t3);
@@ -79,10 +79,10 @@ static void test_pm_pin(void)
   task_data_get_clock(&t4);
 
   XBT_INFO("## 2. pin all tasks to CPU0");
-  MSG_task_set_affinity(t1.task, pm1, 0x01);
-  MSG_task_set_affinity(t2.task, pm1, 0x01);
-  MSG_task_set_affinity(t3.task, pm1, 0x01);
-  MSG_task_set_affinity(t4.task, pm1, 0x01);
+  MSG_task_set_affinity(t1.task, pm2, 0x01);
+  MSG_task_set_affinity(t2.task, pm2, 0x01);
+  MSG_task_set_affinity(t3.task, pm2, 0x01);
+  MSG_task_set_affinity(t4.task, pm2, 0x01);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t1);
@@ -91,7 +91,7 @@ static void test_pm_pin(void)
   task_data_get_clock(&t4);
 
   XBT_INFO("## 3. clear the affinity of task4");
-  MSG_task_set_affinity(t4.task, pm1, 0);
+  MSG_task_set_affinity(t4.task, pm2, 0);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t1);
@@ -100,7 +100,7 @@ static void test_pm_pin(void)
   task_data_get_clock(&t4);
 
   XBT_INFO("## 4. clear the affinity of task3");
-  MSG_task_set_affinity(t3.task, pm1, 0);
+  MSG_task_set_affinity(t3.task, pm2, 0);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t1);
@@ -109,7 +109,7 @@ static void test_pm_pin(void)
   task_data_get_clock(&t4);
 
   XBT_INFO("## 5. clear the affinity of task2");
-  MSG_task_set_affinity(t2.task, pm1, 0);
+  MSG_task_set_affinity(t2.task, pm2, 0);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t1);
@@ -120,8 +120,8 @@ static void test_pm_pin(void)
   XBT_INFO("## 6. pin all tasks to CPU0 of another PM (no effect now)");
   MSG_task_set_affinity(t1.task, pm0, 0);
   MSG_task_set_affinity(t2.task, pm0, 0);
-  MSG_task_set_affinity(t3.task, pm2, 0);
-  MSG_task_set_affinity(t4.task, pm2, 0);
+  MSG_task_set_affinity(t3.task, pm1, 0);
+  MSG_task_set_affinity(t4.task, pm1, 0);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t1);
@@ -148,11 +148,11 @@ static void test_vm_pin(void)
   msg_host_t pm2 = xbt_dynar_get_as(hosts_dynar, 2, msg_host_t); // 4 cores
   xbt_dynar_free(&hosts_dynar);
 
-  /* set up VMs on PM2 (4 cores) */
-  msg_vm_t vm0 = MSG_vm_create_core(pm2, "VM0");
-  msg_vm_t vm1 = MSG_vm_create_core(pm2, "VM1");
-  msg_vm_t vm2 = MSG_vm_create_core(pm2, "VM2");
-  msg_vm_t vm3 = MSG_vm_create_core(pm2, "VM3");
+  /* set up VMs on PM1 (4 cores) */
+  msg_vm_t vm0 = MSG_vm_create_core(pm1, "VM0");
+  msg_vm_t vm1 = MSG_vm_create_core(pm1, "VM1");
+  msg_vm_t vm2 = MSG_vm_create_core(pm1, "VM2");
+  msg_vm_t vm3 = MSG_vm_create_core(pm1, "VM3");
 
   s_vm_params_t params;
   memset(&params, 0, sizeof(params));
@@ -187,7 +187,7 @@ static void test_vm_pin(void)
   MSG_process_create("worker3", worker_main, t3.task, vm3);
 
   /* start experiments */
-  XBT_INFO("## 1. start 4 VMs on PM2 (4 cores)");
+  XBT_INFO("## 1. start 4 VMs on PM1 (4 cores)");
   task_data_init_clock(&t0);
   task_data_init_clock(&t1);
   task_data_init_clock(&t2);
@@ -199,11 +199,11 @@ static void test_vm_pin(void)
   task_data_get_clock(&t2);
   task_data_get_clock(&t3);
 
-  XBT_INFO("## 2. pin all VMs to CPU0 of PM2");
-  MSG_vm_set_affinity(vm0, pm2, 0x01);
-  MSG_vm_set_affinity(vm1, pm2, 0x01);
-  MSG_vm_set_affinity(vm2, pm2, 0x01);
-  MSG_vm_set_affinity(vm3, pm2, 0x01);
+  XBT_INFO("## 2. pin all VMs to CPU0 of PM1");
+  MSG_vm_set_affinity(vm0, pm1, 0x01);
+  MSG_vm_set_affinity(vm1, pm1, 0x01);
+  MSG_vm_set_affinity(vm2, pm1, 0x01);
+  MSG_vm_set_affinity(vm3, pm1, 0x01);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t0);
@@ -211,12 +211,12 @@ static void test_vm_pin(void)
   task_data_get_clock(&t2);
   task_data_get_clock(&t3);
 
-  XBT_INFO("## 3. pin all VMs to CPU0 of PM(no effect at now)");
+  XBT_INFO("## 3. pin all VMs to CPU0 of PM2(no effect at now)");
   /* Because VMs are on PM2, the below operations do not effect computation now. */
-  MSG_vm_set_affinity(vm0, pm1, 0x01);
-  MSG_vm_set_affinity(vm1, pm1, 0x01);
-  MSG_vm_set_affinity(vm2, pm1, 0x01);
-  MSG_vm_set_affinity(vm3, pm1, 0x01);
+  MSG_vm_set_affinity(vm0, pm2, 0x01);
+  MSG_vm_set_affinity(vm1, pm2, 0x01);
+  MSG_vm_set_affinity(vm2, pm2, 0x01);
+  MSG_vm_set_affinity(vm3, pm2, 0x01);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t0);
@@ -224,10 +224,10 @@ static void test_vm_pin(void)
   task_data_get_clock(&t2);
   task_data_get_clock(&t3);
 
-  XBT_INFO("## 4. unpin VM0, and pin VM2 and VM3 to CPU1 of PM2");
-  MSG_vm_set_affinity(vm0, pm2, 0x00);
-  MSG_vm_set_affinity(vm2, pm2, 0x02);
-  MSG_vm_set_affinity(vm3, pm2, 0x02);
+  XBT_INFO("## 4. unpin VM0, and pin VM2 and VM3 to CPU1 of PM1");
+  MSG_vm_set_affinity(vm0, pm1, 0x00);
+  MSG_vm_set_affinity(vm2, pm1, 0x02);
+  MSG_vm_set_affinity(vm3, pm1, 0x02);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t0);
@@ -253,11 +253,11 @@ static void test_vm_pin(void)
   task_data_get_clock(&t2);
   task_data_get_clock(&t3);
 
-  XBT_INFO("## 6. migrate all VMs to PM1 (2 CPU cores, with affinity settings)");
-  MSG_vm_migrate(vm0, pm1);
-  MSG_vm_migrate(vm1, pm1);
-  MSG_vm_migrate(vm2, pm1);
-  MSG_vm_migrate(vm3, pm1);
+  XBT_INFO("## 6. migrate all VMs to PM2 (2 CPU cores, with affinity settings)");
+  MSG_vm_migrate(vm0, pm2);
+  MSG_vm_migrate(vm1, pm2);
+  MSG_vm_migrate(vm2, pm2);
+  MSG_vm_migrate(vm3, pm2);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t0);
@@ -273,10 +273,10 @@ static void test_vm_pin(void)
 
 
   XBT_INFO("## 7. clear affinity settings on PM1");
-  MSG_vm_set_affinity(vm0, pm1, 0);
-  MSG_vm_set_affinity(vm1, pm1, 0);
-  MSG_vm_set_affinity(vm2, pm1, 0);
-  MSG_vm_set_affinity(vm3, pm1, 0);
+  MSG_vm_set_affinity(vm0, pm2, 0);
+  MSG_vm_set_affinity(vm1, pm2, 0);
+  MSG_vm_set_affinity(vm2, pm2, 0);
+  MSG_vm_set_affinity(vm3, pm2, 0);
 
   MSG_process_sleep(10);
   task_data_get_clock(&t0);
index ae23645..11c3790 100644 (file)
@@ -1,14 +1,14 @@
 #! ./tesh
 
 $ $SG_TEST_EXENV ${bindir:=.}/cloud-multicore$EXEEXT --log=no_loc ${srcdir:=.}/three_multicore_hosts.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:maestro@) PM0: 1 core(s), 100000000.000000 flops/s per each
-> [  0.000000] (0:maestro@) PM1: 2 core(s), 100000000.000000 flops/s per each
-> [  0.000000] (0:maestro@) PM2: 4 core(s), 100000000.000000 flops/s per each
+> [  0.000000] (0:maestro@) PM0: 4 core(s), 8095000000.000001 flops/s per each
+> [  0.000000] (0:maestro@) PM1: 4 core(s), 8095000000.000001 flops/s per each
+> [  0.000000] (0:maestro@) PM2: 2 core(s), 8095000000.000001 flops/s per each
 > [  0.000000] (1:master@PM0) === Test PM (set affinity) ===
-> [  0.000000] (1:master@PM0) ## 1. start 4 tasks on PM1 (2 cores)
-> [ 10.000000] (1:master@PM0) Task1: 50000000.000000 fops/s
-> [ 10.000000] (1:master@PM0) Task2: 50000000.000000 fops/s
-> [ 10.000000] (1:master@PM0) Task3: 50000000.000000 fops/s
-> [ 10.000000] (1:master@PM0) Task4: 50000000.000000 fops/s
+> [  0.000000] (1:master@PM0) ## 1. start 4 tasks on PM2 (2 cores)
+> [ 10.000000] (1:master@PM0) Task1: 4047500000.000000 fops/s
+> [ 10.000000] (1:master@PM0) Task2: 4047500000.000000 fops/s
+> [ 10.000000] (1:master@PM0) Task3: 4047500000.000000 fops/s
+> [ 10.000000] (1:master@PM0) Task4: 4047500000.000000 fops/s
 > [ 10.000000] (1:master@PM0) ## 2. pin all tasks to CPU0
-> [ 10.000000] (1:master@PM0) set affinity(0x0001@PM1) for Task1
+> [ 10.000000] (1:master@PM0) set affinity(0x0001@PM2) for Task1
index 7372bf9..adbed97 100644 (file)
@@ -2,11 +2,11 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
   <AS id="siteA" routing="Full">
-    <host id="PM0" speed="100Mf" core="1"/>
-    <host id="PM1" speed="100Mf" core="2"/>
-    <host id="PM2" speed="100Mf" core="4"/>
+    <host id="PM0" speed="8.095Gf" core="4"/>
+    <host id="PM1" speed="8.095Gf" core="4"/>
+    <host id="PM2" speed="8.095Gf" core="2"/>
 
-    <link id="link1" bandwidth="100Mbps" latency="10ms" />
+    <link id="link1" bandwidth="125MBps" latency="100us" />
 
     <route src="PM0" dst="PM1"><link_ctn id="link1"/></route>
     <route src="PM0" dst="PM2"><link_ctn id="link1"/></route>
diff --git a/examples/platforms/two_hosts_platform.xml b/examples/platforms/two_hosts_platform.xml
deleted file mode 100644 (file)
index b784909..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-  <AS  id="AS0"  routing="Full">
-    <host id="host0" core="4" speed="8.095Gf"/>
-    <host id="host1" core="4" speed="8.095Gf"/>
-    <link id="link1" bandwidth="125MBps" latency="100us"/>
-    <route src="host0" dst="host1"><link_ctn id="link1"/></route>
-  </AS>
-</platform>
index e4329fe..13d0103 100644 (file)
@@ -33,9 +33,9 @@ public:
 
 int main(int argc, char **argv) {
   simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);
-  e->loadPlatform("../../platforms/two_hosts_platform.xml");
-  new simgrid::s4u::Actor("worker", simgrid::s4u::Host::by_name("host0"), Worker());
-  new simgrid::s4u::Actor("master", simgrid::s4u::Host::by_name("host1"), 0, Master());
+  e->loadPlatform("../../platforms/two_hosts.xml");
+  new simgrid::s4u::Actor("worker", simgrid::s4u::Host::by_name("Tremblay"), Worker());
+  new simgrid::s4u::Actor("master", simgrid::s4u::Host::by_name("Jupiter"), 0, Master());
   e->run();
   return 0;
 }
index e081aa7..111fea7 100644 (file)
@@ -1,8 +1,8 @@
 #! ./tesh
 
 $ $SG_TEST_EXENV ${bindir:=.}/s4u_basic
-> [host0:worker:(0) 0.000000] [s4u_test/INFO] Hello s4u, I'm ready to serve
-> [host1:master:(0) 0.000000] [s4u_test/INFO] Hello s4u, I have something to send
-> [host0:worker:(0) 0.001301] [s4u_test/INFO] I received 'GaBuZoMeu'
-> [host0:worker:(0) 0.001301] [s4u_test/INFO] I'm done. See you.
-> [host1:master:(0) 0.001301] [s4u_test/INFO] I'm done. See you.
+> [Tremblay:worker:(0) 0.000000] [s4u_test/INFO] Hello s4u, I'm ready to serve
+> [Jupiter:master:(0) 0.000000] [s4u_test/INFO] Hello s4u, I have something to send
+> [Tremblay:worker:(0) 0.001301] [s4u_test/INFO] I received 'GaBuZoMeu'
+> [Tremblay:worker:(0) 0.001301] [s4u_test/INFO] I'm done. See you.
+> [Jupiter:master:(0) 0.001301] [s4u_test/INFO] I'm done. See you.
index 7e7bb5f..44322a6 100644 (file)
@@ -1088,7 +1088,6 @@ set(PLATFORMS_EXAMPLES
   examples/platforms/torus_cluster.xml
   examples/platforms/two_clusters.xml
   examples/platforms/two_hosts.xml
-  examples/platforms/two_hosts_platform.xml
   examples/platforms/two_hosts_platform_shared.xml
   examples/platforms/two_hosts_platform_with_availability.xml
   examples/platforms/two_hosts_platform_with_availability_included.xml