From f86ca6c1e010a0351a863d4d3b6d6658be83b29b Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 25 Jan 2019 15:20:18 +0100 Subject: [PATCH] Restore final messages in Java examples. They should be OK now that the termination of Java processes has been repaired. These messages were removed by commit d535c50c617ba838b99de4bd251a6ac076774d00 "Somehow fix the killing of actors in Java". --- ChangeLog | 1 + examples/deprecated/java/app/tokenring/Main.java | 2 ++ examples/deprecated/java/app/tokenring/app-tokenring.tesh | 3 +++ examples/deprecated/java/energy/consumption/Main.java | 1 + .../deprecated/java/energy/consumption/energy-consumption.tesh | 1 + 5 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index d3e74eb3fc..01754c7796 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ SimGrid (3.22) NOT RELEASED (Release Target: December 21. 2018, 22:23 UTC) Java: + - Process termination which was broken at version 3.21 has been repaired. - Expose host load plugin: loadInit, getCurrentLoad, getComputedFlops, getAvgLoad - Hide the examples into examples/deprecated. New users should use Python. diff --git a/examples/deprecated/java/app/tokenring/Main.java b/examples/deprecated/java/app/tokenring/Main.java index 4ccfafdc81..b05045ebd4 100644 --- a/examples/deprecated/java/app/tokenring/Main.java +++ b/examples/deprecated/java/app/tokenring/Main.java @@ -29,5 +29,7 @@ class Main { } Msg.info("Number of hosts '"+hosts.length+"'"); Msg.run(); + + Msg.info("Simulation time " + Msg.getClock()); } } diff --git a/examples/deprecated/java/app/tokenring/app-tokenring.tesh b/examples/deprecated/java/app/tokenring/app-tokenring.tesh index 2327a3ef5f..f065739a29 100644 --- a/examples/deprecated/java/app/tokenring/app-tokenring.tesh +++ b/examples/deprecated/java/app/tokenring/app-tokenring.tesh @@ -16,6 +16,7 @@ $ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/.. > [ 0.101019] (6:5@host6) Host '5' send 'Token' to Host '0' > [ 0.131796] (1:0@host1) Host '0' received 'Token' > [ 0.131796] (0:maestro@) MSG_main finished; Terminating the simulation... +> [ 0.131796] (0:maestro@) Simulation time 0.13179602061855672 $ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../../platforms/two_peers.xml '--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n' > [ 0.000000] (0:maestro@) Using regular java threads. @@ -25,6 +26,7 @@ $ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/.. > [ 0.624423] (2:1@100036570) Host '1' send 'Token' to Host '0' > [ 1.248846] (1:0@100030591) Host '0' received 'Token' > [ 1.248846] (0:maestro@) MSG_main finished; Terminating the simulation... +> [ 1.248846] (0:maestro@) Simulation time 1.2488464578972847 $ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/../../platforms/meta_cluster.xml '--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n' > [ 0.000000] (0:maestro@) Using regular java threads. @@ -150,3 +152,4 @@ $ ${javacmd:=java} -classpath ${classpath:=.} app/tokenring/Main ${srcdir:=.}/.. > [ 1.791501] (60:59@host-9.cluster2) Host '59' send 'Token' to Host '0' > [ 1.821865] (1:0@host-1.cluster1) Host '0' received 'Token' > [ 1.821865] (0:maestro@) MSG_main finished; Terminating the simulation... +> [ 1.821865] (0:maestro@) Simulation time 1.8218653608247406 diff --git a/examples/deprecated/java/energy/consumption/Main.java b/examples/deprecated/java/energy/consumption/Main.java index 307765496d..1e87be0ad8 100644 --- a/examples/deprecated/java/energy/consumption/Main.java +++ b/examples/deprecated/java/energy/consumption/Main.java @@ -29,5 +29,6 @@ public class Main { new EnergyConsumer("MyHost1","energyConsumer").start(); /* Execute the simulation */ Msg.run(); + Msg.info("Total simulation time: " + Msg.getClock()); } } diff --git a/examples/deprecated/java/energy/consumption/energy-consumption.tesh b/examples/deprecated/java/energy/consumption/energy-consumption.tesh index 1117914d0e..62c75adc03 100644 --- a/examples/deprecated/java/energy/consumption/energy-consumption.tesh +++ b/examples/deprecated/java/energy/consumption/energy-consumption.tesh @@ -10,6 +10,7 @@ $ ${javacmd:=java} -classpath ${classpath:=.} energy/consumption/Main ${srcdir:= > [MyHost1:energyConsumer:(1) 20.000000] [java/INFO] Currently consumed energy after executing 1E9 flops: 2200.0 > [20.000000] [surf_energy/INFO] Total energy consumption: 6200.000000 Joules (used hosts: 2200.000000 Joules; unused/idle hosts: 4000.000000) > [20.000000] [java/INFO] MSG_main finished; Terminating the simulation... +> [20.000000] [java/INFO] Total simulation time: 20.0 > [20.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 2200.000000 Joules > [20.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 2000.000000 Joules > [20.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 2000.000000 Joules -- 2.20.1