Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill the scala examples
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 12 Feb 2016 22:35:05 +0000 (23:35 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 12 Feb 2016 22:35:10 +0000 (23:35 +0100)
We're working on tidying SimGrid, so remove that [working] cruft.

We already knew that Java code can be called from Scala. It was not
really tested (and the tests were not activated on the servers).

29 files changed:
.gitignore
CMakeLists.txt
examples/scala/CMakeLists.txt [deleted file]
examples/scala/master_slave_bypass/CMakeLists.txt [deleted file]
examples/scala/master_slave_bypass/FinalizeTask.scala [deleted file]
examples/scala/master_slave_bypass/Master.scala [deleted file]
examples/scala/master_slave_bypass/MsBypass.scala [deleted file]
examples/scala/master_slave_bypass/Slave.scala [deleted file]
examples/scala/master_slave_bypass/bypass.tesh [deleted file]
examples/scala/master_slave_kill/CMakeLists.txt [deleted file]
examples/scala/master_slave_kill/FinalizeTask.scala [deleted file]
examples/scala/master_slave_kill/Master.scala [deleted file]
examples/scala/master_slave_kill/MsKill.scala [deleted file]
examples/scala/master_slave_kill/Slave.scala [deleted file]
examples/scala/master_slave_kill/kill.tesh [deleted file]
examples/scala/masterslave/CMakeLists.txt [deleted file]
examples/scala/masterslave/FinalizeTask.scala [deleted file]
examples/scala/masterslave/Forwarder.scala [deleted file]
examples/scala/masterslave/Master.scala [deleted file]
examples/scala/masterslave/Masterslave.scala [deleted file]
examples/scala/masterslave/README [deleted file]
examples/scala/masterslave/Slave.scala [deleted file]
examples/scala/masterslave/masterslave.tesh [deleted file]
examples/scala/masterslave/masterslaveDeployment.xml [deleted file]
tools/cmake/DefinePackages.cmake
tools/cmake/MakeExe.cmake
tools/cmake/Modules/FindScala.cmake [deleted file]
tools/cmake/Option.cmake
tools/cmake/Tests.cmake

index 9af0a40..bcbbdbe 100644 (file)
@@ -1070,9 +1070,6 @@ examples/java/tracing/java_tracing_compiled
 examples/java/reservationSurfPlugin/java_reservation_surf_plugin_compiled
 examples/java/surfCpuModel/java_surf_cpu_model_compiled
 examples/java/surfPlugin/java_surf_plugin_compiled
-examples/scala/master_slave_bypass/scala_master_slave_bypass_compiled
-examples/scala/master_slave_kill/scala_master_slave_kill_compiled
-examples/scala/masterslave/scala_masterslave_compiled
 /CMakeCache.txt
 examples/smpi/mc/smpi_bugged1
 examples/smpi/mc/smpi_bugged1_liveness
index 6225d9a..da1fce5 100644 (file)
@@ -229,11 +229,6 @@ include(CheckSymbolExists)
 include(FindGraphviz)
 include(FindLibSigc++)
 
-if(enable_scala)
-  find_package(Scala REQUIRED)
-  message("-- [Scala] scalac found: ${SCALA_COMPILE}")
-  set(HAVE_Scala 1)
-endif()
 if(enable_lua)
   include(FindLuaSimgrid)
 endif()
diff --git a/examples/scala/CMakeLists.txt b/examples/scala/CMakeLists.txt
deleted file mode 100644 (file)
index e2c117f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-set(tesh_files
-  ${tesh_files}
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  PARENT_SCOPE
-  )
-set(examples_src
-  ${examples_src}
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE
-  )
-
diff --git a/examples/scala/master_slave_bypass/CMakeLists.txt b/examples/scala/master_slave_bypass/CMakeLists.txt
deleted file mode 100644 (file)
index 138566a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-set(example scala_master_slave_bypass)
-set(sources
-  ${CMAKE_CURRENT_SOURCE_DIR}/FinalizeTask.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Master.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/MsBypass.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Slave.scala
-  )
-
-if(enable_scala)
-  add_custom_command(
-    COMMENT "Building ${example}..."
-    OUTPUT ${example}_compiled
-    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
-    COMMAND ${SCALA_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)
-endif()
-
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/bypass.tesh
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  PARENT_SCOPE
-  )
-set(examples_src
-  ${examples_src}
-  ${sources}
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE
-  )
diff --git a/examples/scala/master_slave_bypass/FinalizeTask.scala b/examples/scala/master_slave_bypass/FinalizeTask.scala
deleted file mode 100644 (file)
index ca08d59..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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
-
-class FinalizeTask extends Task("finalize",0,0) {}
diff --git a/examples/scala/master_slave_bypass/Master.scala b/examples/scala/master_slave_bypass/Master.scala
deleted file mode 100644 (file)
index 9969982..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Master of a basic master/slave example in Java
- *
- * Copyright (c) 2006-2013. 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 Stream._
-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
-
-class Master(hostname:String, name:String) extends Process(hostname,name) {
-
-  def main(args:Array[String]) {
-    Msg.info("Master Hello!")
-
-    //Create a slave on host "alice"
-    try {
-      Msg.info("Create process on host 'Tremblay'")
-      new Slave("Tremblay","process2").start()
-    } catch {
-      case e:MsgException => println("Process2!")
-    }
-
-    //Wait for slave "alice"
-    continually({Task.receive("Tremblay")})
-      .takeWhile(!_.isInstanceOf[FinalizeTask])
-      .force // to force the list to be compute
-
-    Msg.info("Received Finalize. I'm done. See you!")
-  }
-}
diff --git a/examples/scala/master_slave_bypass/MsBypass.scala b/examples/scala/master_slave_bypass/MsBypass.scala
deleted file mode 100644 (file)
index a52c77e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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.Msg
-import org.simgrid.msg.MsgException
-import org.simgrid.msg.NativeException
-
-object MsBypass extends App {
- /* This only contains the launcher. If you do nothing more than than you can run
-  *   scala simgrid.msg.Msg
-  * which also contains such a launcher
-  */
-
-  /* initialize the MSG simulation. Must be done before anything else (even logging). */
-  Msg.init(args)
-  Msg.createEnvironment(args(0))
-
-  /* bypass deployment */
-  try {
-    new Master("Jupiter","process1").start()
-  }
-  catch {
-    case e:MsgException => println("Create processes failed!")
-  }
-
-  /*  execute the simulation. */
-  Msg.run()
-}
diff --git a/examples/scala/master_slave_bypass/Slave.scala b/examples/scala/master_slave_bypass/Slave.scala
deleted file mode 100644 (file)
index ab595be..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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.Process
-
-class Slave(hostname:String, name:String) extends Process(hostname, name) {
-  def main(args:Array[String]) {
-    Msg.info("Slave Hello!")
-    val task = new FinalizeTask()
-    Msg.info("Send finalize!")
-    task.send("Tremblay")
-  }
-}
diff --git a/examples/scala/master_slave_bypass/bypass.tesh b/examples/scala/master_slave_bypass/bypass.tesh
deleted file mode 100644 (file)
index a38a098..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#! tesh
-
-! output sort 19
-$ java -classpath ${classpath:=.} master_slave_bypass/MsBypass ${srcdir:=.}/../platforms/small_platform.xml
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [Jupiter:process1:(1) 0.000000] [jmsg/INFO] Master Hello!
-> [Jupiter:process1:(1) 0.000000] [jmsg/INFO] Create process on host 'Tremblay'
-> [Tremblay:process2:(2) 0.000000] [jmsg/INFO] Slave Hello!
-> [Tremblay:process2:(2) 0.000000] [jmsg/INFO] Send finalize!
-> [Jupiter:process1:(1) 0.019014] [jmsg/INFO] Received Finalize. I'm done. See you!
-> [0.019014] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
diff --git a/examples/scala/master_slave_kill/CMakeLists.txt b/examples/scala/master_slave_kill/CMakeLists.txt
deleted file mode 100644 (file)
index 6b014b8..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-set(example scala_master_slave_kill)
-set(sources
-  ${CMAKE_CURRENT_SOURCE_DIR}/FinalizeTask.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Master.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/MsKill.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Slave.scala
-  )
-
-if(enable_scala)
-  add_custom_command(
-    COMMENT "Building ${example}..."
-    OUTPUT ${example}_compiled
-    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
-    COMMAND ${SCALA_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)
-endif()
-
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/kill.tesh
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  PARENT_SCOPE
-  )
-set(examples_src
-  ${examples_src}
-  ${sources}
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE
-  )
diff --git a/examples/scala/master_slave_kill/FinalizeTask.scala b/examples/scala/master_slave_kill/FinalizeTask.scala
deleted file mode 100644 (file)
index b017adf..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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_kill
-
-import org.simgrid.msg.Task
-
-class FinalizeTask extends Task("finalize",0,0) {}
-    
diff --git a/examples/scala/master_slave_kill/Master.scala b/examples/scala/master_slave_kill/Master.scala
deleted file mode 100644 (file)
index 0685987..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Master of a basic master/slave example in Java
- *
- * Copyright (c) 2006-2013. 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_kill
-
-import Stream._
-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
-
-class Master(hostname:String, name:String) extends Process(hostname, name) {
-  def main(args:Array[String]) {
-    Msg.info("Master Hello!")
-    var process2:Slave = null
-
-    //Create a slave on host "alice"
-    try {
-      Msg.info("Create process on host 'alice'")
-      process2 = new Slave("Tremblay","slave")
-      process2.start()
-    } catch {
-      case e:MsgException => println("Process2!")
-    }
-
-    //Wait for slave "alice"
-    continually({Task.receive("mail1")})
-      .takeWhile(!_.isInstanceOf[FinalizeTask])
-      .force // to force the list to be compute
-
-    Msg.info("Received mail1!")
-    process2.kill()
-    Msg.info("Process2 is now killed, should exit now")
-  }
-}
diff --git a/examples/scala/master_slave_kill/MsKill.scala b/examples/scala/master_slave_kill/MsKill.scala
deleted file mode 100644 (file)
index f2f7c1a..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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_kill;
-
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.NativeException;
-
-object MsKill extends App{
-
-  /* This only contains the launcher. If you do nothing more than than you can run
-  *   scala simgrid.msg.Msg
-  * which also contains such a launcher
-  */
-
-
-  /* initialize the MSG simulation. Must be done before anything else (even logging). */
-  Msg.init(args)
-  Msg.createEnvironment(args(0))
-
-  /* bypass deploymemt */
-  try {
-    val process1 = new Master("Jupiter","master")
-    process1.start()
-  }
-  catch {
-    case e:MsgException => println("Create processes failed!")
-  }
-
-  /*  execute the simulation. */
-  Msg.run()
-}
diff --git a/examples/scala/master_slave_kill/Slave.scala b/examples/scala/master_slave_kill/Slave.scala
deleted file mode 100644 (file)
index 2d50368..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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_kill
-
-import org.simgrid.msg.HostFailureException
-import org.simgrid.msg.HostNotFoundException
-import org.simgrid.msg.Msg
-import org.simgrid.msg.MsgException
-import org.simgrid.msg.Task
-import org.simgrid.msg.TimeoutException
-import org.simgrid.msg.TransferFailureException
-import org.simgrid.msg.Process
-
-class Slave(hostname:String, name:String) extends Process(hostname, name) {
-  def main(args:Array[String]) {
-    Msg.info("Slave Hello!")
-       
-    val task = new FinalizeTask();
-    Msg.info("Send Mail1!");
-    task.send("mail1");
-       
-    try {
-      Task.receive("mail2");
-    } catch {
-      case e:MsgException => {Msg.debug("Received failed")
-                              return}
-    }
-    Msg.info("Receive Mail2!")
-  }
-}
diff --git a/examples/scala/master_slave_kill/kill.tesh b/examples/scala/master_slave_kill/kill.tesh
deleted file mode 100644 (file)
index c06a0b8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#! tesh
-
-! output sort 19
-
-$ java -classpath ${classpath:=.} master_slave_kill/MsKill ${srcdir:=.}/../platforms/small_platform.xml
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [Jupiter:master:(1) 0.000000] [jmsg/INFO] Master Hello!
-> [Jupiter:master:(1) 0.000000] [jmsg/INFO] Create process on host 'alice'
-> [Tremblay:slave:(2) 0.000000] [jmsg/INFO] Slave Hello!
-> [Tremblay:slave:(2) 0.000000] [jmsg/INFO] Send Mail1!
-> [Jupiter:master:(1) 0.019014] [jmsg/INFO] Received mail1!
-> [Jupiter:master:(1) 0.019014] [jmsg/INFO] Process2 is now killed, should exit now
-> [0.019014] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
diff --git a/examples/scala/masterslave/CMakeLists.txt b/examples/scala/masterslave/CMakeLists.txt
deleted file mode 100644 (file)
index b81f30c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-set(example scala_masterslave)
-set(sources
-  ${CMAKE_CURRENT_SOURCE_DIR}/FinalizeTask.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Forwarder.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Master.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Masterslave.scala
-  ${CMAKE_CURRENT_SOURCE_DIR}/Slave.scala
-  )
-
-if(enable_scala)
-  add_custom_command(
-    COMMENT "Building ${example}..."
-    OUTPUT ${example}_compiled
-    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
-    COMMAND ${SCALA_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)
-endif()
-
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave.tesh
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslaveDeployment.xml
-  PARENT_SCOPE
-  )
-set(examples_src
-  ${examples_src}
-  ${sources}
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
-set(txt_files
-  ${txt_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/README
-  PARENT_SCOPE
-  )
diff --git a/examples/scala/masterslave/FinalizeTask.scala b/examples/scala/masterslave/FinalizeTask.scala
deleted file mode 100644 (file)
index 45952fc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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 masterslave
-import org.simgrid.msg.Task
-
-class FinalizeTask extends Task("finalize",0,0) {}
-    
diff --git a/examples/scala/masterslave/Forwarder.scala b/examples/scala/masterslave/Forwarder.scala
deleted file mode 100644 (file)
index a3cd4ff..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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 masterslave
-
-import Stream._
-import org.simgrid.msg.Host
-import org.simgrid.msg.Msg
-import org.simgrid.msg.MsgException
-import org.simgrid.msg.Task
-import org.simgrid.msg.Process
-
-class Forwarder(host:Host, name:String, args:Array[String]) extends Process(host,name,args) {
-
-   def main(args: Array[String]){
-      if (args.length < 3) {    
-        Msg.info("Forwarder needs 3 arguments (input mailbox, first output mailbox, last one)")
-        Msg.info("Got "+args.length+" instead")
-        System.exit(1)
-      }
-      val input = args(0).toInt                
-      val firstOutput = args(1).toInt          
-      val lastOutput = args(2).toInt           
-      
-      var taskCount = 0
-      val slavesCount = lastOutput - firstOutput + 1
-      Msg.info("Receiving on 'slave_"+input+"'")
-      var cont = true
-      
-      continually({Task.receive("slave_"+input)})
-        .takeWhile(!_.isInstanceOf[FinalizeTask])
-        .foreach(task => {
-          val dest = firstOutput + (taskCount % slavesCount)
-          Msg.info("Sending \"" + task.getName() + "\" to \"slave_" + dest + "\"")
-          task.send("slave_"+dest)
-          taskCount += 1
-        })
-
-      Msg.info("Got a finalize task. Let's forward that we're done.")
-      for (cpt <- firstOutput to lastOutput) {
-        val tf = new FinalizeTask()
-        tf.send("slave_"+cpt)
-      }
-        
-      Msg.info("I'm done. See you!")
-   }
-}
-
diff --git a/examples/scala/masterslave/Master.scala b/examples/scala/masterslave/Master.scala
deleted file mode 100644 (file)
index 15779c9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Master of a basic master/slave example in Java
- *
- * Copyright (c) 2006-2013. 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 masterslave;
-
-import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Task;
-import org.simgrid.msg.Process;;
-
-class Master(host:Host, name:String, args:Array[String]) extends Process(host,name,args) {
-  def main(args:Array[String]) {
-    if (args.length < 4) {
-      Msg.info("Master needs 4 arguments")
-      System.exit(1)
-    }
-
-    val tasksCount = args(0).toInt             
-    val taskComputeSize = args(1).toDouble             
-    val taskCommunicateSize = args(2).toDouble
-    val slavesCount = args(3).toInt
-
-    Msg.info("Hello! Got " +  slavesCount + " slaves and " + tasksCount + " tasks to process")
-
-    for (i <- 0 until tasksCount) {
-      val task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize)
-      task.send("slave_"+(i%slavesCount))
-    }
-
-    Msg.info("All tasks have been dispatched. Let's tell everybody the computation is over.")
-
-    for (i <- 0 until slavesCount) {
-      val task = new FinalizeTask()
-      task.send("slave_"+(i%slavesCount))
-    }
-
-    Msg.info("Goodbye now!")
-  }
-}
diff --git a/examples/scala/masterslave/Masterslave.scala b/examples/scala/masterslave/Masterslave.scala
deleted file mode 100644 (file)
index 8f6a102..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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 masterslave
-
-import org.simgrid.msg.Msg
-import org.simgrid.msg.NativeException
-import org.simgrid.msg.Task
-
-object Masterslave extends App {
-   val TASK_COMP_SIZE = 10000000
-   val TASK_COMM_SIZE = 10000000
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   scala simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-
-     /* initialize the MSG simulation. Must be done before anything else (even logging). */
-     Msg.init(args)
-       
-     if (args.length < 2) {                    
-       Msg.info("Usage   : Masterslave platform_file deployment_file")
-       Msg.info("example : Masterslave basic_platform.xml basic_deployment.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/scala/masterslave/README b/examples/scala/masterslave/README
deleted file mode 100644 (file)
index 9207911..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-This is a somehow basic master/slaves example.
-
-There is 3 kind of processes:
- * Master: creates some tasks, and dispatches them to its slaves
- * Forwarder: get tasks from master, and dispatch them further
- * Slave: get tasks from either master or forwarder, and run them
-At the end of the execution:
- - the master sends FinalizeTask to every known slave to stop them
- - On reception of FT, forwarders send FT to every slave, and stop.
- - On reception of FinalizeTask, slaves stop.
\ No newline at end of file
diff --git a/examples/scala/masterslave/Slave.scala b/examples/scala/masterslave/Slave.scala
deleted file mode 100644 (file)
index cc1e531..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2006-2013. 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 masterslave;
-
-import Stream._
-import org.simgrid.msg.Host
-import org.simgrid.msg.HostFailureException
-import org.simgrid.msg.Msg
-import org.simgrid.msg.Task
-import org.simgrid.msg.TaskCancelledException
-import org.simgrid.msg.TimeoutException
-import org.simgrid.msg.TransferFailureException
-import org.simgrid.msg.Process
-
-class Slave(host:Host, name:String, args:Array[String]) extends Process(host,name,args) {
-  def main(args:Array[String]){
-    if (args.length < 1) {
-      Msg.info("Slave needs 1 argument (its number)")
-      System.exit(1)
-    }
-
-    val num = args(0).toInt
-    
-    continually({Task.receive("slave_"+num)})
-      .takeWhile(!_.isInstanceOf[FinalizeTask])
-      .foreach(task => {
-        Msg.info("Received \"" + task.getName() +  "\". Processing it.");
-        try {
-          task.execute();
-        } catch {
-          case e:TaskCancelledException => {}
-        }
-      })
-
-    Msg.info("Received Finalize. I'm done. See you!")
-  }
-}
diff --git a/examples/scala/masterslave/masterslave.tesh b/examples/scala/masterslave/masterslave.tesh
deleted file mode 100644 (file)
index 189988d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#! tesh
-
-! output sort 19
-
-$ java -classpath ${classpath:=.} masterslave/Masterslave ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/masterslave/masterslaveDeployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Using regular java threads.
-> [  0.000000] (1:masterslave.Master@Jacquelin) Hello! Got 7 slaves and 5 tasks to process
-> [  0.000000] (2:masterslave.Forwarder@Jackson) Receiving on 'slave_0'
-> [  0.000000] (3:masterslave.Forwarder@Casavant) Receiving on 'slave_1'
-> [  0.851467] (2:masterslave.Forwarder@Jackson) Sending "Task_0" to "slave_7"
-> [  2.208482] (3:masterslave.Forwarder@Casavant) Sending "Task_1" to "slave_9"
-> [  2.720407] (11:masterslave.Slave@Sirois) Received "Task_1". Processing it.
-> [  3.553979] (9:masterslave.Slave@Stephen) Received "Task_0". Processing it.
-> [  5.252157] (4:masterslave.Slave@iRMX) Received "Task_2". Processing it.
-> [  6.266855] (5:masterslave.Slave@Bousquet) Received "Task_3". Processing it.
-> [  7.710549] (1:masterslave.Master@Jacquelin) All tasks have been dispatched. Let's tell everybody the computation is over.
-> [  7.710549] (6:masterslave.Slave@Soucy) Received "Task_4". Processing it.
-> [  8.562012] (2:masterslave.Forwarder@Jackson) Got a finalize task. Let's forward that we're done.
-> [  9.919019] (3:masterslave.Forwarder@Casavant) Got a finalize task. Let's forward that we're done.
-> [ 10.430937] (11:masterslave.Slave@Sirois) Received Finalize. I'm done. See you!
-> [ 11.264486] (9:masterslave.Slave@Stephen) Received Finalize. I'm done. See you!
-> [ 11.318423] (12:masterslave.Slave@Monique) Received Finalize. I'm done. See you!
-> [ 11.318423] (3:masterslave.Forwarder@Casavant) I'm done. See you!
-> [ 12.962677] (4:masterslave.Slave@iRMX) Received Finalize. I'm done. See you!
-> [ 13.907575] (10:masterslave.Slave@Robert) Received Finalize. I'm done. See you!
-> [ 13.907575] (2:masterslave.Forwarder@Jackson) I'm done. See you!
-> [ 13.977355] (5:masterslave.Slave@Bousquet) Received Finalize. I'm done. See you!
-> [ 15.421041] (6:masterslave.Slave@Soucy) Received Finalize. I'm done. See you!
-> [ 16.278350] (7:masterslave.Slave@Kuenning) Received Finalize. I'm done. See you!
-> [ 17.251680] (0:maestro@) MSG_main finished; Cleaning up the simulation...
-> [ 17.251680] (1:masterslave.Master@Jacquelin) Goodbye now!
-> [ 17.251680] (8:masterslave.Slave@Browne) Received Finalize. I'm done. See you!
diff --git a/examples/scala/masterslave/masterslaveDeployment.xml b/examples/scala/masterslave/masterslaveDeployment.xml
deleted file mode 100644 (file)
index 058820e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-  <process host="Jacquelin" function="masterslave.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 slaves waiting for orders -->
-  </process>
-  
-  <process host="Jackson" function="masterslave.Forwarder">
-     <argument value="0"/>  <!-- Input mailbox -->
-     <argument value="7"/>  <!-- First output mailbox -->
-     <argument value="8"/>  <!-- Last output mailbox -->
-  </process>
-  <process host="Casavant" function="masterslave.Forwarder">
-     <argument value="1"/>  <!-- Input mailbox -->
-     <argument value="9"/>  <!-- First output mailbox -->
-     <argument value="10"/> <!-- Last output mailbox -->
-  </process>
-  
-  <process host="iRMX" function="masterslave.Slave">
-     <argument value="2"/>  <!-- Input mailbox -->
-  </process>
-  <process host="Bousquet" function="masterslave.Slave">
-     <argument value="3"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Soucy" function="masterslave.Slave">
-     <argument value="4"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Kuenning" function="masterslave.Slave">
-     <argument value="5"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Browne" function="masterslave.Slave">
-     <argument value="6"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Stephen" function="masterslave.Slave">
-     <argument value="7"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Robert" function="masterslave.Slave">
-     <argument value="8"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Sirois" function="masterslave.Slave">
-     <argument value="9"/>  <!-- Input mailbox -->
-  </process>  
-  <process host="Monique" function="masterslave.Slave">
-     <argument value="10"/>  <!-- Input mailbox -->
-  </process>  
-</platform>
index b497167..1e5529a 100644 (file)
@@ -1031,10 +1031,6 @@ set(EXAMPLES_CMAKEFILES_TXT
   examples/s4u/CMakeLists.txt
   examples/s4u/basic/CMakeLists.txt
   examples/s4u/io/CMakeLists.txt
-  examples/scala/CMakeLists.txt
-  examples/scala/master_slave_bypass/CMakeLists.txt
-  examples/scala/master_slave_kill/CMakeLists.txt
-  examples/scala/masterslave/CMakeLists.txt
   examples/simdag/CMakeLists.txt
   examples/simdag/dax/CMakeLists.txt
   examples/simdag/dot/CMakeLists.txt
@@ -1175,7 +1171,6 @@ set(CMAKE_SOURCE_FILES
   tools/cmake/Modules/FindNS3.cmake
   tools/cmake/Modules/FindRngStream.cmake
   tools/cmake/Modules/FindRubySimgrid.cmake
-  tools/cmake/Modules/FindScala.cmake
   tools/cmake/Modules/FindSimGrid.cmake
   tools/cmake/Modules/FindValgrind.cmake
   tools/cmake/Option.cmake
index 02ce151..a3156a9 100644 (file)
@@ -57,11 +57,6 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/tracing)
 
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/s4u)
 
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/scala)
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/scala/master_slave_bypass)
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/scala/master_slave_kill)
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/scala/masterslave)
-
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag/dax)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag/dot)
diff --git a/tools/cmake/Modules/FindScala.cmake b/tools/cmake/Modules/FindScala.cmake
deleted file mode 100644 (file)
index 777527a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-find_program(SCALA_COMPILE
-  NAMES scalac
-  PATH_SUFFIXES bin/
-  PATHS
-  /opt
-  /opt/local
-  /opt/csw
-  /sw
-  /usr
-  )
-
-message(STATUS "Looking for scalac")
-if(SCALA_COMPILE)
-  message(STATUS "Looking for scalac - found")
-else()
-  message(STATUS "Looking for scalac - not found")
-endif()
-
-set(SCALA_JARS "/usr/share/java/scala-compiler.jar:/usr/share/java/scala-library.jar:/usr/share/java/scalap.jar:/usr/share/java/scala/jline.jar:/usr/share/java/jansi.jar")
-
index e45cc36..6b554a4 100644 (file)
@@ -14,7 +14,6 @@ option(enable_compile_optimizations "Whether to produce efficient code for the S
 option(enable_documentation "Whether to produce documentation" on)
 option(enable_ns3    "Whether ns3 model is activated." off)
 option(enable_java   "Whether the Java bindings are activated." off)
-option(enable_scala  "Whether the Scala bindings are activated." off)
 option(enable_lua    "Whether the Lua bindings are activated." off)
 option(enable_compile_warnings "Whether compilation warnings should be turned into errors." off)
 option(enable_maintainer_mode "Whether flex and flexml files should be rebuilt." off)
@@ -59,10 +58,6 @@ else()
 endif()
 option(enable_smpi_ISP_testsuite "Whether the test suite from ISP should be built." off)
 
-if(enable_scala AND NOT enable_java)
-  message(WARNING "To use scala, you must enable java too (pass -Denable_java=on to Cmake for that)")
-endif()
-
 mark_as_advanced(HAVE_SSH)
 mark_as_advanced(HAVE_RSYNC)
 mark_as_advanced(BIBTEX2HTML_PATH)
index 6bceda7..08c5419 100644 (file)
@@ -519,21 +519,6 @@ IF(NOT enable_memcheck)
     ADD_TESH(tesh-java-sleep-host-off            --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java ${CMAKE_HOME_DIRECTORY}/teshsuite/java/sleep_host_off/sleep_host_off.tesh)
     ADD_TESH(tesh-java-semaphore-gc              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java ${CMAKE_HOME_DIRECTORY}/teshsuite/java/semaphore/semaphore_gc.tesh)
   ENDIF()
-
-
-  ### SCALA ###
-  IF(enable_scala)
-    IF(WIN32)
-      SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/\;${SIMGRID_JAR}\;${SCALA_JARS}")
-      STRING(REPLACE "\;" "ยง" TESH_CLASSPATH "${TESH_CLASSPATH}")
-    ELSE()
-      SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/:${SIMGRID_JAR}:${SCALA_JARS}")
-    ENDIF()
-    ADD_TESH(scala-bypass                        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/scala --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/scala ${CMAKE_HOME_DIRECTORY}/examples/scala/master_slave_bypass/bypass.tesh)
-    ADD_TESH(scala-kill                          --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/scala --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/scala ${CMAKE_HOME_DIRECTORY}/examples/scala/master_slave_kill/kill.tesh)
-    ADD_TESH(scala-masterslave                   --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/scala --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/scala ${CMAKE_HOME_DIRECTORY}/examples/scala/masterslave/masterslave.tesh)
-  ENDIF()
-
 ENDIF()