Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jon Shahen
vagabond
Commits
89592ff9
Commit
89592ff9
authored
May 22, 2016
by
Mahesh Tripunitara
Browse files
timeout per decision instance appears to work
parent
f8e89ac7
Pipeline
#5963
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/vagabond/reduction/cnfsat/RunSolverCNFSAT.java
View file @
89592ff9
...
...
@@ -3,6 +3,7 @@ package vagabond.reduction.cnfsat;
import
java.io.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.logging.Logger
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -17,6 +18,8 @@ public class RunSolverCNFSAT implements RunSolver {
public
static
VagabondSettings
settings
;
public
TimingManager
timing
=
null
;
public
String
tp
=
"Epoch_Unknown"
;
public
static
Logger
logger
;
String
solverloc
;
String
cnfloc
;
// OLD VALUE = new String("/home/tripunit/Desktop/instance.cnf");
...
...
@@ -26,6 +29,7 @@ public class RunSolverCNFSAT implements RunSolver {
public
RunSolverCNFSAT
()
throws
IOException
{
settings
=
VagabondSettings
.
getInstance
();
timing
=
settings
.
timing
;
logger
=
settings
.
getLogger
();
solverloc
=
settings
.
getCNFSolverExceutable
().
getAbsolutePath
();
cnfloc
=
settings
.
getCNFInstanceFile
().
getAbsolutePath
();
}
...
...
@@ -133,6 +137,7 @@ public class RunSolverCNFSAT implements RunSolver {
+
StringUtils
.
leftPad
(
mid
+
""
,
(
int
)
Math
.
floor
(
Math
.
log10
(
hi
))
+
1
,
"0"
);
/*TIMING*/
timing
.
toggleTimer
(
tp
+
"RunSolverCNFSAT::run::binarySearch::loopVal::"
+
searchVal
);
// System.out.println("mid = "+mid); System.out.flush();
logger
.
info
(
"mid = "
+
mid
);
try
{
constraintInfoLeakUb
(
c
,
le
,
band
,
s
,
nclientpairs
,
mid
,
wirestoand
,
orignoutputs
);
...
...
@@ -148,6 +153,7 @@ public class RunSolverCNFSAT implements RunSolver {
if
(
mid
<
hi
&&
EACH_DECISION_INSTANCE_TIMEOUT
>
0
&&
!
p
.
waitFor
(
EACH_DECISION_INSTANCE_TIMEOUT
,
TimeUnit
.
SECONDS
))
{
// Treat this as unsat
p
.
destroyForcibly
();
lo
=
mid
+
1
;
/*TIMING*/
timing
.
toggleTimer
(
tp
+
"RunSolverCNFSAT::run::binarySearch::exec::"
+
searchVal
);
continue
;
...
...
src/vagabond/testing/CNFEverythingTests.java
View file @
89592ff9
...
...
@@ -23,9 +23,6 @@ public class CNFEverythingTests {
@Test
public
void
equalSpreadTest
()
throws
Exception
{
Circuit
.
resetIDs
();
ZeroOne
.
reset
();
boolean
minMaxCtoCInfoLeak
=
true
;
VagabondSettings
vs
=
VagabondSettings
.
getInstance
();
...
...
@@ -64,9 +61,6 @@ public class CNFEverythingTests {
@Test
public
void
equalSpreadBiggerTest
()
throws
Exception
{
Circuit
.
resetIDs
();
ZeroOne
.
resetIDs
();
int
testparam
=
8
;
int
migbudget
=
5
;
boolean
minMaxCtoCInfoLeak
=
false
;
...
...
@@ -106,9 +100,6 @@ public class CNFEverythingTests {
@Test
public
void
nomadILPTest
()
throws
Exception
{
Circuit
.
resetIDs
();
ZeroOne
.
reset
();
boolean
minMaxCtoCInfoLeak
=
true
;
VagabondSettings
vs
=
VagabondSettings
.
getInstance
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment