examples/java/process/suspend/java_process_suspend_compiled
examples/java/process/startkilltime/java_process_startkilltime_compiled
examples/java/task/priority/java_task_priority_compiled
-examples/java/tracing/java_tracing_compiled
+examples/java/trace/pingpong/java_trace_pingpong_compiled
/CMakeCache.txt
examples/smpi/mc/smpi_bugged1
examples/smpi/mc/smpi_bugged1_liveness
${srcdir}/KademliaTask.java ${srcdir}/Node.java ${srcdir}/PingAnswerTask.java
${srcdir}/PingTask.java ${srcdir}/RoutingTable.java)
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/trace/pingpong)
+set(trace_pingpong_sources ${srcdir}/Main.java ${srcdir}/PingPongTask.java ${srcdir}/Receiver.java
+ ${srcdir}/Sender.java)
+
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}/energy/consumption)
set(energy_consumption_sources ${srcdir}/Main.java ${srcdir}/EnergyConsumer.java)
foreach (example app_bittorrent app_centralizedmutex app_masterworker app_pingpong cloud_migration cloud_masterworker
dht_chord dht_kademlia energy_consumption energy_vm io_file io_storage process_kill process_migration
- process_startkilltime process_suspend task_priority)
+ process_startkilltime process_suspend task_priority trace_pingpong)
string (REPLACE "_" "/" example_dir ${example})
if(enable_java)
add_custom_command(
if(enable_java)
foreach (example app_bittorrent app_centralizedmutex app_masterworker app_pingpong cloud_migration cloud_masterworker
dht_chord dht_kademlia energy_consumption energy_vm io_file io_storage process_kill process_migration
- process_startkilltime process_suspend task_priority)
+ process_startkilltime process_suspend task_priority trace_pingpong)
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 tracing;
+package trace.pingpong;
import org.simgrid.msg.Msg;
import org.simgrid.trace.Trace;
+import org.simgrid.msg.MsgException;
import org.simgrid.msg.NativeException;
-public class TracingTest {
- public static void main(String[] args) throws NativeException {
+public class Main {
+ public static void main(String[] args) throws MsgException, NativeException {
Msg.init(args);
- if(args.length < 2) {
- Msg.info("Usage : TracingTest platform_file deployment_file");
- Msg.info("example : TracingTest ../platforms/platform.xml tracingPingPongDeployment.xml");
+ if(args.length < 1) {
+ Msg.info("Usage : TracingTest platform_file");
+ Msg.info("example : TracingTest ../platforms/platform.xml");
System.exit(1);
}
/* construct the platform and deploy the application */
Msg.createEnvironment(args[0]);
- Msg.deployApplication(args[1]);
+ new Sender("Jacquelin", "Sender", new String[] {"Boivin", "Marcel"}).start();
+ new Receiver ("Boivin", "Receiver", null).start();
+ new Receiver ("Marcel", "Receiver", null).start();
/* Initialize some state for the hosts */
Trace.hostStateDeclare ("PM_STATE");
/* 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 tracing;
+package trace.pingpong;
import org.simgrid.msg.NativeException;
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 tracing;
+package trace.pingpong;
import org.simgrid.msg.Host;
import org.simgrid.msg.Msg;
import org.simgrid.msg.MsgException;
+import org.simgrid.msg.NativeException;
+import org.simgrid.msg.HostNotFoundException;
import org.simgrid.msg.Task;
import org.simgrid.msg.Process;
import org.simgrid.trace.Trace;
private final double commSizeLat = 1;
private final double commSizeBw = 100000000;
- public Receiver(Host host, String name, String[]args) {
- super(host,name,args);
+ public Receiver(String hostname, String name, String[]args) throws HostNotFoundException, NativeException{
+ super(hostname,name,args);
}
public void main(String[] args) throws 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 tracing;
+package trace.pingpong;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Host;
import org.simgrid.msg.Task;
import org.simgrid.msg.Process;
import org.simgrid.msg.MsgException;
+import org.simgrid.msg.NativeException;
import org.simgrid.msg.HostNotFoundException;
import org.simgrid.trace.Trace;
private final double commSizeLat = 1;
private final double commSizeBw = 100000000;
- public Sender(Host host, String name, String[] args) {
- super(host,name,args);
+ public Sender(String hostname, String name, String[] args) throws HostNotFoundException, NativeException {
+ super(hostname,name,args);
}
public void main(String[] args) throws MsgException {
--- /dev/null
+#! tesh
+
+! output sort 19
+
+$ java -classpath ${classpath:=.} trace/pingpong/Main ${srcdir:=.}/../platforms/platform.xml --cfg=tracing:yes --cfg=tracing/filename:simulation.trace --cfg=tracing/platform:yes
+> [0.000000] [jmsg/INFO] Using regular java threads.
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'simulation.trace'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/platform' to 'yes'
+> [4.474401] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
+> [Boivin:Receiver:(2) 0.000000] [jmsg/INFO] hello!
+> [Boivin:Receiver:(2) 0.000000] [jmsg/INFO] try to get a task
+> [Boivin:Receiver:(2) 1.048882] [jmsg/INFO] Got at time 1.0488818628325232
+> [Boivin:Receiver:(2) 1.048882] [jmsg/INFO] Was sent at time 0.0
+> [Boivin:Receiver:(2) 1.048882] [jmsg/INFO] Communication time : 1.0488818628325232
+> [Boivin:Receiver:(2) 1.048882] [jmsg/INFO] --- bw 9.533962169004269E7 ----
+> [Boivin:Receiver:(2) 2.097764] [jmsg/INFO] goodbye!
+> [Jacquelin:Sender:(1) 0.000000] [jmsg/INFO] hello !
+> [Jacquelin:Sender:(1) 0.000000] [jmsg/INFO] host count: 2
+> [Jacquelin:Sender:(1) 0.000000] [jmsg/INFO] sender time: 0.0
+> [Jacquelin:Sender:(1) 2.097764] [jmsg/INFO] Got at time 2.0977637256650463
+> [Jacquelin:Sender:(1) 2.097764] [jmsg/INFO] Was sent at time 0.0
+> [Jacquelin:Sender:(1) 2.097764] [jmsg/INFO] Communication time : 2.0977637256650463
+> [Jacquelin:Sender:(1) 2.097764] [jmsg/INFO] --- bw 4.7669810845021345E7 ----
+> [Jacquelin:Sender:(1) 2.097764] [jmsg/INFO] sender time: 2.0977637256650463
+> [Jacquelin:Sender:(1) 4.474401] [jmsg/INFO] Got at time 4.47440072325564
+> [Jacquelin:Sender:(1) 4.474401] [jmsg/INFO] Was sent at time 2.0977637256650463
+> [Jacquelin:Sender:(1) 4.474401] [jmsg/INFO] Communication time : 2.376636997590594
+> [Jacquelin:Sender:(1) 4.474401] [jmsg/INFO] --- bw 4.2076261583648995E7 ----
+> [Jacquelin:Sender:(1) 4.474401] [jmsg/INFO] goodbye!
+> [Marcel:Receiver:(3) 0.000000] [jmsg/INFO] hello!
+> [Marcel:Receiver:(3) 0.000000] [jmsg/INFO] try to get a task
+> [Marcel:Receiver:(3) 3.057925] [jmsg/INFO] Got at time 3.0579254576553434
+> [Marcel:Receiver:(3) 3.057925] [jmsg/INFO] Was sent at time 2.0977637256650463
+> [Marcel:Receiver:(3) 3.057925] [jmsg/INFO] Communication time : 0.9601617319902971
+> [Marcel:Receiver:(3) 3.057925] [jmsg/INFO] --- bw 1.0414912057858452E8 ----
+> [Marcel:Receiver:(3) 4.474401] [jmsg/INFO] goodbye!
+
+$ rm -rf simulation.trace
+++ /dev/null
-set(example java_tracing)
-set(sources ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
- ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java ${CMAKE_CURRENT_SOURCE_DIR}/TracingTest.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-tracing --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/tracing/tracingPingPong.tesh)
-endif()
-
-set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPong.tesh PARENT_SCOPE)
-set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPongDeployment.xml PARENT_SCOPE)
-set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
+++ /dev/null
-#! tesh
-
-! output sort 19
-
-$ java -classpath ${classpath:=.} tracing/TracingTest ${srcdir:=.}/../platforms/platform.xml ${srcdir:=.}/tracing/tracingPingPongDeployment.xml --cfg=tracing:yes --cfg=tracing/filename:simulation.trace --cfg=tracing/platform:yes
-> [0.000000] [jmsg/INFO] Using regular java threads.
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'simulation.trace'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/platform' to 'yes'
-> [4.474401] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [Boivin:tracing.Receiver:(2) 0.000000] [jmsg/INFO] hello!
-> [Boivin:tracing.Receiver:(2) 0.000000] [jmsg/INFO] try to get a task
-> [Boivin:tracing.Receiver:(2) 1.048882] [jmsg/INFO] Got at time 1.0488818628325232
-> [Boivin:tracing.Receiver:(2) 1.048882] [jmsg/INFO] Was sent at time 0.0
-> [Boivin:tracing.Receiver:(2) 1.048882] [jmsg/INFO] Communication time : 1.0488818628325232
-> [Boivin:tracing.Receiver:(2) 1.048882] [jmsg/INFO] --- bw 9.533962169004269E7 ----
-> [Boivin:tracing.Receiver:(2) 2.097764] [jmsg/INFO] goodbye!
-> [Jacquelin:tracing.Sender:(1) 0.000000] [jmsg/INFO] hello !
-> [Jacquelin:tracing.Sender:(1) 0.000000] [jmsg/INFO] host count: 2
-> [Jacquelin:tracing.Sender:(1) 0.000000] [jmsg/INFO] sender time: 0.0
-> [Jacquelin:tracing.Sender:(1) 2.097764] [jmsg/INFO] Got at time 2.0977637256650463
-> [Jacquelin:tracing.Sender:(1) 2.097764] [jmsg/INFO] Was sent at time 0.0
-> [Jacquelin:tracing.Sender:(1) 2.097764] [jmsg/INFO] Communication time : 2.0977637256650463
-> [Jacquelin:tracing.Sender:(1) 2.097764] [jmsg/INFO] --- bw 4.7669810845021345E7 ----
-> [Jacquelin:tracing.Sender:(1) 2.097764] [jmsg/INFO] sender time: 2.0977637256650463
-> [Jacquelin:tracing.Sender:(1) 4.474401] [jmsg/INFO] Got at time 4.47440072325564
-> [Jacquelin:tracing.Sender:(1) 4.474401] [jmsg/INFO] Was sent at time 2.0977637256650463
-> [Jacquelin:tracing.Sender:(1) 4.474401] [jmsg/INFO] Communication time : 2.376636997590594
-> [Jacquelin:tracing.Sender:(1) 4.474401] [jmsg/INFO] --- bw 4.2076261583648995E7 ----
-> [Jacquelin:tracing.Sender:(1) 4.474401] [jmsg/INFO] goodbye!
-> [Marcel:tracing.Receiver:(3) 0.000000] [jmsg/INFO] hello!
-> [Marcel:tracing.Receiver:(3) 0.000000] [jmsg/INFO] try to get a task
-> [Marcel:tracing.Receiver:(3) 3.057925] [jmsg/INFO] Got at time 3.0579254576553434
-> [Marcel:tracing.Receiver:(3) 3.057925] [jmsg/INFO] Was sent at time 2.0977637256650463
-> [Marcel:tracing.Receiver:(3) 3.057925] [jmsg/INFO] Communication time : 0.9601617319902971
-> [Marcel:tracing.Receiver:(3) 3.057925] [jmsg/INFO] --- bw 1.0414912057858452E8 ----
-> [Marcel:tracing.Receiver:(3) 4.474401] [jmsg/INFO] goodbye!
-
-$ rm -rf simulation.trace
+++ /dev/null
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
- <process host="Jacquelin" function="tracing.Sender">
- <argument value="Boivin"/>
- <argument value="Marcel"/>
- </process>
- <process host="Boivin" function="tracing.Receiver"/>
- <process host="Marcel" function="tracing.Receiver"/>
-</platform>
set(CMAKEFILES_TXT
examples/java/CMakeLists.txt
examples/java/async/CMakeLists.txt
- examples/java/tracing/CMakeLists.txt
examples/msg/CMakeLists.txt
examples/msg/cloud/CMakeLists.txt
examples/msg/mc/CMakeLists.txt