tools/tesh/tesh
#########################################
## touched files to track the dependencies of java examples
+examples/java/app/bittorrent/java_app_bittorrent_compiled
+examples/java/app/masterworker/java_app_masterworker_compiled
examples/java/async/java_async_compiled
-examples/java/bittorrent/java_bittorrent_compiled
examples/java/dht/chord/java_dht_chord_compiled
examples/java/dht/kademlia/java_dht_kademlia_compiled
examples/java/cloud/java_cloud_compiled
examples/java/process/kill/java_process_kill_compiled
examples/java/process/migration/java_process_migration_compiled
examples/java/process/suspend/java_process_suspend_compiled
-examples/java/masterworker/java_masterworker_compiled
examples/java/mutualExclusion/java_mutualExclusion_compiled
examples/java/pingPong/java_pingPong_compiled
examples/java/priority/java_priority_compiled
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/app/bittorrent)
+set(app_bittorrent_sources ${srcdir}/Main.java ${srcdir}/Common.java ${srcdir}/Connection.java
+ ${srcdir}/MessageTask.java ${srcdir}/Peer.java ${srcdir}/Tracker.java
+ ${srcdir}/TrackerTask.java)
+
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/app/masterworker)
+set(app_masterworker_sources ${srcdir}/Main.java ${srcdir}/Master.java ${srcdir}/Worker.java)
+
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/dht/chord)
set(dht_chord_sources ${srcdir}/Main.java ${srcdir}/ChordTask.java ${srcdir}/Common.java
${srcdir}/FindSuccessorAnswerTask.java ${srcdir}/FindSuccessorTask.java
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/process/suspend)
set(process_suspend_sources ${srcdir}/Main.java ${srcdir}/DreamMaster.java ${srcdir}/LazyGuy.java)
-foreach (example dht_chord dht_kademlia energy_consumption io_file io_storage
+foreach (example app_bittorrent app_masterworker dht_chord dht_kademlia energy_consumption io_file io_storage
process_kill process_migration process_suspend)
string (REPLACE "_" "/" example_dir ${example})
if(enable_java)
set(examples_src ${examples_src} PARENT_SCOPE)
set(tesh_files ${tesh_files} PARENT_SCOPE)
-set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht/chord/chord.xml
+set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/app/bittorrent/generate.py PARENT_SCOPE)
+set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/app/masterworker/README PARENT_SCOPE)
+set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/app/bittorrent/bittorrent.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/app/masterworker/masterworker.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/dht/chord/chord.xml
${CMAKE_CURRENT_SOURCE_DIR}/dht/kademlia/kademlia.xml PARENT_SCOPE)
if(enable_java)
- foreach (example dht_chord dht_kademlia energy_consumption io_file io_storage
+ foreach (example app_bittorrent app_masterworker dht_chord dht_kademlia energy_consumption io_file io_storage
process_kill process_migration process_suspend)
string (REPLACE "_" "/" example_dir ${example})
ADD_TESH(java-${example} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/${example_dir}/${example}.tesh)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
/* Common constants for use in the simulation */
public class Common {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
import java.util.Arrays;
public class Connection {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
import org.simgrid.msg.Msg;
import org.simgrid.msg.MsgException;
-public class Bittorrent {
+public class Main{
public static void main(String[] args) throws MsgException {
Msg.init(args);
if(args.length < 2) {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
import org.simgrid.msg.Task;
public class MessageTask extends Task {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
import java.util.ArrayList;
import java.util.HashMap;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
import java.util.ArrayList;
import org.simgrid.msg.Msg;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package bittorrent;
+package app.bittorrent;
import java.util.ArrayList;
import org.simgrid.msg.Task;
--- /dev/null
+#! tesh
+
+! output sort 19
+! timeout 15
+
+$ java -classpath ${classpath:=.} app/bittorrent/Main ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/app/bittorrent/bittorrent.xml
+> [0.000000] [jmsg/INFO] Using regular java threads.
+> [5000.832370] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
+> [Boivin:app.bittorrent.Peer:(2) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 2
+> [Boivin:app.bittorrent.Peer:(2) 5000.048881] [jmsg/INFO] Here is my current status: 1111111111
+> [Disney:app.bittorrent.Peer:(6) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 6
+> [Disney:app.bittorrent.Peer:(6) 5000.131405] [jmsg/INFO] Here is my current status: 1111111111
+> [Geoff:app.bittorrent.Peer:(5) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 5
+> [Geoff:app.bittorrent.Peer:(5) 5000.764583] [jmsg/INFO] Here is my current status: 1111111111
+> [Jacquelin:app.bittorrent.Tracker:(1) 0.000000] [jmsg/INFO] Tracker launched.
+> [Jacquelin:app.bittorrent.Tracker:(1) 3000.000000] [jmsg/INFO] Tracker is leaving
+> [Jean_Yves:app.bittorrent.Peer:(3) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 3
+> [Jean_Yves:app.bittorrent.Peer:(3) 5000.832370] [jmsg/INFO] Here is my current status: 1111111111
+> [McGee:app.bittorrent.Peer:(8) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 8
+> [McGee:app.bittorrent.Peer:(8) 5000.783574] [jmsg/INFO] Here is my current status: 1111111111
+> [TeX:app.bittorrent.Peer:(4) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 4
+> [TeX:app.bittorrent.Peer:(4) 5000.304959] [jmsg/INFO] Here is my current status: 1111111111
+> [iRMX:app.bittorrent.Peer:(7) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 7
+> [iRMX:app.bittorrent.Peer:(7) 5000.729205] [jmsg/INFO] Here is my current status: 1111111111
+
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
- <process host="Jacquelin" function="bittorrent.Tracker">
+ <process host="Jacquelin" function="app.bittorrent.Tracker">
<argument value="3000" />
</process>
- <process host="Boivin" function="bittorrent.Peer">
+ <process host="Boivin" function="app.bittorrent.Peer">
<argument value="00000002"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
<argument value="1" /> <!-- indicates if the bittorrent.Peer is a seed at the begining of the simulation -->
</process>
- <process host="Jean_Yves" function="bittorrent.Peer">
+ <process host="Jean_Yves" function="app.bittorrent.Peer">
<argument value="00000003"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
</process>
- <process host="TeX" function="bittorrent.Peer">
+ <process host="TeX" function="app.bittorrent.Peer">
<argument value="00000004"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
</process>
- <process host="Geoff" function="bittorrent.Peer">
+ <process host="Geoff" function="app.bittorrent.Peer">
<argument value="00000005"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
</process>
- <process host="Disney" function="bittorrent.Peer">
+ <process host="Disney" function="app.bittorrent.Peer">
<argument value="00000006"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
</process>
- <process host="iRMX" function="bittorrent.Peer">
+ <process host="iRMX" function="app.bittorrent.Peer">
<argument value="00000007"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
</process>
- <process host="McGee" function="bittorrent.Peer">
+ <process host="McGee" function="app.bittorrent.Peer">
<argument value="00000008"/> <!-- my id -->
<argument value="5000" /> <!-- end time -->
</process>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package masterworker;
+package app.masterworker;
import java.io.File;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package masterworker;
+package app.masterworker;
import org.simgrid.msg.Host;
import org.simgrid.msg.Msg;
import org.simgrid.msg.MsgException;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-package masterworker;
+package app.masterworker;
import org.simgrid.msg.Host;
import org.simgrid.msg.HostFailureException;
--- /dev/null
+#! tesh
+
+! output sort 19
+
+$ java -classpath ${classpath:=.} app/masterworker/Main ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/app/masterworker/masterworker.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Using regular java threads.
+> [ 0.000000] (1:app.masterworker.Master@Jacquelin) Hello! Got 7 workers and 5 tasks to process
+> [ 3.043675] (2:app.masterworker.Worker@iRMX) Received "Task_0". Processing it.
+> [ 4.058373] (3:app.masterworker.Worker@Bousquet) Received "Task_1". Processing it.
+> [ 5.502067] (4:app.masterworker.Worker@Soucy) Received "Task_2". Processing it.
+> [ 6.359383] (5:app.masterworker.Worker@Kuenning) Received "Task_3". Processing it.
+> [ 7.332717] (1:app.masterworker.Master@Jacquelin) All tasks have been dispatched. Let's tell everybody the computation is over.
+> [ 7.332717] (6:app.masterworker.Worker@Browne) Received "Task_4". Processing it.
+> [ 10.376375] (2:app.masterworker.Worker@iRMX) Received Finalize. I'm done. See you!
+> [ 11.391053] (3:app.masterworker.Worker@Bousquet) Received Finalize. I'm done. See you!
+> [ 12.834740] (4:app.masterworker.Worker@Soucy) Received Finalize. I'm done. See you!
+> [ 13.692048] (5:app.masterworker.Worker@Kuenning) Received Finalize. I'm done. See you!
+> [ 14.665378] (6:app.masterworker.Worker@Browne) Received Finalize. I'm done. See you!
+> [ 16.536717] (7:app.masterworker.Worker@Stephen) Received Finalize. I'm done. See you!
+> [ 18.348671] (0:maestro@) MSG_main finished; Cleaning up the simulation...
+> [ 18.348671] (1:app.masterworker.Master@Jacquelin) Goodbye now!
+> [ 18.348671] (8:app.masterworker.Worker@Robert) Received Finalize. I'm done. See you!
+
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
+<platform version="4">
+ <process host="Jacquelin" function="app.masterworker.Master">
+ <argument value="5"/> <!-- Amount of tasks to dispatch -->
+ <argument value="50000"/> <!-- Computation size of each task -->
+ <argument value="10"/> <!-- Communication size of each one -->
+ <argument value="7"/> <!-- Amount of workers waiting for orders -->
+ </process>
+
+ <process host="iRMX" function="app.masterworker.Worker"> <argument value="0"/> <!-- Input mailbox --> </process>
+ <process host="Bousquet" function="app.masterworker.Worker"> <argument value="1"/> <!-- Input mailbox --> </process>
+ <process host="Soucy" function="app.masterworker.Worker"> <argument value="2"/> <!-- Input mailbox --> </process>
+ <process host="Kuenning" function="app.masterworker.Worker"> <argument value="3"/> <!-- Input mailbox --> </process>
+ <process host="Browne" function="app.masterworker.Worker"> <argument value="4"/> <!-- Input mailbox --> </process>
+ <process host="Stephen" function="app.masterworker.Worker"> <argument value="5"/> <!-- Input mailbox --> </process>
+ <process host="Robert" function="app.masterworker.Worker"> <argument value="6"/> <!-- Input mailbox --> </process>
+</platform>
+++ /dev/null
-set(example java_bittorrent)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Bittorrent.java ${CMAKE_CURRENT_SOURCE_DIR}/Common.java
- ${CMAKE_CURRENT_SOURCE_DIR}/Connection.java ${CMAKE_CURRENT_SOURCE_DIR}/MessageTask.java
- ${CMAKE_CURRENT_SOURCE_DIR}/Peer.java ${CMAKE_CURRENT_SOURCE_DIR}/Tracker.java
- ${CMAKE_CURRENT_SOURCE_DIR}/TrackerTask.java)
-
-if(enable_java)
- add_custom_command(
- COMMENT "Building ${example}..."
- OUTPUT ${example}_compiled
- DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
- COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR} -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
- COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
- COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
- )
- add_custom_target(${example} ALL DEPENDS ${example}_compiled)
- ADD_TESH(java-bittorrent --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/bittorrent/bittorrent.tesh)
-endif()
-
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/bittorrent.tesh PARENT_SCOPE)
-set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/bittorrent.xml PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
-set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/generate.py PARENT_SCOPE)
+++ /dev/null
-#! tesh
-
-! output sort 19
-! timeout 15
-
-$ java -classpath ${classpath:=.} bittorrent/Bittorrent ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/bittorrent/bittorrent.xml
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [5000.832370] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [Boivin:bittorrent.Peer:(2) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 2
-> [Boivin:bittorrent.Peer:(2) 5000.048881] [jmsg/INFO] Here is my current status: 1111111111
-> [Disney:bittorrent.Peer:(6) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 6
-> [Disney:bittorrent.Peer:(6) 5000.131405] [jmsg/INFO] Here is my current status: 1111111111
-> [Geoff:bittorrent.Peer:(5) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 5
-> [Geoff:bittorrent.Peer:(5) 5000.764583] [jmsg/INFO] Here is my current status: 1111111111
-> [Jacquelin:bittorrent.Tracker:(1) 0.000000] [jmsg/INFO] Tracker launched.
-> [Jacquelin:bittorrent.Tracker:(1) 3000.000000] [jmsg/INFO] Tracker is leaving
-> [Jean_Yves:bittorrent.Peer:(3) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 3
-> [Jean_Yves:bittorrent.Peer:(3) 5000.832370] [jmsg/INFO] Here is my current status: 1111111111
-> [McGee:bittorrent.Peer:(8) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 8
-> [McGee:bittorrent.Peer:(8) 5000.783574] [jmsg/INFO] Here is my current status: 1111111111
-> [TeX:bittorrent.Peer:(4) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 4
-> [TeX:bittorrent.Peer:(4) 5000.304959] [jmsg/INFO] Here is my current status: 1111111111
-> [iRMX:bittorrent.Peer:(7) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 7
-> [iRMX:bittorrent.Peer:(7) 5000.729205] [jmsg/INFO] Here is my current status: 1111111111
-
+++ /dev/null
-set(example java_masterworker)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Main.java ${CMAKE_CURRENT_SOURCE_DIR}/Master.java ${CMAKE_CURRENT_SOURCE_DIR}/Worker.java)
-
-if(enable_java)
- add_custom_command(
- COMMENT "Building ${example}..."
- OUTPUT ${example}_compiled
- DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
- COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR} -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
- COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
- COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
- )
- add_custom_target(${example} ALL DEPENDS ${example}_compiled)
- ADD_TESH(java-masterworker --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/masterworker/masterworker.tesh)
-endif()
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/masterworker.tesh PARENT_SCOPE)
-set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/masterworkerDeployment.xml PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
-set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README PARENT_SCOPE)
+++ /dev/null
-#! tesh
-
-! output sort 19
-
-$ java -classpath ${classpath:=.} masterworker/Main ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/masterworker/masterworkerDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:maestro@) Using regular java threads.
-> [ 0.000000] (1:masterworker.Master@Jacquelin) Hello! Got 7 workers and 5 tasks to process
-> [ 3.043675] (2:masterworker.Worker@iRMX) Received "Task_0". Processing it.
-> [ 4.058373] (3:masterworker.Worker@Bousquet) Received "Task_1". Processing it.
-> [ 5.502067] (4:masterworker.Worker@Soucy) Received "Task_2". Processing it.
-> [ 6.359383] (5:masterworker.Worker@Kuenning) Received "Task_3". Processing it.
-> [ 7.332717] (1:masterworker.Master@Jacquelin) All tasks have been dispatched. Let's tell everybody the computation is over.
-> [ 7.332717] (6:masterworker.Worker@Browne) Received "Task_4". Processing it.
-> [ 10.376375] (2:masterworker.Worker@iRMX) Received Finalize. I'm done. See you!
-> [ 11.391053] (3:masterworker.Worker@Bousquet) Received Finalize. I'm done. See you!
-> [ 12.834740] (4:masterworker.Worker@Soucy) Received Finalize. I'm done. See you!
-> [ 13.692048] (5:masterworker.Worker@Kuenning) Received Finalize. I'm done. See you!
-> [ 14.665378] (6:masterworker.Worker@Browne) Received Finalize. I'm done. See you!
-> [ 16.536717] (7:masterworker.Worker@Stephen) Received Finalize. I'm done. See you!
-> [ 18.348671] (0:maestro@) MSG_main finished; Cleaning up the simulation...
-> [ 18.348671] (1:masterworker.Master@Jacquelin) Goodbye now!
-> [ 18.348671] (8:masterworker.Worker@Robert) Received Finalize. I'm done. See you!
-
+++ /dev/null
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
- <process host="Jacquelin" function="masterworker.Master">
- <argument value="5"/> <!-- Amount of tasks to dispatch -->
- <argument value="50000"/> <!-- Computation size of each task -->
- <argument value="10"/> <!-- Communication size of each one -->
- <argument value="7"/> <!-- Amount of workers waiting for orders -->
- </process>
-
- <process host="iRMX" function="masterworker.Worker"> <argument value="0"/> <!-- Input mailbox --> </process>
- <process host="Bousquet" function="masterworker.Worker"> <argument value="1"/> <!-- Input mailbox --> </process>
- <process host="Soucy" function="masterworker.Worker"> <argument value="2"/> <!-- Input mailbox --> </process>
- <process host="Kuenning" function="masterworker.Worker"> <argument value="3"/> <!-- Input mailbox --> </process>
- <process host="Browne" function="masterworker.Worker"> <argument value="4"/> <!-- Input mailbox --> </process>
- <process host="Stephen" function="masterworker.Worker"> <argument value="5"/> <!-- Input mailbox --> </process>
- <process host="Robert" function="masterworker.Worker"> <argument value="6"/> <!-- Input mailbox --> </process>
-</platform>
set(CMAKEFILES_TXT
examples/java/CMakeLists.txt
examples/java/async/CMakeLists.txt
- examples/java/bittorrent/CMakeLists.txt
examples/java/cloud/CMakeLists.txt
examples/java/cloud/energy/CMakeLists.txt
examples/java/cloud/migration/CMakeLists.txt
examples/java/commTime/CMakeLists.txt
- examples/java/masterworker/CMakeLists.txt
examples/java/mutualExclusion/CMakeLists.txt
examples/java/pingPong/CMakeLists.txt
examples/java/priority/CMakeLists.txt