Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill that example
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 25 Mar 2016 13:29:26 +0000 (14:29 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 25 Mar 2016 13:29:26 +0000 (14:29 +0100)
 + there are other places where processes are instantiated without a
   deployment file

examples/java/master_slave_bypass/CMakeLists.txt [deleted file]
examples/java/master_slave_bypass/FinalizeTask.java [deleted file]
examples/java/master_slave_bypass/Master.java [deleted file]
examples/java/master_slave_bypass/MsBypass.java [deleted file]
examples/java/master_slave_bypass/Slave.java [deleted file]
examples/java/master_slave_bypass/bypass.tesh [deleted file]
tools/cmake/DefinePackages.cmake

diff --git a/examples/java/master_slave_bypass/CMakeLists.txt b/examples/java/master_slave_bypass/CMakeLists.txt
deleted file mode 100644 (file)
index f02e02c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-set(example java_master_slave_bypass)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/MsBypass.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-bypass --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/master_slave_bypass/bypass.tesh)
-endif()
-
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/bypass.tesh  PARENT_SCOPE)
-set(examples_src  ${examples_src}  ${sources}                               PARENT_SCOPE)
diff --git a/examples/java/master_slave_bypass/FinalizeTask.java b/examples/java/master_slave_bypass/FinalizeTask.java
deleted file mode 100644 (file)
index a3b9bd8..0000000
+++ /dev/null
@@ -1,15 +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 master_slave_bypass;
-import org.simgrid.msg.Task;
-
-public class FinalizeTask extends Task {       
-   public FinalizeTask() {
-      super("finalize",0,0);
-   }
-}
-    
\ No newline at end of file
diff --git a/examples/java/master_slave_bypass/Master.java b/examples/java/master_slave_bypass/Master.java
deleted file mode 100644 (file)
index eadc1e9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Master of a basic master/slave example in Java */
-
-/* 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 master_slave_bypass;
-import org.simgrid.msg.HostNotFoundException;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
-import org.simgrid.msg.Task;
-
-import master_slave_bypass.FinalizeTask;
-
-public class Master extends Process {
-       public Master(String hostname, String name) throws HostNotFoundException {
-               super(hostname, name);
-       }
-       public void main(String[] args) throws MsgException {
-       Msg.info("Master Hello!");
-
-       //Create a slave on host "alice"
-       try {
-                       Msg.info("Create process on host 'Jacquelin'");
-               new Slave("Jacquelin","process2").start();
-           }
-       catch (MsgException e){
-                       System.out.println("Process2!");
-           }
-
-       //Wait for slave "alice"
-       while(true)
-       {
-                       Task task = Task.receive("Jacquelin");
-                       if (task instanceof FinalizeTask) {
-                               Msg.info("Received Finalize. I'm done. See you!");
-                               break;
-                       }
-       }
-       }
-}
diff --git a/examples/java/master_slave_bypass/MsBypass.java b/examples/java/master_slave_bypass/MsBypass.java
deleted file mode 100644 (file)
index 1018e94..0000000
+++ /dev/null
@@ -1,33 +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 master_slave_bypass;
-
-import org.simgrid.msg.HostNotFoundException;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.NativeException;
-
-public class MsBypass {
-
-   /* This only contains the launcher. If you do nothing more than than you can run
-    *   java simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-
-    public static void main(String[] args) throws NativeException,HostNotFoundException {
-
-    /* initialize the MSG simulation. Must be done before anything else (even logging). */
-    Msg.init(args);
-    Msg.createEnvironment(args[0]);
-
-    /* bypass deployment */
-    new Master("Boivin","process1").start();
-
-       /*  execute the simulation. */
-    Msg.run();
-    }
-}
diff --git a/examples/java/master_slave_bypass/Slave.java b/examples/java/master_slave_bypass/Slave.java
deleted file mode 100644 (file)
index 15fef7f..0000000
+++ /dev/null
@@ -1,28 +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 master_slave_bypass;
-import org.simgrid.msg.HostFailureException;
-import org.simgrid.msg.HostNotFoundException;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.TimeoutException;
-import org.simgrid.msg.TransferFailureException;
-import org.simgrid.msg.NativeException;
-import org.simgrid.msg.Process;
-
-import master_slave_bypass.FinalizeTask;
-
-public class Slave extends Process {
-       public Slave(String hostname, String name) throws HostNotFoundException {
-               super(hostname, name);
-       }
-       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException, NativeException {
-       Msg.info("Slave Hello!");
-       FinalizeTask task = new FinalizeTask();
-       Msg.info("Send finalize!");
-       task.send("Jacquelin");
-       }
-}
diff --git a/examples/java/master_slave_bypass/bypass.tesh b/examples/java/master_slave_bypass/bypass.tesh
deleted file mode 100644 (file)
index 98a38b0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! tesh
-
-! output sort 19
-
-$ java -classpath ${classpath:=.} master_slave_bypass/MsBypass ${srcdir:=.}/../platforms/platform.xml
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [Boivin:process1:(1) 0.000000] [jmsg/INFO] Master Hello!
-> [Boivin:process1:(1) 0.000000] [jmsg/INFO] Create process on host 'Jacquelin'
-> [Jacquelin:process2:(2) 0.000000] [jmsg/INFO] Slave Hello!
-> [Jacquelin:process2:(2) 0.000000] [jmsg/INFO] Send finalize!
-> [Boivin:process1:(1) 1.048881] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [1.048881] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
index 3be060c..0a7a01b 100644 (file)
@@ -937,7 +937,6 @@ set(CMAKEFILES_TXT
   examples/java/energy/CMakeLists.txt
   examples/java/io/CMakeLists.txt
   examples/java/kademlia/CMakeLists.txt
   examples/java/energy/CMakeLists.txt
   examples/java/io/CMakeLists.txt
   examples/java/kademlia/CMakeLists.txt
-  examples/java/master_slave_bypass/CMakeLists.txt
   examples/java/master_slave_kill/CMakeLists.txt
   examples/java/masterslave/CMakeLists.txt
   examples/java/migration/CMakeLists.txt
   examples/java/master_slave_kill/CMakeLists.txt
   examples/java/masterslave/CMakeLists.txt
   examples/java/migration/CMakeLists.txt