missing commit for specifying output dir for simulation result
authorjzhou <jzhou>
Tue, 24 Feb 2009 00:39:48 +0000 (00:39 +0000)
committerjzhou <jzhou>
Tue, 24 Feb 2009 00:39:48 +0000 (00:39 +0000)
Robust/src/Analysis/Scheduling/MCImplSynthesis.java
Robust/src/IR/State.java
Robust/src/Main/Main.java

index 572349b7b6b1bea7a2ee6e5169295e9d9c538cb5..2d4a9d31e0c0641149f48091b7922371c30bd846 100644 (file)
@@ -71,7 +71,9 @@ public class MCImplSynthesis {
        // Create a new output stream for the standard output.
        PrintStream stdout  = null;
        try {
-           stdout = new PrintStream(new FileOutputStream("/scratch/SimulatorResult.out"));
+           stdout = new PrintStream(
+                   new FileOutputStream(this.state.outputdir + "SimulatorResult_" 
+                                        + this.coreNum + ".out"));
        } catch (Exception e) {
            // Sigh.  Couldn't open the file.
            System.out.println("Redirect:  Unable to open output file!");
index b07f6917131d4d26a466fe1472264ecb2c5e150f..1419a507db62140e67247d3f4b1c620b6fba2ff4 100644 (file)
@@ -78,6 +78,7 @@ public class State {
   public int CORENUM = 1;
   public String structfile;
   public String main;
+  public String outputdir = null;
 
   public HashSet selfloops;
   public HashSet excprefetch;
index 9e9c110dfc06c124b3adabee685cbfc3d2d0a32f..d96a977259982af2e6bcd50ea8f6b74378e5ea8c 100644 (file)
@@ -70,7 +70,7 @@ public class Main {
       else if (option.equals("-selfloop"))
        state.selfloops.add(args[++i]);
          else if (option.equals("-outputdir"))
-       outputdir = args[++i];
+       state.outputdir = args[++i];
       else if (option.equals("-excprefetch"))
        state.excprefetch.add(args[++i]);
       else if (option.equals("-classlibrary"))