Commit d33cd994 authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

HOTFIX: unable to run solver if there is a space in the filepath; adding...

HOTFIX: unable to run solver if there is a space in the filepath; adding specific nomad tests for CNF
parent 4589d81d
......@@ -265,3 +265,8 @@ Date Time,Test Name,Machines,Clients,Slots,Max VMs/Client,Min VMs/Client,Placeme
2016/09/30 07:36:19.290-0400,RANDOM_SCALABILITY_TEST,32,16,32,32,32,EqualSpreadHalf_32,512,-1,0.5,1024,5,1475278581751,1,ilp,Sum CCIL,404127,7680,0,32,0,7680,32,1,1,404127,0=0;1=0;2=0;3=0;4=0;5=0;6=0;7=0;8=0;9=0;10=0;11=0;12=0;13=0;14=0;15=0;16=0;17=0;18=0;19=0;20=0;21=0;22=0;23=0;24=0;25=0;26=0;27=0;28=0;29=0;30=0;31=0;32=240,0=240,7680;0,32;0,489,1,404138,200 VMs (Journal Paper Addition)
2016/09/30 09:18:10.283-0400,RANDOM_SCALABILITY_TEST,24,12,24,24,24,EqualSpreadHalf_24,288,-1,0.5,576,5,1475284693175,1,ilp,Sum CCIL,42760,3168,0,24,0,3168,24,1,1,42760,0=0;1=0;2=0;3=0;4=0;5=0;6=0;7=0;8=0;9=0;10=0;11=0;12=0;13=0;14=0;15=0;16=0;17=0;18=0;19=0;20=0;21=0;22=0;23=0;24=132,0=132,3168;0,24;0,264,1,42768,288 VMs (Journal Paper Addition)
2016/09/30 09:22:27.169-0400,RANDOM_SCALABILITY_TEST,20,20,20,10,10,equalSpreadHalf2_20,200,-1,0.5,400,5,1475284958012,1,ilp,Sum CCIL,209460,3800,0,10,0,3800,10,1,1,209460,0=0;1=0;2=0;3=0;4=0;5=0;6=0;7=0;8=0;9=0;10=380,0=380,3800;0,10;0,190,1,209469,200 VMs (Journal Paper Addition)
2017/07/04 06:54:02.529-0400,CNFSimple,3,4,3,2,2,Random_12,8,3,0.8888888888888888,9,5,12,10,ilp,Sum CCIL,69,8,8,2,2,0,0,0,0,404;43;31;28;28;28;28;37;32;31,0=8;1=0;2=4,0=8;1=0;2=4,8;8;8;8;8;8;8;8;8;8;8,2;2;2;2;2;2;2;2;2;2;2,1;0;0;0;0;0;0;0;0;0,1,698,Just a simple test to show that something works
2017/07/04 07:30:07.254-0400,TEST_1_NOMAD_TEST_10,10,10,4,2,2,nomadTest_10,20,-1,0.5,40,5,1499211009022,2,cnf,Sum CCIL,14617,34,0,1,0,34,1,1,1,15376;13859,0=56;1=34,0=90,34;0;0,1;0;0,17;12,2,29242,Cluster size of 10
2017/07/04 07:31:20.612-0400,TEST_1_NOMAD_TEST_10,10,10,4,2,2,nomadTest_10,20,-1,0.5,40,5,1499211107167,2,cnf,Sum CCIL,11833,20,0,2,0,20,2,1,1,12594;11072,0=72;1=16;2=2,0=90,20;0;0,2;0;0,20;14,2,23673,Cluster size of 10
2017/07/04 07:39:24.854-0400,TEST_1_NOMAD_TEST_10,10,10,4,2,2,nomadTest_10,20,-1,0.5,40,5,1499211572009,2,cnf,Sum CCIL,14256,34,0,2,0,34,2,1,1,14770;13743,0=58;1=30;2=2,0=90,34;0;0,2;0;0,17;18,2,28523,Cluster size of 10
2017/07/04 07:42:34.597-0400,TEST_1_NOMAD_TEST_20,20,20,4,2,2,nomadTest_20,40,-1,0.5,80,5,1499211763144,2,cnf,Sum CCIL,437490,78,0,2,0,78,2,1,1,428551;446430,0=308;1=66;2=6,0=380,78;0;0,2;0;0,38;38,2,874993,Cluster size of 20
......@@ -3,6 +3,7 @@ package vagabond.reduction.cnfsat;
import java.io.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.lang3.StringUtils;
......@@ -148,7 +149,9 @@ public class RunSolverCNFSAT implements RunSolver {
// TODO Delete objects?
/*TIMING*/ timing.toggleTimer(tp + "RunSolverCNFSAT::run::binarySearch::exec::" + searchVal);
Process p = Runtime.getRuntime().exec(solverloc + " " + commands + cnfloc);
String exec_cmd = "\"" + solverloc + "\" " + commands + " \"" + cnfloc + "\"";
logger.log(Level.INFO, "[CNF Solver " + tp + "] Executing command: " + exec_cmd);
Process p = Runtime.getRuntime().exec(exec_cmd);
// Activate the following 'if,' if we want to put in a time-limit for every decision instance.
if (mid < hi && EACH_DECISION_INSTANCE_TIMEOUT > 0
......@@ -169,6 +172,7 @@ public class RunSolverCNFSAT implements RunSolver {
List<String> lines = new LinkedList<String>();
boolean recordlines = false;
for (String str = null; (str = solveroutput.readLine()) != null;) {
// System.out.println(str); // DEBUG LINE
if (recordlines) {
lines.add(str);
if (str.contains(Integer.toString(c.getInputs().size()))) {
......@@ -189,14 +193,12 @@ public class RunSolverCNFSAT implements RunSolver {
/*TIMING*/ timing.toggleTimer(tp + "RunSolverCNFSAT::run::binarySearch::exec::" + searchVal);
if (!recordlines) {
logger.info("[CNF Solver " + tp +
"] Binary Search UNSAT for: mid = " + mid + "; high=" + hi + "; low=" + lo + "; Took "
+ timing.getLastElapsedTimeSec() + " seconds");
logger.info("[CNF Solver " + tp + "] Binary Search UNSAT for: mid = " + mid + "; high=" + hi
+ "; low=" + lo + "; Took " + timing.getLastElapsedTimeSec() + " seconds");
lo = mid + 1; // unsat
} else {
logger.info("[CNF Solver " + tp +
"] Binary Search SAT for: mid = " + mid + "; high=" + hi + "; low=" + lo + "; Took "
+ timing.getLastElapsedTimeSec() + " seconds");
logger.info("[CNF Solver " + tp + "] Binary Search SAT for: mid = " + mid + "; high=" + hi
+ "; low=" + lo + "; Took " + timing.getLastElapsedTimeSec() + " seconds");
cnfcert = lines;
hi = mid - 1;
}
......@@ -222,6 +224,7 @@ public class RunSolverCNFSAT implements RunSolver {
// Build an epochhistory data structure as required by this function's signature
if (cnfcert == null) {
logger.log(Level.WARNING, "The cnfcert is Null!");
/*TIMING*/ timing.cancelTimer(tp + "RunSolverCNFSAT::run::totalTime");
return null;
}
......@@ -285,8 +288,7 @@ public class RunSolverCNFSAT implements RunSolver {
return c;
}
public List<Circuit.Wire> getInWires(Circuit r, int k, int c,
int nc, int ns, List<Integer> nv) throws Exception {
public List<Circuit.Wire> getInWires(Circuit r, int k, int c, int nc, int ns, List<Integer> nv) throws Exception {
List<Circuit.Wire> ret = new LinkedList<Circuit.Wire>();
int prevcnv = 0;
......@@ -419,8 +421,8 @@ public class RunSolverCNFSAT implements RunSolver {
return s;
}
public void constraintInfoLeakUb(Circuit c, LessEquals le[], BigAndOr band[], Sum s[], int nclientpairs,
int ub, Circuit.Wire wirestoand[], int orignoutputs) throws Exception {
public void constraintInfoLeakUb(Circuit c, LessEquals le[], BigAndOr band[], Sum s[], int nclientpairs, int ub,
Circuit.Wire wirestoand[], int orignoutputs) throws Exception {
for (int i = 0; i < c.getOutputs().size(); i++)
c.removeAsOutput(c.getOutputs().get(0));
......
# I am a comment
maxCCIL=false
#nomad ilp cnf
reduction=cnf
placement=nomadTest
equalSpreadNum=10
migrationBudget=-1
# Take the average epoch time
numberOfEpochs=2
slidingWindow=5
# OPTIONAL: Can Comment these lines out
#seed=10
name=TEST_1_NOMAD_TEST_10
comment=Cluster size of 10
\ No newline at end of file
# I am a comment
maxCCIL=false
#nomad ilp cnf
reduction=cnf
placement=nomadTest
equalSpreadNum=20
migrationBudget=-1
# Take the average epoch time
numberOfEpochs=2
slidingWindow=5
# OPTIONAL: Can Comment these lines out
#seed=10
name=TEST_1_NOMAD_TEST_20
comment=Cluster size of 20
\ No newline at end of file
# I am a comment
maxCCIL=false
#nomad ilp cnf
reduction=cnf
placement=nomadTest
equalSpreadNum=40
migrationBudget=-1
# Take the average epoch time
numberOfEpochs=1
slidingWindow=5
# OPTIONAL: Can Comment these lines out
#seed=10
name=TEST_1_NOMAD_TEST_40
comment=Cluster size of 40
\ No newline at end of file
# I am a comment
maxCCIL=false
#nomad ilp cnf
reduction=cnf
placement=nomadTest
equalSpreadNum=50
migrationBudget=-1
# Take the average epoch time
numberOfEpochs=1
slidingWindow=5
# OPTIONAL: Can Comment these lines out
#seed=10
name=TEST_1_NOMAD_TEST_50
comment=Cluster size of 50
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment