/* 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();
}
}
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.
}
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");
// 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");
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;
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();
}
}
}
// 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");
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");
#! 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...
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);
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);
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);
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);
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);
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);
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(¶ms, 0, sizeof(params));
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);
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);
task_data_get_clock(&t2);
task_data_get_clock(&t3);
- XBT_INFO("## 3. pin all VMs to CPU0 of PM1 (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);
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);
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);
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);
#! ./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
<!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>
+++ /dev/null
-<?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>
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;
}
#! ./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.
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