From 919a64b243be87474b44c923b8671114ef7c8729 Mon Sep 17 00:00:00 2001 From: adash Date: Tue, 23 Feb 2010 22:52:47 +0000 Subject: [PATCH] command line parsing change for the script --- Robust/src/Benchmarks/Recovery/Game/README | 4 ++-- Robust/src/Benchmarks/Recovery/Game/java/RainForest.java | 7 ++----- .../src/Benchmarks/Recovery/Game/recovery/RainForest.java | 7 ++----- Robust/src/Benchmarks/Recovery/Game/recovery/makefile | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Robust/src/Benchmarks/Recovery/Game/README b/Robust/src/Benchmarks/Recovery/Game/README index 0eecfb89..8607f34b 100644 --- a/Robust/src/Benchmarks/Recovery/Game/README +++ b/Robust/src/Benchmarks/Recovery/Game/README @@ -7,7 +7,7 @@ compile: make -run usage: ./Game.bin -N +run usage: ./Game.bin # recovery directory has the source code for a multi threaded execution with # enabled @@ -17,5 +17,5 @@ Building and running recovery version compile: make -run usage: ./Game.bin master -N (on master machine) +run usage: ./Game.bin master (on master machine) and ./Game.bin (on slaves) diff --git a/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java b/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java index d600cfa4..2c9fa263 100644 --- a/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java +++ b/Robust/src/Benchmarks/Recovery/Game/java/RainForest.java @@ -269,15 +269,12 @@ public class RainForest extends Thread { **/ public static void parseCmdLine(String args[], RainForest rf) { int i = 0; + rf.numThreads = new Integer(args[0]).intValue(); String arg; while(i < args.length && args[i].startsWith("-")) { arg = args[i++]; //check options - if(arg.equals("-N")) { - if(i < args.length) { - rf.numThreads = new Integer(args[i++]).intValue(); - } - } else if(arg.equals("-h")) { + if(arg.equals("-h")) { rf.usage(); } } diff --git a/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java b/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java index 79df0e92..3aade1d8 100644 --- a/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java +++ b/Robust/src/Benchmarks/Recovery/Game/recovery/RainForest.java @@ -276,15 +276,12 @@ public class RainForest extends Thread { **/ public static void parseCmdLine(String args[], RainForest rf) { int i = 0; + rf.numThreads = new Integer(args[0]).intValue(); String arg; while(i < args.length && args[i].startsWith("-")) { arg = args[i++]; //check options - if(arg.equals("-N")) { - if(i < args.length) { - rf.numThreads = new Integer(args[i++]).intValue(); - } - } else if(arg.equals("-h")) { + if(arg.equals("-h")) { rf.usage(); } } diff --git a/Robust/src/Benchmarks/Recovery/Game/recovery/makefile b/Robust/src/Benchmarks/Recovery/Game/recovery/makefile index ef57b7e1..3b9771b4 100644 --- a/Robust/src/Benchmarks/Recovery/Game/recovery/makefile +++ b/Robust/src/Benchmarks/Recovery/Game/recovery/makefile @@ -11,7 +11,7 @@ SRC=tmp${MAINCLASS}.java \ AStarPathFinder.java \ ../../../../ClassLibrary/JavaDSM/Thread.java -FLAGS1=-dsm -recoverystats -recovery -debug -nooptimize -mainclass ${MAINCLASS} +FLAGS1=-dsm -recoverystats -recovery -optimize -mainclass ${MAINCLASS} default: cpp ${MAINCLASS}.java > tmp1${MAINCLASS}.java -- 2.34.1