examples/msg/cloud-masterworker/cloud-masterworker
examples/msg/cloud-migration/cloud-migration
examples/msg/cloud-multicore/cloud-multicore
-examples/msg/cloud/scale
-examples/msg/cloud/simple_vm
-examples/msg/cloud/two_tasks_vm
+examples/msg/cloud-scale/cloud-scale
+examples/msg/cloud-simple/cloud-simple
+examples/msg/cloud-two-tasks/cloud-two-tasks
examples/msg/dht-chord/dht-chord
examples/msg/dht-kademlia/dht-kademlia
examples/msg/dht-pastry/dht-pastry
-foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany
- cloud-capping cloud-masterworker cloud-migration cloud-multicore dht-chord dht-pastry exception
+foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany cloud-capping cloud-masterworker
+ cloud-migration cloud-multicore cloud-scale cloud-simple cloud-two-tasks dht-chord dht-pastry exception
energy-consumption energy-onoff energy-pstate energy-ptask energy-vm failures io-file io-file-unlink io-remote
io-storage masterworker masterworker-mailbox pmm task-priority process-kill process-migration process-suspend
properties sendrecv set-maestro process-startkilltime synchro token_ring trace-categories
${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_kill_d.xml PARENT_SCOPE)
-foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany bittorrent chainsend
- cloud-capping cloud-masterworker cloud-migration dht-chord dht-kademlia
+foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany bittorrent chainsend cloud-capping
+ cloud-masterworker cloud-migration cloud-scale cloud-simple cloud-two-tasks dht-chord dht-kademlia
failures io-file io-file-unlink io-remote io-storage masterworker masterworker-mailbox task-priority process-kill
process-migration process-suspend properties sendrecv synchro process-startkilltime token_ring)
ADD_TESH_FACTORIES(msg-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/${x} ${x}.tesh)
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-/*
- * Usage:
- * ./examples/msg/cloud/scale ../examples/platforms/g5k.xml
- *
- * 1. valgrind --tool=callgrind ./examples/msg/cloud/scale ../examples/platforms/g5k.xml
- * 2. kcachegrind
- **/
-
-static double time_precise(void) {
- struct timeval tv;
- int ret = gettimeofday(&tv, NULL);
- xbt_assert(ret >= 0, "gettimeofday");
- return (double) tv.tv_sec + tv.tv_usec * 0.001 * 0.001;
-}
-
+static int task_count=0;
static int computation_fun(int argc, char *argv[]) {
- for (;;) {
- // double clock_sta = time_precise();
-
- msg_task_t task = MSG_task_create("Task", 10000000, 0, NULL);
- MSG_task_execute(task);
- MSG_task_destroy(task);
-
- // double clock_end = time_precise();
-
- // XBT_INFO("%f", clock_end - clock_sta);
- }
+ msg_task_t task = MSG_task_create("Task", 2210000, 0, NULL);
+ MSG_task_execute(task);
+ task_count++;
+ MSG_task_destroy(task);
return 0;
}
pm[i] = xbt_dynar_get_as(hosts_dynar, i, msg_host_t);
}
+ XBT_INFO("## Test (start)");
for (i = 0; i < nvm; i++) {
int pm_index = i % npm;
char *vm_name = bprintf("vm%d", i);
xbt_free(vm_name);
}
- XBT_INFO("## Test (start)");
-
for (i = 0; i < 10; i++) {
- double clock_sta = time_precise();
MSG_process_sleep(1);
- double clock_end = time_precise();
- XBT_INFO("duration %f", clock_end - clock_sta);
+ XBT_INFO("Completed tasks: %d", task_count);
}
for (i = 0; i < nvm; i++) {
--- /dev/null
+#! ./tesh
+
+$ $SG_TEST_EXENV ${bindir:=.}/cloud-scale$EXEEXT ${srcdir:=.}/platform.xml
+> [Jacquelin:master_:(1) 0.000000] [msg_test/INFO] ## Test (start)
+> [Jacquelin:master_:(1) 1.000000] [msg_test/INFO] Completed tasks: 0
+> [Jacquelin:master_:(1) 2.000000] [msg_test/INFO] Completed tasks: 600
+> [Jacquelin:master_:(1) 3.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 4.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 5.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 6.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 7.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 8.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 9.000000] [msg_test/INFO] Completed tasks: 900
+> [Jacquelin:master_:(1) 10.000000] [msg_test/INFO] Completed tasks: 1000
+> [Jacquelin:master_:(1) 10.000000] [msg_test/INFO] ## Test (ended)
+> [10.000000] [msg_test/INFO] Bye (simulation time 10)
p Testing a vm with two successive tasks
-$ $SG_TEST_EXENV ${bindir:=.}/simple_vm$EXEEXT --log=no_loc ${srcdir:=.}/../../platforms/small_platform.xml
+$ $SG_TEST_EXENV ${bindir:=.}/cloud-simple$EXEEXT --log=no_loc ${srcdir:=.}/small_platform.xml
> [Fafard:master_:(1) 0.000000] [msg_test/INFO] ## Test 1 (started): check computation on normal PMs
> [Fafard:master_:(1) 0.000000] [msg_test/INFO] ### Put a task on a PM
> [Fafard:compute:(2) 0.013107] [msg_test/INFO] Fafard:compute task executed 0.0131068
p Testing a vm with two successive tasks
-$ $SG_TEST_EXENV ${bindir:=.}/two_tasks_vm$EXEEXT ${srcdir:=.}/../../platforms/small_platform.xml
+$ $SG_TEST_EXENV ${bindir:=.}/cloud-two-tasks$EXEEXT ${srcdir:=.}/small_platform.xml
> [VM0:compute:(2) 0.000000] [msg_test/INFO] VM0:compute task 1 created 0
> [Fafard:master_:(1) 0.000000] [msg_test/INFO] aTask remaining duration: 1e+09
> [Fafard:master_:(1) 1.000000] [msg_test/INFO] aTask remaining duration: 9.23704e+08
+++ /dev/null
-foreach (example simple_vm scale two_tasks_vm)
- add_executable (${example} ${example}.c)
- target_link_libraries(${example} simgrid)
- set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.c)
-endforeach()
-
-ADD_TESH_FACTORIES(msg-cloud-two-tasks-vm "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/cloud/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/cloud/ --cd ${CMAKE_BINARY_DIR}/examples/msg/cloud/ ${CMAKE_HOME_DIRECTORY}/examples/msg/cloud/two_tasks_vm.tesh)
-ADD_TESH_FACTORIES(msg-cloud-simple-vm "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/cloud/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/cloud/ --cd ${CMAKE_BINARY_DIR}/examples/msg/cloud/ ${CMAKE_HOME_DIRECTORY}/examples/msg/cloud/simple_vm.tesh)
-
-set(examples_src ${examples_src} PARENT_SCOPE)
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/two_tasks_vm.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/simple_vm.tesh PARENT_SCOPE)
set(CMAKEFILES_TXT
examples/java/CMakeLists.txt
examples/msg/CMakeLists.txt
- examples/msg/cloud/CMakeLists.txt
examples/msg/mc/CMakeLists.txt
examples/s4u/CMakeLists.txt
examples/simdag/CMakeLists.txt