Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill a redudant example
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 30 Mar 2016 09:41:45 +0000 (11:41 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 30 Mar 2016 09:41:45 +0000 (11:41 +0200)
  + this is a plain old master/slave. Can't find what is specific here
  + app/masterworker does exactly the same

.gitignore
examples/java/commTime/CMakeLists.txt [deleted file]
examples/java/commTime/CommTimeTest.java [deleted file]
examples/java/commTime/FinalizeTask.java [deleted file]
examples/java/commTime/Master.java [deleted file]
examples/java/commTime/Slave.java [deleted file]
examples/java/commTime/commTimeDeployment.xml [deleted file]
examples/java/commTime/commtime.tesh [deleted file]
tools/cmake/DefinePackages.cmake

index 6749414..5e095ed 100644 (file)
@@ -978,7 +978,6 @@ examples/java/dht/kademlia/java_dht_kademlia_compiled
 examples/java/cloud/java_cloud_compiled
 examples/java/cloud/energy/java_cloud_energy_compiled
 examples/java/cloud/migration/java_cloud_migration_compiled
-examples/java/commTime/java_commTime_compiled
 examples/java/energy/consumption/java_energy_consumption_compiled
 examples/java/io/file/java_io_file_compiled
 examples/java/io/storage/java_io_storage_compiled
diff --git a/examples/java/commTime/CMakeLists.txt b/examples/java/commTime/CMakeLists.txt
deleted file mode 100644 (file)
index c00a943..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-set(example java_commTime)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/CommTimeTest.java  ${CMAKE_CURRENT_SOURCE_DIR}/FinalizeTask.java
-            ${CMAKE_CURRENT_SOURCE_DIR}/Master.java        ${CMAKE_CURRENT_SOURCE_DIR}/Slave.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-commTime --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/commTime/commtime.tesh)
-endif()
-
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/commtime.tesh           PARENT_SCOPE)
-set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/commTimeDeployment.xml  PARENT_SCOPE)
-set(examples_src  ${examples_src}  ${sources}                                          PARENT_SCOPE)
diff --git a/examples/java/commTime/CommTimeTest.java b/examples/java/commTime/CommTimeTest.java
deleted file mode 100644 (file)
index 46bf24c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* 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 commTime;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.NativeException;
-
-public class CommTimeTest {
-  public static void main(String[] args) throws NativeException {
-
-    Msg.init(args);
-
-    if(args.length < 2) {
-      Msg.info("Usage   : CommTime platform_file deployment_file");
-      Msg.info("example : CommTime ../platforms/platform.xml commTimeDeployment.xml");
-      System.exit(1);
-    }
-
-    /* construct the platform and deploy the application */
-    Msg.createEnvironment(args[0]);
-    Msg.deployApplication(args[1]);
-
-    /*  execute the simulation. */
-    Msg.run();
-  }
-}
diff --git a/examples/java/commTime/FinalizeTask.java b/examples/java/commTime/FinalizeTask.java
deleted file mode 100644 (file)
index f11da75..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* 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 commTime;
-import org.simgrid.msg.*;
-
-public class FinalizeTask extends Task {
-  public FinalizeTask() {
-    super("",0,0);
-  }
-}
diff --git a/examples/java/commTime/Master.java b/examples/java/commTime/Master.java
deleted file mode 100644 (file)
index 37da768..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* 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 commTime;
-
-import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
-import org.simgrid.msg.Task;
-
-public class Master extends Process {
-  public Master(Host host, String name, String[]args) {
-    super(host,name,args);
-  }
-
-  public void main(String[] args) throws MsgException {
-    if (args.length < 4) {
-      Msg.info("Master needs 4 arguments");
-      System.exit(1);
-    }
-
-    int tasksCount = Integer.valueOf(args[0]).intValue();    
-    double taskComputeSize = Double.valueOf(args[1]).doubleValue();    
-    double taskCommunicateSize = Double.valueOf(args[2]).doubleValue();
-
-    int slavesCount = Integer.valueOf(args[3]).intValue();
-
-    Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
-
-    for (int i = 0; i < tasksCount; i++) {
-      Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize);
-      if (i%1000==0)
-         Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
-         task.send("slave_"+(i%slavesCount));
-       }
-
-    Msg.info("All tasks have been dispatched. Let's tell everybody the computation is over.");
-
-    for (int i = 0; i < slavesCount; i++) {
-      FinalizeTask task = new FinalizeTask();
-      task.send("slave_"+(i%slavesCount));
-    }
-    Msg.info("Goodbye now!");
-  }
-}
diff --git a/examples/java/commTime/Slave.java b/examples/java/commTime/Slave.java
deleted file mode 100644 (file)
index 7711a92..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* 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 commTime;
-import org.simgrid.msg.*;
-
-public class Slave extends org.simgrid.msg.Process {
-  public Slave(Host host, String name, String[]args) {
-    super(host,name,args);
-  }
-  public void main(String[] args) throws MsgException {
-    if (args.length < 1) {
-       Msg.info("Slave needs 1 argument (its number)");
-       System.exit(1);
-    }
-
-    int num = Integer.valueOf(args[0]).intValue();
-    Msg.info("Receiving on 'slave_"+num+"'");
-
-    while(true) { 
-      Task task = Task.receive("slave_"+num);  
-      if (task instanceof FinalizeTask) {
-        break;
-      }
-      task.execute();
-    }
-    Msg.info("Received Finalize. I'm done. See you!");
-  }
-}
\ No newline at end of file
diff --git a/examples/java/commTime/commTimeDeployment.xml b/examples/java/commTime/commTimeDeployment.xml
deleted file mode 100644 (file)
index a229c37..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-  <process host="Jacquelin" function="commTime.Master">
-     <argument value="5000"/>  <!-- Amount of tasks to dispatch -->
-     <argument value="50000"/> <!-- Computation size of each task -->
-     <argument value="10"/>    <!-- Communication size of each one -->
-     <argument value="21"/>    <!-- Amount of commTime.Slaves waiting for orders -->
-  </process>
-
-  <process host="iRMX" function="commTime.Slave">          <argument value="0"/>  <!-- Input mailbox --></process>
-  <process host="Bousquet" function="commTime.Slave">      <argument value="1"/></process>
-  <process host="Soucy" function="commTime.Slave">         <argument value="2"/></process>
-  <process host="Casavant" function="commTime.Slave">      <argument value="3"/></process>
-  <process host="Jackson" function="commTime.Slave">       <argument value="4"/></process>
-  <process host="Geoff" function="commTime.Slave">         <argument value="5"/></process>
-  <process host="Disney" function="commTime.Slave">        <argument value="6"/></process>
-  <process host="McGee" function="commTime.Slave">         <argument value="7"/></process>
-  <process host="Gatien" function="commTime.Slave">        <argument value="8"/></process>
-  <process host="Laroche" function="commTime.Slave">       <argument value="9"/></process>
-  <process host="Tanguay" function="commTime.Slave">       <argument value="10"/></process>
-  <process host="Morin" function="commTime.Slave">         <argument value="11"/></process>
-  <process host="Ethernet" function="commTime.Slave">      <argument value="12"/></process>
-  <process host="Bellemarre" function="commTime.Slave">    <argument value="13"/></process>
-  <process host="Harry" function="commTime.Slave">         <argument value="14"/></process>
-  <process host="Olivier" function="commTime.Slave">       <argument value="15"/></process>
-  <process host="Boucherville" function="commTime.Slave">  <argument value="16"/></process>
-  <process host="Pointe_Claire" function="commTime.Slave"> <argument value="17"/></process>
-  <process host="Kansas" function="commTime.Slave">        <argument value="18"/></process>
-  <process host="King" function="commTime.Slave">          <argument value="19"/></process>
-  <process host="Lapointe" function="commTime.Slave">      <argument value="20"/></process>
-</platform>
diff --git a/examples/java/commTime/commtime.tesh b/examples/java/commTime/commtime.tesh
deleted file mode 100644 (file)
index d0f709c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! tesh
-
-! output sort 19
-! timeout 15
-
-$ java -classpath ${classpath:=.} commTime/CommTimeTest ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/commTime/commTimeDeployment.xml
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [7016.452828] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [Bellemarre:commTime.Slave:(15) 0.000000] [jmsg/INFO] Receiving on 'slave_13'
-> [Bellemarre:commTime.Slave:(15) 7006.341189] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Boucherville:commTime.Slave:(18) 0.000000] [jmsg/INFO] Receiving on 'slave_16'
-> [Boucherville:commTime.Slave:(18) 7011.513259] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Bousquet:commTime.Slave:(3) 0.000000] [jmsg/INFO] Receiving on 'slave_1'
-> [Bousquet:commTime.Slave:(3) 6991.170832] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Casavant:commTime.Slave:(5) 0.000000] [jmsg/INFO] Receiving on 'slave_3'
-> [Casavant:commTime.Slave:(5) 6993.971525] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Disney:commTime.Slave:(8) 0.000000] [jmsg/INFO] Receiving on 'slave_6'
-> [Disney:commTime.Slave:(8) 6996.651866] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Ethernet:commTime.Slave:(14) 0.000000] [jmsg/INFO] Receiving on 'slave_12'
-> [Ethernet:commTime.Slave:(14) 7004.530554] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Gatien:commTime.Slave:(10) 0.000000] [jmsg/INFO] Receiving on 'slave_8'
-> [Gatien:commTime.Slave:(10) 6998.814655] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Geoff:commTime.Slave:(7) 0.000000] [jmsg/INFO] Receiving on 'slave_5'
-> [Geoff:commTime.Slave:(7) 6994.828329] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Harry:commTime.Slave:(16) 0.000000] [jmsg/INFO] Receiving on 'slave_14'
-> [Harry:commTime.Slave:(16) 7008.178840] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Jackson:commTime.Slave:(6) 0.000000] [jmsg/INFO] Receiving on 'slave_4'
-> [Jackson:commTime.Slave:(6) 6994.822989] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Jacquelin:commTime.Master:(1) 0.000000] [jmsg/INFO] Hello! Got 21 slaves and 5000 tasks to process
-> [Jacquelin:commTime.Master:(1) 0.000000] [jmsg/INFO] Sending "Task_0" to "slave_0"
-> [Jacquelin:commTime.Master:(1) 1396.424699] [jmsg/INFO] Sending "Task_1000" to "slave_13"
-> [Jacquelin:commTime.Master:(1) 2795.064085] [jmsg/INFO] Sending "Task_2000" to "slave_5"
-> [Jacquelin:commTime.Master:(1) 4192.614488] [jmsg/INFO] Sending "Task_3000" to "slave_18"
-> [Jacquelin:commTime.Master:(1) 5588.209955] [jmsg/INFO] Sending "Task_4000" to "slave_10"
-> [Jacquelin:commTime.Master:(1) 6987.112496] [jmsg/INFO] All tasks have been dispatched. Let's tell everybody the computation is over.
-> [Jacquelin:commTime.Master:(1) 7016.452828] [jmsg/INFO] Goodbye now!
-> [Kansas:commTime.Slave:(20) 0.000000] [jmsg/INFO] Receiving on 'slave_18'
-> [Kansas:commTime.Slave:(20) 7014.258845] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [King:commTime.Slave:(21) 0.000000] [jmsg/INFO] Receiving on 'slave_19'
-> [King:commTime.Slave:(21) 7015.110650] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Lapointe:commTime.Slave:(22) 0.000000] [jmsg/INFO] Receiving on 'slave_20'
-> [Lapointe:commTime.Slave:(22) 7016.452828] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Laroche:commTime.Slave:(11) 0.000000] [jmsg/INFO] Receiving on 'slave_9'
-> [Laroche:commTime.Slave:(11) 7000.615294] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [McGee:commTime.Slave:(9) 0.000000] [jmsg/INFO] Receiving on 'slave_7'
-> [McGee:commTime.Slave:(9) 6997.540218] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Morin:commTime.Slave:(13) 0.000000] [jmsg/INFO] Receiving on 'slave_11'
-> [Morin:commTime.Slave:(13) 7003.470357] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Olivier:commTime.Slave:(17) 0.000000] [jmsg/INFO] Receiving on 'slave_15'
-> [Olivier:commTime.Slave:(17) 7009.614246] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Pointe_Claire:commTime.Slave:(19) 0.000000] [jmsg/INFO] Receiving on 'slave_17'
-> [Pointe_Claire:commTime.Slave:(19) 7013.366748] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Soucy:commTime.Slave:(4) 0.000000] [jmsg/INFO] Receiving on 'slave_2'
-> [Soucy:commTime.Slave:(4) 6992.614518] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [Tanguay:commTime.Slave:(12) 0.000000] [jmsg/INFO] Receiving on 'slave_10'
-> [Tanguay:commTime.Slave:(12) 7001.606126] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [iRMX:commTime.Slave:(2) 0.000000] [jmsg/INFO] Receiving on 'slave_0'
-> [iRMX:commTime.Slave:(2) 6990.156153] [jmsg/INFO] Received Finalize. I'm done. See you!
index 1be0901..904e0f8 100644 (file)
@@ -928,7 +928,6 @@ set(CMAKEFILES_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/mutualExclusion/CMakeLists.txt
     examples/java/pingPong/CMakeLists.txt
     examples/java/priority/CMakeLists.txt