Skip to content

Commit 9c3c033

Browse files
authored
Fixing a few things for run_all, but not yet fixing the farmer runall problems with wtracker (#401)
1 parent 4007168 commit 9c3c033

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

examples/run_all.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ def do_one_mmw(dirname, runefstring, npyfile, mmwargstring):
337337

338338
# sizes kills the github tests using xpress
339339
# so we use linearized proximal terms
340-
do_one("sizes", "sizes_demo.py", 1, " {}".format(solver_name))
341340

342341
do_one("sizes",
343342
"special_cylinders.py",
@@ -399,6 +398,8 @@ def do_one_mmw(dirname, runefstring, npyfile, mmwargstring):
399398
"--lagrangian-iter0-mipgap=1e-7 --cross-scenario-cuts "
400399
"--ph-mipgaps-json=phmipgaps.json --cross-scenario-iter-cnt=4 "
401400
"--solver-name={}".format(solver_name))
401+
# this one takes a long time, so I moved it into the uc section
402+
do_one("sizes", "sizes_demo.py", 1, " {}".format(solver_name))
402403

403404
if len(badguys) > 0:
404405
print("\nBad Guys:")

mpisppy/spopt.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ def _vb(msg):
193193
print ("status=", results.solver.status)
194194
print ("TerminationCondition=",
195195
results.solver.termination_condition)
196+
else:
197+
print("no results object, so solving agin with tee=True")
198+
solve_keyword_args["tee"] = True
199+
results = s._solver_plugin.solve(s,
200+
**solve_keyword_args,
201+
load_solutions=False)
196202

197203
if solver_exception is not None:
198204
raise solver_exception
@@ -867,8 +873,10 @@ def _create_solvers(self, presolve=True):
867873
root=0)
868874
if self.cylinder_rank == 0:
869875
asit = [sit for l_sit in all_set_instance_times for sit in l_sit]
870-
print("Set instance times:")
871-
print("\tmin=%4.2f mean=%4.2f max=%4.2f" %
876+
if len(asit) == 0:
877+
print("Set instance times not available.")
878+
else:
879+
print("Set instance times: \tmin=%4.2f mean=%4.2f max=%4.2f" %
872880
(np.min(asit), np.mean(asit), np.max(asit)))
873881

874882

0 commit comments

Comments
 (0)