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/process/startkilltime/java_process_startkilltime_compiled
examples/java/tracing/java_tracing_compiled
/CMakeCache.txt
examples/smpi/mc/smpi_bugged1
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/process/migration)
set(process_migration_sources ${srcdir}/Main.java ${srcdir}/Emigrant.java ${srcdir}/Policeman.java)
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/process/startkilltime)
+set(process_startkilltime_sources ${srcdir}/Main.java ${srcdir}/Sleeper.java)
+
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/process/suspend)
set(process_suspend_sources ${srcdir}/Main.java ${srcdir}/DreamMaster.java ${srcdir}/LazyGuy.java)
foreach (example app_bittorrent app_masterworker dht_chord dht_kademlia energy_consumption io_file io_storage
- process_kill process_migration process_suspend)
+ process_kill process_migration process_startkilltime process_suspend)
string (REPLACE "_" "/" example_dir ${example})
if(enable_java)
add_custom_command(
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)
+ ${CMAKE_CURRENT_SOURCE_DIR}/dht/kademlia/kademlia.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/process/startkilltime/startkilltime.xml PARENT_SCOPE)
if(enable_java)
foreach (example app_bittorrent app_masterworker dht_chord dht_kademlia energy_consumption io_file io_storage
- process_kill process_migration process_suspend)
+ process_kill process_migration process_startkilltime 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()
/* 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 startKillTime;
+package process.startkilltime;
import org.simgrid.msg.Msg;
import org.simgrid.msg.NativeException;
-public class StartKillTime {
+public class Main {
public static void main(String[] args) throws NativeException {
Msg.init(args);
if(args.length < 2) {
/* 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 startKillTime;
+package process.startkilltime;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Host;
import org.simgrid.msg.Process;
import org.simgrid.msg.MsgException;
-/* Lazy Guy Slave, suspends itself ASAP */
-public class Slave extends Process {
- public Slave(Host host, String name, String[]args) {
+public class Sleeper extends Process {
+ public Sleeper(Host host, String name, String[]args) {
super(host,name,args);
}
public void main(String[] args) throws MsgException {
- Msg.info("Hello!");
+ Msg.info("Hello! I go to sleep.");
try {
- waitFor(10.0);
- Msg.info("OK, goodbye now.");
+ waitFor(Integer.valueOf(args[0]).intValue());
+ Msg.info("Done sleeping");
} catch (MsgException e) {
Msg.debug("Wait cancelled.");
}
--- /dev/null
+#! tesh
+$ java -classpath ${classpath:=.} process/startkilltime/Main ${srcdir:=.}/../platforms/cluster.xml ${srcdir:=.}/process/startkilltime/startkilltime.xml
+> [0.000000] [jmsg/INFO] Using regular java threads.
+> [node-0.acme.org:process.startkilltime.Sleeper:(1) 0.000000] [jmsg/INFO] Hello! I go to sleep.
+> [node-1.acme.org:process.startkilltime.Sleeper:(2) 1.000000] [jmsg/INFO] Hello! I go to sleep.
+> [node-2.acme.org:process.startkilltime.Sleeper:(3) 2.000000] [jmsg/INFO] Hello! I go to sleep.
+> [node-3.acme.org:process.startkilltime.Sleeper:(4) 3.000000] [jmsg/INFO] Hello! I go to sleep.
+> [node-4.acme.org:process.startkilltime.Sleeper:(5) 4.000000] [jmsg/INFO] Hello! I go to sleep.
+> [node-5.acme.org:process.startkilltime.Sleeper:(6) 5.000000] [jmsg/INFO] Hello! I go to sleep.
+> [node-2.acme.org:process.startkilltime.Sleeper:(3) 6.000000] [jmsg/INFO] Done sleeping
+> [node-3.acme.org:process.startkilltime.Sleeper:(4) 7.000000] [jmsg/INFO] Done sleeping
+> [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
+<platform version="4">
+ <process host="node-0.acme.org" function="process.startkilltime.Sleeper" start_time="0" kill_time="5"> <argument value="10"/></process>
+ <process host="node-1.acme.org" function="process.startkilltime.Sleeper" start_time="1" kill_time="6"> <argument value="10"/></process>
+ <process host="node-2.acme.org" function="process.startkilltime.Sleeper" start_time="2" kill_time="7"> <argument value="4" /></process>
+ <process host="node-3.acme.org" function="process.startkilltime.Sleeper" start_time="3" kill_time="8"> <argument value="4" /></process>
+ <process host="node-4.acme.org" function="process.startkilltime.Sleeper" start_time="4" kill_time="9"> <argument value="5" /></process>
+ <process host="node-5.acme.org" function="process.startkilltime.Sleeper" start_time="5" kill_time="10"> <argument value="5"/></process>
+</platform>
+++ /dev/null
-set(example java_startKillTime)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Master.java ${CMAKE_CURRENT_SOURCE_DIR}/Slave.java ${CMAKE_CURRENT_SOURCE_DIR}/StartKillTime.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-startKillTime --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/startKillTime/startKillTime.tesh)
-endif()
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/startKillTime.tesh PARENT_SCOPE)
-set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deployment_start_kill.xml PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
+++ /dev/null
-/* Copyright (c) 2006-2014, 2016. 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 startKillTime;
-import org.simgrid.msg.Host;
-import org.simgrid.msg.HostFailureException;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.Process;
-import org.simgrid.msg.TimeoutException;
-import org.simgrid.msg.TransferFailureException;
-
-public class Master extends Process {
- public Master(Host host, String name, String[]args) {
- super(host,name,args);
- }
-
- public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
- Msg.info("Hello!");
- waitFor(10.0);
- Msg.info("OK, goodbye now.");
- }
-}
+++ /dev/null
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
- <process host="Jacquelin" function="startKillTime.Master"/>
- <process host="Boivin" function="startKillTime.Slave" start_time="1" kill_time="5"/>
- <process host="Jean_Yves" function="startKillTime.Slave" start_time="2" kill_time="6"/>
- <process host="TeX" function="startKillTime.Slave" start_time="3" kill_time="7"/>
- <process host="Geoff" function="startKillTime.Slave" start_time="4" kill_time="8"/>
- <process host="Disney" function="startKillTime.Slave" start_time="5" kill_time="9"/>
-</platform>
+++ /dev/null
-#! tesh
-$ java -classpath ${classpath:=.} startKillTime/StartKillTime ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/startKillTime/deployment_start_kill.xml
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [Jacquelin:startKillTime.Master:(1) 0.000000] [jmsg/INFO] Hello!
-> [Boivin:startKillTime.Slave:(2) 1.000000] [jmsg/INFO] Hello!
-> [Jean_Yves:startKillTime.Slave:(3) 2.000000] [jmsg/INFO] Hello!
-> [TeX:startKillTime.Slave:(4) 3.000000] [jmsg/INFO] Hello!
-> [Geoff:startKillTime.Slave:(5) 4.000000] [jmsg/INFO] Hello!
-> [Disney:startKillTime.Slave:(6) 5.000000] [jmsg/INFO] Hello!
-> [Jacquelin:startKillTime.Master:(1) 10.000000] [jmsg/INFO] OK, goodbye now.
-> [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
examples/java/mutualExclusion/CMakeLists.txt
examples/java/pingPong/CMakeLists.txt
examples/java/priority/CMakeLists.txt
- examples/java/startKillTime/CMakeLists.txt
examples/java/tracing/CMakeLists.txt
examples/msg/CMakeLists.txt
examples/msg/cloud/CMakeLists.txt