examples/java/energy/java_energy_compiled
examples/java/io/java_io_compiled
examples/java/kademlia/java_kademlia_compiled
-examples/java/kill/java_kill_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/migration/java_migration_compiled
examples/java/mutualExclusion/java_mutualExclusion_compiled
examples/java/pingPong/java_pingPong_compiled
examples/java/priority/java_priority_compiled
examples/java/startKillTime/java_startKillTime_compiled
-examples/java/suspend/java_suspend_compiled
examples/java/tracing/java_tracing_compiled
examples/java/reservationSurfPlugin/java_reservation_surf_plugin_compiled
examples/java/surfCpuModel/java_surf_cpu_model_compiled
--- /dev/null
+set(process_kill_sources ${CMAKE_CURRENT_SOURCE_DIR}/process/kill/Main.java
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/kill/Killer.java
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/kill/Victim.java)
+set(process_migration_sources ${CMAKE_CURRENT_SOURCE_DIR}/process/migration/Main.java
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/migration/Emigrant.java
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/migration/Policeman.java)
+set(process_suspend_sources ${CMAKE_CURRENT_SOURCE_DIR}/process/suspend/Main.java
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/suspend/DreamMaster.java
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/suspend/LazyGuy.java)
+
+foreach (example process_kill process_migration process_suspend)
+ if(enable_java)
+ string (REPLACE "_" "/" example_dir ${example})
+
+ add_custom_command(
+ COMMENT "Building java_${example}..."
+ OUTPUT ${example_dir}/java_${example}_compiled
+ DEPENDS ${example_sources} simgrid-java_jar ${SIMGRID_JAR}
+ COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR} -d ${CMAKE_CURRENT_SOURCE_DIR} ${${example}_sources}
+ COMMAND ${CMAKE_COMMAND} -E remove ${example_dir}/java_${example}_compiled
+ COMMAND ${CMAKE_COMMAND} -E touch ${example_dir}/java_${example}_compiled
+ )
+ add_custom_target(${example} ALL DEPENDS ${example_dir}/java_${example}_compiled)
+ endif()
+ set(examples_src ${examples_src} ${${example}_sources})
+ set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example_dir}/${example}.tesh)
+endforeach()
+
+set(examples_src ${examples_src} PARENT_SCOPE)
+set(tesh_files ${tesh_files} PARENT_SCOPE)
+
+if(enable_java)
+ foreach (example 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)
+ endforeach()
+endif()
+
+++ /dev/null
-set(example java_kill)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Main.java ${CMAKE_CURRENT_SOURCE_DIR}/Killer.java ${CMAKE_CURRENT_SOURCE_DIR}/Victim.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-kill --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/kill/kill.tesh)
-endif()
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/kill.tesh PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
+++ /dev/null
-set(example java_migration)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Main.java ${CMAKE_CURRENT_SOURCE_DIR}/Emigrant.java ${CMAKE_CURRENT_SOURCE_DIR}/Policeman.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-migration --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/migration/migration.tesh)
-endif()
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/migration.tesh PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
/* 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 kill;
+package process.kill;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Process;
import org.simgrid.msg.MsgException;
import org.simgrid.msg.HostNotFoundException;
-import kill.Victim;
+import process.kill.Victim;
public class Killer extends Process {
public Killer(String hostname, String name) throws HostNotFoundException {
/* 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 kill;
+package process.kill;
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 kill;
+package process.kill;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Task;
import org.simgrid.msg.Process;
! output sort 19
-$ java -classpath ${classpath:=.} kill/Main ${srcdir:=.}/../platforms/platform.xml --lof=no_loc
+$ java -classpath ${classpath:=.} process/kill/Main ${srcdir:=.}/../platforms/platform.xml --lof=no_loc
> [0.000000] [jmsg/INFO] Using regular java threads.
> [11.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
> [Boivin:victim:(2) 0.000000] [jmsg/INFO] Hello!
/* 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 migration;
+package process.migration;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Host;
import org.simgrid.msg.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 migration;
+package process.migration;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Mutex;
import org.simgrid.msg.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 migration;
+package process.migration;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Host;
! output sort 19
-$ java -classpath ${classpath:=.} migration/Main ${srcdir:=.}/../platforms/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -classpath ${classpath:=.} process/migration/Main ${srcdir:=.}/../platforms/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (0:maestro@) Using regular java threads.
> [ 0.000000] (2:emigrant@Jacquelin) I'll look for a new job on another machine where the grass is greener.
> [ 0.000000] (2:emigrant@Boivin) Yeah, found something to do
/* 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 suspend;
-import org.simgrid.msg .Host;
+package process.suspend;
+import org.simgrid.msg.Host;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Process;
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 suspend;
+package process.suspend;
import org.simgrid.msg.Host;
import org.simgrid.msg.Msg;
import org.simgrid.msg.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 suspend;
+package process.suspend;
import org.simgrid.msg.Msg;
import org.simgrid.msg.MsgException;
-public class Suspend {
+public class Main {
public static void main(String[] args) {
Msg.init(args);
if(args.length < 1) {
#! tesh
! output sort 19
-$ java -classpath ${classpath:=.} suspend/Suspend ${srcdir:=.}/../platforms/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ java -classpath ${classpath:=.} process/suspend/Main ${srcdir:=.}/../platforms/platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (0:maestro@) Using regular java threads.
> [ 0.000000] (1:DreamMaster@Jacquelin) Let's create a lazy guy.
> [ 0.000000] (1:DreamMaster@Jacquelin) Let's wait a little bit...
+++ /dev/null
-set(example java_suspend)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Suspend.java ${CMAKE_CURRENT_SOURCE_DIR}/DreamMaster.java ${CMAKE_CURRENT_SOURCE_DIR}/LazyGuy.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-suspend --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/suspend/suspend.tesh)
-endif()
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/suspend.tesh PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
# The list of cmake build directories is constructed from the following list.
# Add your CMakeLists file here to see your subdir built.
set(CMAKEFILES_TXT
+ examples/java/CMakeLists.txt
examples/java/async/CMakeLists.txt
examples/java/bittorrent/CMakeLists.txt
examples/java/chord/CMakeLists.txt
examples/java/energy/CMakeLists.txt
examples/java/io/CMakeLists.txt
examples/java/kademlia/CMakeLists.txt
- examples/java/kill/CMakeLists.txt
examples/java/masterworker/CMakeLists.txt
- examples/java/migration/CMakeLists.txt
examples/java/mutualExclusion/CMakeLists.txt
examples/java/pingPong/CMakeLists.txt
examples/java/priority/CMakeLists.txt
examples/java/startKillTime/CMakeLists.txt
- examples/java/suspend/CMakeLists.txt
examples/java/tracing/CMakeLists.txt
examples/msg/CMakeLists.txt