examples/msg/masterslave/masterslave_cluster
examples/msg/masterslave/masterslave_failure
examples/msg/masterslave/masterslave_forwarder
-examples/msg/masterslave/masterslave_kill
+examples/msg/process-kill/process-kill
examples/msg/masterslave/masterslave_mailbox
examples/msg/masterslave/toto.txt
examples/msg/mc/bugged1
examples/msg/mc/test/snapshot_comparison3
examples/msg/mc/test/snapshot_comparison4
examples/msg/mc/test/snapshot_comparison5
-examples/msg/migration/migration
+examples/msg/process-migration/process-migration
examples/msg/ms.trace
examples/msg/ns3/ns3
examples/msg/pmm/pmm
examples/msg/set-maestro/set-maestro
examples/msg/simulation.trace
examples/msg/start_kill_time/start_kill_time
-examples/msg/suspend/suspend
+examples/msg/process-suspend/process-suspend
examples/msg/tasks.trace
examples/msg/token_ring/token_ring
-examples/msg/toto.txt
examples/msg/trace/test_trace_integration
examples/msg/tracing/categories
examples/msg/tracing/link_srcdst_user_variables
foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany dht-chord dht-pastry
- exception energy-consumption energy-onoff energy-pstate energy-ptask energy-vm
- migration pmm priority properties sendrecv set-maestro suspend start_kill_time synchro token_ring)
+ exception energy-consumption energy-onoff energy-pstate energy-ptask energy-vm pmm priority process-kill
+ process-migration process-suspend properties sendrecv set-maestro start_kill_time synchro token_ring)
add_executable (${x} ${x}/${x}.c)
target_link_libraries(${x} simgrid)
set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
${CMAKE_CURRENT_SOURCE_DIR}/start_kill_time/start_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/start_kill_time/start_kill_d.xml PARENT_SCOPE)
-foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany dht-chord migration priority properties
- sendrecv suspend synchro start_kill_time token_ring)
+foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany dht-chord priority process-kill
+ process-migration process-suspend properties sendrecv synchro start_kill_time 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)
endforeach()
add_executable (masterslave_arg masterslave_arg.c)
target_link_libraries(masterslave_arg simgrid)
-add_executable (masterslave_kill masterslave_kill.c)
-target_link_libraries(masterslave_kill simgrid)
ADD_TESH_FACTORIES(msg-masterslave "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_crosstraffic.tesh)
-ADD_TESH_FACTORIES(msg-masterslave-kill "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_kill.tesh)
ADD_TESH_FACTORIES(msg-masterslave-multicore "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
ADD_TESH_FACTORIES(msg-masterslave-cpu-ti "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti_crosstraffic.tesh)
ADD_TESH_FACTORIES(msg-masterslave-vivaldi "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
ADD_TESH_FACTORIES(msg-masterslave-no-crosstraffic "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
-set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_arg.c
- ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.c PARENT_SCOPE)
+set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_arg.c PARENT_SCOPE)
set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/masterslave.tesh
${CMAKE_CURRENT_SOURCE_DIR}/masterslave_crosstraffic.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.tesh
${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cpu_ti.tesh
${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cpu_ti_crosstraffic.tesh
${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cas01_im.tesh
${CMAKE_CURRENT_SOURCE_DIR}/masterslave_vivaldi.tesh PARENT_SCOPE)
set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_forwarder.xml
${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_kill.xml
${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox_multicore.xml
${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_vivaldi.xml
${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave.xml PARENT_SCOPE)
+++ /dev/null
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
- <process host="Tremblay" function="master"/>
-</platform>
+++ /dev/null
-#! ./tesh
-
-p Testing a simple master/slave example application
-
-$ $SG_TEST_EXENV masterslave/masterslave_kill$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/masterslave/deployment_masterslave_kill.xml --log=surf_maxmin.thres:error
-> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Hello!
-> [Fafard:slave:(2) 0.000000] [msg_test/INFO] Hello!
-> [Fafard:slave:(2) 0.000000] [msg_test/INFO] Suspending myself
-> [Tremblay:master:(1) 10.000000] [msg_test/INFO] Resume process
-> [Tremblay:master:(1) 10.000000] [msg_test/INFO] Kill process
-> [Tremblay:master:(1) 10.000000] [msg_test/INFO] OK, goodbye now.
-> [10.000000] [msg_test/INFO] Simulation time 10
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-/** Lazy guy function. This process suspends itself asap. */
-static int slave(int argc, char *argv[])
+static int victim(int argc, char *argv[])
{
XBT_INFO("Hello!");
XBT_INFO("Suspending myself");
MSG_process_suspend(MSG_process_self());
XBT_INFO("OK, OK. Let's work");
- MSG_task_execute(MSG_task_create("toto", 1e9, 0, NULL));
+ MSG_task_execute(MSG_task_create("work", 1e9, 0, NULL));
XBT_INFO("Bye!");
return 0;
}
-static int master(int argc, char *argv[])
+static int killer(int argc, char *argv[])
{
- msg_process_t bob = NULL;
+ msg_process_t poor_victim = NULL;
XBT_INFO("Hello!");
- bob = MSG_process_create("slave", slave, NULL, MSG_host_by_name("Fafard"));
+ poor_victim = MSG_process_create("victim", victim, NULL, MSG_host_by_name("Fafard"));
MSG_process_sleep(10.0);
XBT_INFO("Resume process");
- MSG_process_resume(bob);
+ MSG_process_resume(poor_victim);
XBT_INFO("Kill process");
- MSG_process_kill(bob);
+ MSG_process_kill(poor_victim);
XBT_INFO("OK, goodbye now.");
return 0;
msg_error_t res = MSG_OK;
MSG_init(&argc, argv);
- xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
- "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n", argv[0], argv[0]);
+ xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
MSG_create_environment(argv[1]);
- MSG_function_register("master", master);
- MSG_function_register("slave", slave);
- MSG_launch_application(argv[2]);
+ MSG_function_register("killer", killer);
+ MSG_function_register("victim", victim);
+ MSG_process_create("killer", killer, NULL, MSG_host_by_name("Tremblay"));
res = MSG_main();
--- /dev/null
+#! ./tesh
+
+p Testing a MSG_process_kill function
+
+$ $SG_TEST_EXENV ${bindir:=.}/process-kill ${srcdir:=.}/small_platform.xml --log=surf_maxmin.thres:error
+> [Tremblay:killer:(1) 0.000000] [msg_test/INFO] Hello!
+> [Fafard:victim:(2) 0.000000] [msg_test/INFO] Hello!
+> [Fafard:victim:(2) 0.000000] [msg_test/INFO] Suspending myself
+> [Tremblay:killer:(1) 10.000000] [msg_test/INFO] Resume process
+> [Tremblay:killer:(1) 10.000000] [msg_test/INFO] Kill process
+> [Tremblay:killer:(1) 10.000000] [msg_test/INFO] OK, goodbye now.
+> [10.000000] [msg_test/INFO] Simulation time 10
p Testing the migration feature of MSG
! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/migration ${srcdir:=.}/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-migration ${srcdir:=.}/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:emigrant@Jacquelin) I'll look for a new job on another machine where the grass is greener.
> [ 0.000000] (1:emigrant@Boivin) Yeah, found something to do
> [ 0.000000] (2:policeman@Boivin) Wait a bit before migrating the emigrant.
p Testing the suspend/resume feature of MSG
! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/suspend ${srcdir:=.}/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-suspend ${srcdir:=.}/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:dream_master@Jacquelin) Let's create a lazy guy.
> [ 0.000000] (1:dream_master@Jacquelin) Let's wait a little bit...
> [ 0.000000] (2:Lazy@Jacquelin) Nobody's watching me ? Let's go to sleep.