summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-07-15 14:10:41 +0200
committerMatthias Braun <matze@braunis.de>2011-08-15 13:48:45 +0200
commitf75c5b35a105152cde5ffa13ebf918843c1b80c3 (patch)
tree8e970b1438d92333700f95dc987035794e60844c /ir/lpp
parent994d0ebad74ba3df6ccc42ff0cee6aa8ee568ac3 (diff)
Implement double-register support for prefalloc with an ILP method
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp_gurobi.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ir/lpp/lpp_gurobi.c b/ir/lpp/lpp_gurobi.c
index c329e7c..b3dca0f 100644
--- a/ir/lpp/lpp_gurobi.c
+++ b/ir/lpp/lpp_gurobi.c
@@ -58,10 +58,21 @@ static gurobi_t *new_gurobi(lpp_t *lpp)
gurobi_t *grb = XMALLOCZ(gurobi_t);
grb->lpp = lpp;
- error = GRBloadenv(&grb->env, NULL);
+ /* /tmp/firm_gurobi.log is a hack (see below) */
+ error = GRBloadenv(&grb->env, "/tmp/firm_gurobi.log");
check_gurobi_error(grb, error);
+ /* Matze: do not set the FILE* for logging output. Because:
+ * a) the function is deprecated
+ * b) gurobi closes the FILE handle when it is done, which leads to
+ * very unexpected effects when you pass stdout or stderr as logging
+ * output.
+ * The only thing gurobi sanely supports is giving a string with a filename
+ * :-( ...so we use /tmp/firm_gurobi.log as a temporary measure...
+ */
+#if 0
error = GRBsetlogfile(grb->env, lpp->log);
check_gurobi_error(grb, error);
+#endif
return grb;
}