Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
create an app package
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 30 Mar 2016 09:33:44 +0000 (11:33 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 30 Mar 2016 09:36:05 +0000 (11:36 +0200)
  + includes bittorrent and masterworker

24 files changed:
.gitignore
examples/java/CMakeLists.txt
examples/java/app/bittorrent/Common.java [moved from examples/java/bittorrent/Common.java with 98% similarity]
examples/java/app/bittorrent/Connection.java [moved from examples/java/bittorrent/Connection.java with 98% similarity]
examples/java/app/bittorrent/Main.java [moved from examples/java/bittorrent/Bittorrent.java with 94% similarity]
examples/java/app/bittorrent/MessageTask.java [moved from examples/java/bittorrent/MessageTask.java with 98% similarity]
examples/java/app/bittorrent/Peer.java [moved from examples/java/bittorrent/Peer.java with 99% similarity]
examples/java/app/bittorrent/Tracker.java [moved from examples/java/bittorrent/Tracker.java with 99% similarity]
examples/java/app/bittorrent/TrackerTask.java [moved from examples/java/bittorrent/TrackerTask.java with 98% similarity]
examples/java/app/bittorrent/app_bittorrent.tesh [new file with mode: 0644]
examples/java/app/bittorrent/bittorrent.xml [moved from examples/java/bittorrent/bittorrent.xml with 71% similarity]
examples/java/app/bittorrent/generate.py [moved from examples/java/bittorrent/generate.py with 100% similarity]
examples/java/app/masterworker/Main.java [moved from examples/java/masterworker/Main.java with 98% similarity]
examples/java/app/masterworker/Master.java [moved from examples/java/masterworker/Master.java with 98% similarity]
examples/java/app/masterworker/README [moved from examples/java/masterworker/README with 100% similarity]
examples/java/app/masterworker/Worker.java [moved from examples/java/masterworker/Worker.java with 98% similarity]
examples/java/app/masterworker/app_masterworker.tesh [new file with mode: 0644]
examples/java/app/masterworker/masterworker.xml [new file with mode: 0644]
examples/java/bittorrent/CMakeLists.txt [deleted file]
examples/java/bittorrent/bittorrent.tesh [deleted file]
examples/java/masterworker/CMakeLists.txt [deleted file]
examples/java/masterworker/masterworker.tesh [deleted file]
examples/java/masterworker/masterworkerDeployment.xml [deleted file]
tools/cmake/DefinePackages.cmake

index 84ec677..6749414 100644 (file)
@@ -970,8 +970,9 @@ test_sg
 tools/tesh/tesh
 #########################################
 ## touched files to track the dependencies of java examples
 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/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/dht/chord/java_dht_chord_compiled
 examples/java/dht/kademlia/java_dht_kademlia_compiled
 examples/java/cloud/java_cloud_compiled
@@ -984,7 +985,6 @@ examples/java/io/storage/java_io_storage_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/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
 examples/java/mutualExclusion/java_mutualExclusion_compiled
 examples/java/pingPong/java_pingPong_compiled
 examples/java/priority/java_priority_compiled
index d5669f6..6df55e9 100644 (file)
@@ -1,3 +1,11 @@
+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}/dht/chord)
 set(dht_chord_sources          ${srcdir}/Main.java  ${srcdir}/ChordTask.java  ${srcdir}/Common.java
                                ${srcdir}/FindSuccessorAnswerTask.java  ${srcdir}/FindSuccessorTask.java
@@ -28,7 +36,7 @@ set(process_migration_sources  ${srcdir}/Main.java  ${srcdir}/Emigrant.java  ${s
 set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/process/suspend)
 set(process_suspend_sources    ${srcdir}/Main.java  ${srcdir}/DreamMaster.java  ${srcdir}/LazyGuy.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)
          process_kill process_migration process_suspend)
   string (REPLACE "_" "/" example_dir ${example})
   if(enable_java)
@@ -48,11 +56,15 @@ endforeach()
 
 set(examples_src  ${examples_src}                                                          PARENT_SCOPE)
 set(tesh_files    ${tesh_files}                                                            PARENT_SCOPE)
 
 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)
                                    ${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)
            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)
similarity index 98%
rename from examples/java/bittorrent/Common.java
rename to examples/java/app/bittorrent/Common.java
index 5833aaf..3f2f3ad 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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 {
 
 /* Common constants for use in the simulation */
 public class Common {
similarity index 98%
rename from examples/java/bittorrent/Connection.java
rename to examples/java/app/bittorrent/Connection.java
index ff15fd3..2ead3a2 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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 {
 import java.util.Arrays;
 
 public class Connection {
similarity index 94%
rename from examples/java/bittorrent/Bittorrent.java
rename to examples/java/app/bittorrent/Main.java
index 7478c3c..7443a7e 100644 (file)
@@ -4,12 +4,12 @@
 /* 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. */
 
 /* 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;
 
 
 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) {
   public static void main(String[] args) throws MsgException {
     Msg.init(args);
     if(args.length < 2) {
similarity index 98%
rename from examples/java/bittorrent/MessageTask.java
rename to examples/java/app/bittorrent/MessageTask.java
index b204ff9..5a25daf 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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 {
 import org.simgrid.msg.Task;
 
 public class MessageTask extends Task {
similarity index 99%
rename from examples/java/bittorrent/Peer.java
rename to examples/java/app/bittorrent/Peer.java
index 53fe246..7343686 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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;
 
 import java.util.ArrayList;
 import java.util.HashMap;
similarity index 99%
rename from examples/java/bittorrent/Tracker.java
rename to examples/java/app/bittorrent/Tracker.java
index 6af9eb2..7873500 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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;
 import java.util.ArrayList;
 
 import org.simgrid.msg.Msg;
similarity index 98%
rename from examples/java/bittorrent/TrackerTask.java
rename to examples/java/app/bittorrent/TrackerTask.java
index 8e4158d..d3694fa 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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;
 import java.util.ArrayList;
 
 import org.simgrid.msg.Task;
diff --git a/examples/java/app/bittorrent/app_bittorrent.tesh b/examples/java/app/bittorrent/app_bittorrent.tesh
new file mode 100644 (file)
index 0000000..2f5d496
--- /dev/null
@@ -0,0 +1,25 @@
+#! 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
+
similarity index 71%
rename from examples/java/bittorrent/bittorrent.xml
rename to examples/java/app/bittorrent/bittorrent.xml
index 7d0459b..4e19f07 100644 (file)
@@ -1,36 +1,36 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
 <?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>
 
     <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>
     <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>
     <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>
     <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>
     <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>
     <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>
     <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>
     <argument value="00000008"/>     <!-- my id -->
     <argument value="5000" />     <!-- end time -->
   </process>
similarity index 98%
rename from examples/java/masterworker/Main.java
rename to examples/java/app/masterworker/Main.java
index 289c932..acca06a 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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;
 
 
 import java.io.File;
 
similarity index 98%
rename from examples/java/masterworker/Master.java
rename to examples/java/app/masterworker/Master.java
index ea4589a..a030b69 100644 (file)
@@ -6,7 +6,7 @@
 /* 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. */
 
 /* 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;
 import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.MsgException;
similarity index 98%
rename from examples/java/masterworker/Worker.java
rename to examples/java/app/masterworker/Worker.java
index b681e4a..9ca9a2d 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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;
 
 import org.simgrid.msg.Host;
 import org.simgrid.msg.HostFailureException;
diff --git a/examples/java/app/masterworker/app_masterworker.tesh b/examples/java/app/masterworker/app_masterworker.tesh
new file mode 100644 (file)
index 0000000..be6140e
--- /dev/null
@@ -0,0 +1,23 @@
+#! 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!
+
diff --git a/examples/java/app/masterworker/masterworker.xml b/examples/java/app/masterworker/masterworker.xml
new file mode 100644 (file)
index 0000000..d3d4cd8
--- /dev/null
@@ -0,0 +1,18 @@
+<?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>
diff --git a/examples/java/bittorrent/CMakeLists.txt b/examples/java/bittorrent/CMakeLists.txt
deleted file mode 100644 (file)
index d97de6d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-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)
diff --git a/examples/java/bittorrent/bittorrent.tesh b/examples/java/bittorrent/bittorrent.tesh
deleted file mode 100644 (file)
index 2a27a0a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#! 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
-
diff --git a/examples/java/masterworker/CMakeLists.txt b/examples/java/masterworker/CMakeLists.txt
deleted file mode 100644 (file)
index 54ad08f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-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)
diff --git a/examples/java/masterworker/masterworker.tesh b/examples/java/masterworker/masterworker.tesh
deleted file mode 100644 (file)
index 47a2e68..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#! 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!
-
diff --git a/examples/java/masterworker/masterworkerDeployment.xml b/examples/java/masterworker/masterworkerDeployment.xml
deleted file mode 100644 (file)
index a2cb8ff..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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>
index 3d5d7eb..1be0901 100644 (file)
@@ -925,12 +925,10 @@ set(txt_files
 set(CMAKEFILES_TXT
   examples/java/CMakeLists.txt
     examples/java/async/CMakeLists.txt
 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/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
     examples/java/mutualExclusion/CMakeLists.txt
     examples/java/pingPong/CMakeLists.txt
     examples/java/priority/CMakeLists.txt