Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 30 Nov 2017 08:44:51 +0000 (09:44 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 30 Nov 2017 08:44:51 +0000 (09:44 +0100)
32 files changed:
ChangeLog
examples/msg/CMakeLists.txt
examples/msg/README.doc
examples/msg/process-kill/process-kill.tesh [deleted file]
examples/s4u/actor-kill/s4u-actor-kill.cpp
examples/s4u/actor-kill/s4u-actor-kill.tesh
src/simix/ActorImpl.cpp
teshsuite/msg/CMakeLists.txt
teshsuite/msg/cloud-sharing/cloud-sharing.tesh
teshsuite/msg/get_sender/get_sender.tesh
teshsuite/msg/host_on_off/host_on_off.tesh
teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh
teshsuite/msg/host_on_off_recv/host_on_off_recv.tesh
teshsuite/msg/process-kill/process-kill.c [moved from examples/msg/process-kill/process-kill.c with 58% similarity]
teshsuite/msg/process-kill/process-kill.tesh [new file with mode: 0644]
teshsuite/msg/process-yield/process-yield.tesh
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh
teshsuite/msg/task_listen_from/task_listen_from.tesh
teshsuite/msg/task_progress/task_progress.tesh
teshsuite/msg/trace_integration/trace_integration.tesh
teshsuite/s4u/CMakeLists.txt
teshsuite/s4u/actor/actor.tesh
teshsuite/s4u/concurrent_rw/concurrent_rw.tesh
teshsuite/s4u/host_on_off_wait/host_on_off_wait.tesh
teshsuite/s4u/listen_async/listen_async.tesh
teshsuite/s4u/pid/pid.tesh
teshsuite/s4u/storage_client_server/storage_client_server.tesh
teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/type-vector/type-vector.tesh
teshsuite/surf/CMakeLists.txt
teshsuite/surf/surf_usage/surf_usage.tesh
teshsuite/surf/surf_usage2/surf_usage2.tesh

index eb74d9a..73d46ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,9 @@ SimGrid (3.18) NOT RELEASED YET (target: December 24 2017)
  TRACE
  - Remove viva specific tracing as the tool is no longer maintained
 
+ Fixed bugs:
+ - #248: Kill of finished MSG processes leads to segfault
+
 SimGrid (3.17) Released October 8 2017
 
  The Drained Leaks release: (almost) no known leaks despite the tests.
index d55fb5c..0c6fa92 100644 (file)
@@ -4,7 +4,7 @@ foreach(x app-masterworker app-pingpong app-token-ring async-wait async-waitall
           dht-pastry energy-consumption energy-onoff energy-pstate energy-ptask energy-vm platform-failures 
           io-file io-remote io-storage task-priority 
           plugin-hostload 
-         process-create process-daemon process-join process-kill process-migration process-suspend 
+         process-create process-daemon process-join process-migration process-suspend 
           platform-properties process-startkilltime synchro-semaphore trace-categories 
           trace-route-user-variables trace-link-user-variables trace-masterworker trace-platform 
           trace-process-migration trace-host-user-variables)
@@ -83,7 +83,7 @@ set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/a
 foreach(x app-chainsend app-masterworker app-pingpong app-token-ring
           async-wait async-waitall async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple 
           cloud-two-tasks dht-pastry dht-kademlia platform-failures io-file io-remote io-storage task-priority 
-          process-create process-daemon process-join process-kill process-migration process-startkilltime process-suspend 
+          process-create process-daemon process-join process-migration process-startkilltime process-suspend 
          platform-properties synchro-semaphore)
   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()
index 42597dd..17aeb0a 100644 (file)
@@ -76,9 +76,6 @@ shipped in the archive:
     Processes can be suspended and resumed during their executions
     thanks to the @ref MSG_process_suspend and @ref MSG_process_resume functions.
 
-  - <b>Kill processes</b>.
-    @ref examples/msg/process-kill/process-kill.c \n
-    Processes can forcefully stop other processes with the @ref MSG_process_kill function.
      
   - <b>Migrating processes</b>.
     @ref examples/msg/process-migration/process-migration.c \n
@@ -232,7 +229,6 @@ top of the example file).
 
 @example examples/msg/process-create/process-create.c
 @example examples/msg/process-suspend/process-suspend.c
-@example examples/msg/process-kill/process-kill.c
 @example examples/msg/process-migration/process-migration.c
 @example examples/msg/process-startkilltime/process-startkilltime.c
 
diff --git a/examples/msg/process-kill/process-kill.tesh b/examples/msg/process-kill/process-kill.tesh
deleted file mode 100644 (file)
index abe9ae6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! ./tesh
-
-p Testing a MSG_process_kill function
-
-$ $SG_TEST_EXENV ${bindir:=.}/process-kill ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:killer@Tremblay) Hello!
-> [  0.000000] (2:victim@Fafard) Hello!
-> [  0.000000] (2:victim@Fafard) Suspending myself
-> [ 10.000000] (1:killer@Tremblay) Resume process
-> [ 10.000000] (1:killer@Tremblay) Kill process
-> [ 10.000000] (1:killer@Tremblay) OK, goodbye now. I commit a suicide.
-> [ 10.000000] (0:maestro@) Simulation time 10
index fe726b4..78658b9 100644 (file)
@@ -13,7 +13,7 @@ static int on_exit(void*, void*)
   return 0;
 }
 
-static void victim()
+static void victimA_fun()
 {
   simgrid::s4u::this_actor::onExit(on_exit, nullptr);
   XBT_INFO("Hello!");
@@ -24,19 +24,29 @@ static void victim()
   XBT_INFO("Bye!"); /* - But will never reach the end of it */
 }
 
+static void victimB_fun()
+{
+  XBT_INFO("Terminate before being killed");
+}
+
 static void killer()
 {
   XBT_INFO("Hello!"); /* - First start a victim process */
-  simgrid::s4u::ActorPtr poor_victim =
-      simgrid::s4u::Actor::createActor("victim", simgrid::s4u::Host::by_name("Fafard"), victim);
+  simgrid::s4u::ActorPtr victimA =
+      simgrid::s4u::Actor::createActor("victim A", simgrid::s4u::Host::by_name("Fafard"), victimA_fun);
+  simgrid::s4u::ActorPtr victimB =
+      simgrid::s4u::Actor::createActor("victim B", simgrid::s4u::Host::by_name("Jupiter"), victimB_fun);
   simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
 
-  XBT_INFO("Resume the victim"); /* - Resume it from its suspended state */
-  poor_victim->resume();
+  XBT_INFO("Resume the victim A"); /* - Resume it from its suspended state */
+  victimA->resume();
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Kill the victim"); /* - and then kill it */
-  poor_victim->kill();
+  XBT_INFO("Kill the victim A"); /* - and then kill it */
+  victimA->kill();
+
+  XBT_INFO("Kill victimB, even if it's already dead"); /* that's a no-op, there is no zombies in SimGrid */
+  victimB->kill();
   simgrid::s4u::this_actor::sleep_for(1);
 
   XBT_INFO("Killing everybody but myself");
@@ -54,12 +64,8 @@ int main(int argc, char* argv[])
   xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
 
   e.loadPlatform(argv[1]); /* - Load the platform description */
-  /* - Create and deploy killer process, that will create the victim process  */
+  /* - Create and deploy killer process, that will create the victim actors  */
   simgrid::s4u::Actor::createActor("killer", simgrid::s4u::Host::by_name("Tremblay"), killer);
-  simgrid::s4u::Actor::createActor("Alice", simgrid::s4u::Host::by_name("Jupiter"), victim);
-  simgrid::s4u::Actor::createActor("Bob", simgrid::s4u::Host::by_name("Ginette"), victim);
-  simgrid::s4u::Actor::createActor("Carol", simgrid::s4u::Host::by_name("Bourassa"), victim);
-  simgrid::s4u::Actor::createActor("Dave", simgrid::s4u::Host::by_name("Boivin"), victim);
 
   e.run(); /* - Run the simulation */
 
index 0f68771..631e899 100644 (file)
@@ -2,24 +2,14 @@
 
 $ $SG_TEST_EXENV ${bindir:=.}/s4u-actor-kill ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (killer@Tremblay) Hello!
-> [  0.000000] (Alice@Jupiter) Hello!
-> [  0.000000] (Alice@Jupiter) Suspending myself
-> [  0.000000] (Bob@Ginette) Hello!
-> [  0.000000] (Bob@Ginette) Suspending myself
-> [  0.000000] (Carol@Bourassa) Hello!
-> [  0.000000] (Carol@Bourassa) Suspending myself
-> [  0.000000] (Dave@Boivin) Hello!
-> [  0.000000] (Dave@Boivin) Suspending myself
-> [  0.000000] (victim@Fafard) Hello!
-> [  0.000000] (victim@Fafard) Suspending myself
-> [ 10.000000] (killer@Tremblay) Resume the victim
-> [ 10.000000] (victim@Fafard) OK, OK. Let's work
-> [ 12.000000] (killer@Tremblay) Kill the victim
-> [ 12.000000] (victim@Fafard) I have been killed!
+> [  0.000000] (victim A@Fafard) Hello!
+> [  0.000000] (victim A@Fafard) Suspending myself
+> [  0.000000] (victim B@Jupiter) Terminate before being killed
+> [ 10.000000] (killer@Tremblay) Resume the victim A
+> [ 10.000000] (victim A@Fafard) OK, OK. Let's work
+> [ 12.000000] (killer@Tremblay) Kill the victim A
+> [ 12.000000] (victim A@Fafard) I have been killed!
+> [ 12.000000] (killer@Tremblay) Kill victimB, even if it's already dead
 > [ 13.000000] (killer@Tremblay) Killing everybody but myself
-> [ 13.000000] (Alice@Jupiter) I have been killed!
-> [ 13.000000] (Bob@Ginette) I have been killed!
-> [ 13.000000] (Carol@Bourassa) I have been killed!
-> [ 13.000000] (Dave@Boivin) I have been killed!
 > [ 13.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide.
 > [ 13.000000] (maestro@) Simulation time 13
index ed204c9..29ca5bf 100644 (file)
@@ -464,6 +464,12 @@ void SIMIX_process_runall()
  */
 void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
 
+  if (process->finished) {
+    XBT_DEBUG("Ignoring request to kill process %s@%s that is already dead", process->getCname(),
+              process->host->getCname());
+    return;
+  }
+
   XBT_DEBUG("Killing process %s@%s", process->getCname(), process->host->getCname());
 
   process->context->iwannadie = 1;
index c52f14f..5d4b694 100644 (file)
@@ -1,6 +1,6 @@
 # C examples
 foreach(x actions-comm actions-storage cloud-sharing get_sender host_on_off host_on_off_recv host_on_off_processes
-          process-yield
+          process-kill process-yield
           trace_integration)
   add_executable       (${x}  ${x}/${x}.c)
   target_link_libraries(${x}  simgrid)
@@ -39,7 +39,7 @@ set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/acti
                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/actions-storage_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/process-yield/process-yield_d.xml                                   
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/process-yield/process-yield_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp1.0-hbp1.0.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp3.0-hbp4.0.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.5-hbp1.5.xml
@@ -55,9 +55,9 @@ set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/acti
 
 foreach(x get_sender host_on_off host_on_off_processes host_on_off_recv
     task_destroy_cancel task_listen_from task_progress 
-    process-yield 
+    process-kill process-yield 
     trace_integration)
-  ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
+  ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
 endforeach()
 
 foreach(x actions-comm actions-storage app-bittorrent)
@@ -66,7 +66,7 @@ endforeach()
 # One context factory is enough for these ones
 
 foreach(x cloud-sharing)
-  ADD_TESH(tesh-msg-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
+  ADD_TESH(tesh-msg-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
 endforeach()
 
-ADD_TESH_FACTORIES(tesh-app-bittorrent-parallel         "thread;ucontext;raw;boost" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/app-bittorrent --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/app-bittorrent app-bittorrent.tesh)
+ADD_TESH_FACTORIES(tesh-app-bittorrent-parallel         "thread;ucontext;raw;boost" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/app-bittorrent --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/app-bittorrent app-bittorrent.tesh)
index 3ff450c..a06a44f 100644 (file)
@@ -1,6 +1,6 @@
 #! ./tesh
 
-$ $SG_TEST_EXENV ${bindir:=.}/cloud-sharing$EXEEXT --log=root.fmt:%m%n ${srcdir:=.}/../../../examples/platforms/cluster_backbone.xml
+$ $SG_TEST_EXENV ${bindir:=.}/cloud-sharing$EXEEXT --log=root.fmt:%m%n ${platfdir}/cluster_backbone.xml
 > # TEST ON SINGLE-CORE PMs
 > ## Check computation on regular PMs
 > ### Test '(o)1'. A task on a regular PM
index a7a5408..4427c44 100644 (file)
@@ -1,5 +1,5 @@
 ! output sort
-$ ./get_sender  ${srcdir:=.}/../../../examples/platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./get_sender  ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (1:send@Tremblay) Sending
 > [  0.000000] (2:receive@Tremblay) Receiving
 > [  0.000195] (2:receive@Tremblay) Got a message sent by 'send'
index 9b66f65..633fdf8 100644 (file)
@@ -1,5 +1,5 @@
 
-$ ./host_on_off ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./host_on_off ${platfdir}/small_platform.xml
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "task on"
 > [Jupiter:slave:(2) 0.824497] [msg_test/INFO] Task "task on" done
 > [Tremblay:master:(1) 1.169155] [msg_test/INFO] Sending "task off"
index 5d5d220..763d9b6 100644 (file)
@@ -1,5 +1,5 @@
 
-$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml 1 --log=no_loc
+$ ./host_on_off_processes ${platfdir}/small_platform.xml 1 --log=no_loc
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 1:
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO]   Create a process on Jupiter
 > [Jupiter:process_daemon:(2) 0.000000] [msg_test/INFO]   Start daemon on Jupiter (76296000.000000)
@@ -12,7 +12,7 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 > [Tremblay:test_launcher:(1) 13.000000] [msg_test/INFO]   Test done. See you!
 > [13.000000] [msg_test/INFO] Simulation time 13
 
-$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml 2 --log=no_loc
+$ ./host_on_off_processes ${platfdir}/small_platform.xml 2 --log=no_loc
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 2:
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO]   Turn off Jupiter
 > [0.000000] [simix_process/WARNING] Cannot launch process 'process_daemon' on failed host 'Jupiter'
@@ -24,7 +24,7 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 > [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO]   Test done. See you!
 > [20.000000] [msg_test/INFO] Simulation time 20
 
-$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml 3 --log=no_loc
+$ ./host_on_off_processes ${platfdir}/small_platform.xml 3 --log=no_loc
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 3:
 > [Jupiter:process_sleep:(2) 0.000000] [msg_test/INFO]   I'm alive but I should sleep
 > [Jupiter:process_sleep:(2) 10.000000] [msg_test/INFO]   I'm alive but I should sleep
@@ -43,7 +43,7 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 > [Tremblay:test_launcher:(1) 10100.000000] [msg_test/INFO]   Test done. See you!
 > [10100.000000] [msg_test/INFO] Simulation time 10100
 
-$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml 4 --log=no_loc
+$ ./host_on_off_processes ${platfdir}/small_platform.xml 4 --log=no_loc
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 4 (turn off src during a communication) : Create a Process/task to make a communication between Jupiter and Tremblay and turn off Jupiter during the communication
 > [Tremblay:commRX:(2) 10.000000] [msg_test/INFO]   Start RX
 > [Jupiter:commTX:(3) 10.000000] [msg_test/INFO]   Start TX
@@ -55,7 +55,7 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 > [Tremblay:commRX:(2) 20.000000] [msg_test/INFO]   RX Done
 > [20.000000] [msg_test/INFO] Simulation time 20
 
-$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml 5 --log=no_loc
+$ ./host_on_off_processes ${platfdir}/small_platform.xml 5 --log=no_loc
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication
 > [Jupiter:commRX:(2) 10.000000] [msg_test/INFO]   Start RX
 > [Tremblay:commTX:(3) 10.000000] [msg_test/INFO]   Start TX
@@ -66,7 +66,7 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 > [Tremblay:commTX:(3) 40.000000] [msg_test/INFO]   TX done
 > [40.000000] [msg_test/INFO] Simulation time 40
 
-$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml 6 --log=no_loc
+$ ./host_on_off_processes ${platfdir}/small_platform.xml 6 --log=no_loc
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node
 > [vm0:process_daemon:(2) 0.000000] [msg_test/INFO]   Start daemon on vm0 (76296000.000000)
 > [vm0:process_daemon:(2) 0.000000] [msg_test/INFO]   Execute daemon
index 271bae3..b595980 100644 (file)
@@ -1,4 +1,4 @@
-$ ./host_on_off_recv ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./host_on_off_recv ${platfdir}/small_platform.xml
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Master starting
 > [Jupiter:slave:(2) 0.000000] [msg_test/INFO] Slave receiving
 > [Tremblay:master:(1) 1.000000] [msg_test/INFO] Turning off the slave host
similarity index 58%
rename from examples/msg/process-kill/process-kill.c
rename to teshsuite/msg/process-kill/process-kill.c
index fe02ef8..37ee439 100644 (file)
@@ -7,28 +7,38 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_kill, "Messages specific for this msg example");
 
-static int victim(int argc, char *argv[])
+static int victimA_fun(int argc, char* argv[])
 {
   XBT_INFO("Hello!");
   XBT_INFO("Suspending myself");
   MSG_process_suspend(MSG_process_self()); /* - First suspend itself */
   XBT_INFO("OK, OK. Let's work");          /* - Then is resumed and start to execute a task */
   MSG_task_execute(MSG_task_create("work", 1e9, 0, NULL));
-  XBT_INFO("Bye!");  /* - But will never reach the end of it */
+  XBT_INFO("Bye!"); /* - But will never reach the end of it */
   return 0;
 }
 
-static int killer(int argc, char *argv[])
+static int victimB_fun(int argc, char* argv[])
 {
-  XBT_INFO("Hello!");         /* - First start a victim process */
-  msg_process_t poor_victim = MSG_process_create("victim", victim, NULL, MSG_host_by_name("Fafard"));
+  XBT_INFO("Terminates before being killed");
+  return 0;
+}
+
+static int killer(int argc, char* argv[])
+{
+  XBT_INFO("Hello!"); /* - First start a victim process */
+  msg_process_t victimA = MSG_process_create("victim A", victimA_fun, NULL, MSG_host_by_name("Fafard"));
+  msg_process_t victimB = MSG_process_create("victim B", victimB_fun, NULL, MSG_host_by_name("Bourassa"));
   MSG_process_sleep(10.0);
 
-  XBT_INFO("Resume process"); /* - Resume it from its suspended state */
-  MSG_process_resume(poor_victim);
+  XBT_INFO("Resume victimA"); /* - Resume it from its suspended state */
+  MSG_process_resume(victimA);
+
+  XBT_INFO("Kill victimA"); /* - and then kill it */
+  MSG_process_kill(victimA);
 
-  XBT_INFO("Kill process");   /* - and then kill it */
-  MSG_process_kill(poor_victim);
+  XBT_INFO("Kill victimB, even if it's already dead"); /* that's a no-op, there is no zombies in SimGrid */
+  MSG_process_kill(victimB);
 
   XBT_INFO("OK, goodbye now. I commit a suicide.");
   MSG_process_kill(MSG_process_self());
@@ -37,12 +47,12 @@ static int killer(int argc, char *argv[])
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   MSG_init(&argc, argv);
   xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
 
-  MSG_create_environment(argv[1]);   /* - Load the platform description */
+  MSG_create_environment(argv[1]); /* - Load the platform description */
   /* - Create and deploy killer process, that will create the victim process  */
   MSG_process_create("killer", killer, NULL, MSG_host_by_name("Tremblay"));
 
diff --git a/teshsuite/msg/process-kill/process-kill.tesh b/teshsuite/msg/process-kill/process-kill.tesh
new file mode 100644 (file)
index 0000000..0f96f81
--- /dev/null
@@ -0,0 +1,14 @@
+#! ./tesh
+
+p Testing a MSG_process_kill function
+
+$ $SG_TEST_EXENV ${bindir:=.}/process-kill ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (1:killer@Tremblay) Hello!
+> [  0.000000] (2:victim A@Fafard) Hello!
+> [  0.000000] (2:victim A@Fafard) Suspending myself
+> [  0.000000] (3:victim B@Bourassa) Terminates before being killed
+> [ 10.000000] (1:killer@Tremblay) Resume victimA
+> [ 10.000000] (1:killer@Tremblay) Kill victimA
+> [ 10.000000] (1:killer@Tremblay) Kill victimB, even if it's already dead
+> [ 10.000000] (1:killer@Tremblay) OK, goodbye now. I commit a suicide.
+> [ 10.000000] (0:maestro@) Simulation time 10
index dd4b383..d4d18cd 100644 (file)
@@ -1,5 +1,5 @@
 #! ./tesh
 
-$ $SG_TEST_EXENV ${bindir:=.}/process-yield ${srcdir:=.}/../../../examples/platforms/small_platform_fatpipe.xml ${srcdir:=.}/process-yield_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-yield ${platfdir}/small_platform_fatpipe.xml ${srcdir:=.}/process-yield_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (1:yielder@Tremblay) I yielded 10 times. Goodbye now!
 > [  0.000000] (2:yielder@Ruby) I yielded 15 times. Goodbye now!
index 1484263..51c99c2 100644 (file)
@@ -1,4 +1,4 @@
-$ ./task_destroy_cancel ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./task_destroy_cancel ${platfdir}/small_platform.xml
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending task: "normal"
 > [Jupiter:worker:(2) 0.169155] [msg_test/INFO] Handling task "normal"
 > [Tremblay:master:(1) 0.169155] [msg_test/INFO] Canceling task "cancel directly" directly
index 32db934..2680659 100644 (file)
@@ -1,3 +1,3 @@
-$ ./task_listen_from ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./task_listen_from ${platfdir}/small_platform.xml
 > [Tremblay:tester:(1) 0.000000] [msg_test/INFO] MSG_task_listen_from returns() 1 (should return my pid, which is 1)
 > [Tremblay:tester:(1) 0.000000] [msg_test/INFO] MSG_task_listen returns()      1 (should return true, i.e. 1)
index 679e181..603a4a4 100644 (file)
@@ -1,4 +1,4 @@
-$ ./task_progress ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./task_progress ${platfdir}/small_platform.xml
 > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
 > [Tremblay:sequential:(1) 0.000000] [msg_test/INFO] get the progress of simple before the task starts
 > [Tremblay:sequential:(1) 0.000000] [msg_test/INFO] Executing task: "simple"
index 58b9ad9..23a6f8d 100644 (file)
@@ -4,7 +4,7 @@ p c=cycle s=step p=priority h=host
 p Testing trace integration using trace_B.txt and test-hbp1-c0s0-c0s1.xml, test_trace:start == trace_cycle_0_step_0, test_trace:end < trace_cycle_0_step_1
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s0-c0s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s0-c0s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -16,7 +16,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c0s1-c0s2.xml, test_trace:start == trace_cycle_0_step_1, test_trace:end < trace_cycle_0_step_2
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s1-c0s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s1-c0s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -28,7 +28,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c0s2-c1s0.xml, test_trace:start == trace_cycle_0_step_2, test_trace:end < trace_cycle_1_step_0
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s2-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s2-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -40,7 +40,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c0s0-c1s0.xml, test_trace:start == trace_cycle_0_step_0, test_trace:end < trace_cycle_1_step_0
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s0-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s0-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -52,7 +52,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c0s2-c1s1.xml, test_trace:start == trace_cycle_0_step_2, test_trace:end < trace_cycle_1_step_1
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s2-c1s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s2-c1s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -64,7 +64,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c0s1-c2s2.xml, test_trace:start == trace_cycle_0_step_1, test_trace:end < trace_cycle_2_step_2
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s1-c2s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c0s1-c2s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -76,7 +76,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c1s1-c1s2.xml, test_trace:start == trace_cycle_1_step_1, test_trace:end < trace_cycle_1_step_2
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c1s1-c1s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c1s1-c1s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -88,7 +88,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1-c1s1-c3s2.xml, test_trace:start == trace_cycle_1_step_1, test_trace:end < trace_cycle_3_step_2
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c1s1-c3s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1-c1s1-c3s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -100,7 +100,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1.5-hbp1.5.xml, two process with same priority
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -116,7 +116,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp2.5-hbp1.5.xml, two process with different priority
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp2.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp2.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -132,7 +132,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp2.5-hbp1.5.xml, two process with different priority (included)
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability_included.xml  ${srcdir:=.}/test-hbp2.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability_included.xml  ${srcdir:=.}/test-hbp2.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -148,7 +148,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp1.0-hbp1.0.xml, three process with same priority
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1.0-hbp1.0-hbp1.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1.0-hbp1.0-hbp1.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -168,7 +168,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp3.0-hbp4.0.xml, three process with different priority
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability.xml  ${srcdir:=.}/test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
@@ -188,7 +188,7 @@ $ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platfor
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp3.0-hbp4.0.xml, three process with different priority (included)
 
 ! output sort
-$ ./trace_integration ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability_included.xml  ${srcdir:=.}/test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ./trace_integration ${platfdir}/two_hosts_platform_with_availability_included.xml  ${srcdir:=.}/test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:maestro@) Configuration change: Set 'cpu/optim' to 'TI'
index 539a53a..e753c24 100644 (file)
@@ -10,12 +10,12 @@ endforeach()
 ## Some need to be run with all factories, some need not tesh to run
 foreach(x actor concurrent_rw)
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
-  ADD_TESH_FACTORIES(tesh-s4u-${x} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
+  ADD_TESH_FACTORIES(tesh-s4u-${x} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
 endforeach()
 
 foreach(x host_on_off_wait listen_async pid storage_client_server)
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
-  ADD_TESH(tesh-s4u-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
+  ADD_TESH(tesh-s4u-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
 endforeach()
 
 # The output is not relevant
index 35fec0b..7719145 100644 (file)
@@ -1,4 +1,4 @@
-$ ./actor ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./actor ${platfdir}/small_platform.xml
 > [Tremblay:worker:(2) 0.500000] [s4u_test/INFO] Worker started (PID:2, PPID:0)
 > [Tremblay:worker:(2) 0.500000] [s4u_test/INFO] Plop i am not suspended
 > [Tremblay:master:(1) 1.000000] [s4u_test/INFO] Actor (pid=1, ppid=0, name=master)
index 1d46abe..f12ea29 100644 (file)
@@ -1,4 +1,4 @@
-$ ./concurrent_rw$EXEEXT ${srcdir:=.}/../../../examples/platforms/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ./concurrent_rw$EXEEXT ${platfdir}/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (host@bob) process 1 is writing!
 > [  0.000000] (host@bob) process 2 is writing!
 > [  0.000000] (host@bob) process 3 is writing!
index 039b942..4a13add 100644 (file)
@@ -1,4 +1,4 @@
-$ ./host_on_off_wait ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./host_on_off_wait ${platfdir}/small_platform.xml
 > [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Master waiting
 > [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Worker waiting
 > [Tremblay:master:(1) 1.000000] [s4u_test/INFO] Turning off the worker host
index 9e83706..d196f6e 100644 (file)
@@ -1,4 +1,4 @@
-$ ./listen_async ${srcdir:=.}/../../../examples/platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ./listen_async ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (test@Tremblay) Task listen works on regular mailboxes
 > [  0.000195] (test@Tremblay) Data successfully received from regular mailbox
 > [  0.000195] (test@Tremblay) Task listen works on asynchronous mailboxes
index 5826a28..2c2c1ca 100644 (file)
@@ -1,4 +1,4 @@
-$ ./pid ${srcdir:=.}/../../../examples/platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ./pid ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (sendpid@Tremblay) Sending pid of "1".
 > [  0.000000] (sendpid@Tremblay) Sending pid of "2".
 > [  0.000000] (sendpid@Tremblay) Sending pid of "3".
@@ -12,7 +12,7 @@ $ ./pid ${srcdir:=.}/../../../examples/platforms/small_platform.xml "--log=root.
 > [  0.001206] (killall@Tremblay) Killing process "3".
 > [  0.001206] (sendpid@Tremblay) Process "3" killed.
 
-$ ./pid ${srcdir:=.}/../../../examples/platforms/small_platform.xml 2 "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ./pid ${platfdir}/small_platform.xml 2 "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (sendpid@Tremblay) Sending pid of "2".
 > [  0.000000] (sendpid@Tremblay) Sending pid of "3".
 > [  0.000000] (sendpid@Tremblay) Sending pid of "4".
index 0a7dffc..f978fb4 100644 (file)
@@ -1,4 +1,4 @@
-$ ./storage_client_server$EXEEXT ${srcdir:=.}/../../../examples/platforms/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ./storage_client_server$EXEEXT ${platfdir}/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (server@alice) *** Storage info on alice ***
 > [  0.000000] (server@alice)  Storage name: Disk2, mount name: c:
 > [  0.000000] (server@alice)          Free size: 534479374867 bytes
index ed2a264..0e0c072 100644 (file)
@@ -51,7 +51,7 @@ if(enable_smpi)
   foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast 
             coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong 
             type-hvector type-indexed type-struct type-vector bug-17132 timers)
-    ADD_TESH_FACTORIES(tesh-smpi-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/${x} ${x}.tesh)
+    ADD_TESH_FACTORIES(tesh-smpi-${x} "thread;ucontext;raw;boost" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/${x} ${x}.tesh)
   endforeach()
 
   foreach (ALLGATHER 2dmesh 3dmesh bruck GB loosely_lr NTSLR_NB pair rdb  rhv ring SMP_NTS smp_simple spreading_simple 
index d756d2a..2e873ef 100644 (file)
@@ -1,6 +1,6 @@
 p Test vector
 ! output sort
-$ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile -platform ${srcdir:=.}/../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/type-vector -q --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+$ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile -platform ${platfdir}/small_platform.xml -np 2 ${bindir:=.}/type-vector -q --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > rank= 0, a[0][0]=0.000000
index 735efee..8bede3c 100644 (file)
@@ -19,9 +19,9 @@ set(tesh_files     ${tesh_files}
 set(teshsuite_src  ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench.cpp  PARENT_SCOPE)
 
 foreach(x lmm_usage surf_usage surf_usage2)
-  ADD_TESH(tesh-surf-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/${x} ${x}.tesh)
+  ADD_TESH(tesh-surf-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/${x} ${x}.tesh)
 endforeach()
 
 foreach(x small medium large)
-  ADD_TESH(tesh-surf-maxmin-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/maxmin_bench maxmin_bench_${x}.tesh)
+  ADD_TESH(tesh-surf-maxmin-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/maxmin_bench maxmin_bench_${x}.tesh)
 endforeach()
index 4e60bff..c1b1e07 100644 (file)
@@ -1,6 +1,6 @@
 #! ./tesh
 
-$ $SG_TEST_EXENV ${bindir:=.}/surf_usage ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml
+$ $SG_TEST_EXENV ${bindir:=.}/surf_usage ${platfdir}/two_hosts_platform_with_availability.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
 > [0.000000] [surf_test/INFO] actionA state: SURF_ACTION_RUNNING
index 12a74fb..3431333 100644 (file)
@@ -1,6 +1,6 @@
 #! ./tesh
 
-$ $SG_TEST_EXENV ${bindir:=.}/surf_usage2  ${srcdir:=.}/../../../examples/platforms/two_hosts_platform_with_availability.xml
+$ $SG_TEST_EXENV ${bindir:=.}/surf_usage2  ${platfdir}/two_hosts_platform_with_availability.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.200000] [surf_test/INFO] Next Event : 0.2