Skip to content

Commit

Permalink
Theoretically turning on more debugging stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmundt committed Jan 14, 2025
1 parent b2cb3ae commit 6c72f73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyomo/scripting/driver_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ def help_solvers():
# suppress ALL output
with capture_output(capture_fd=True):
for s in solver_list:
# Log the solver being checked
print(f"Checking solver: {s}", file=sys.stderr)
# Create a solver, and see if it is available
with pyomo.opt.SolverFactory(s) as opt:
ver = ''
Expand All @@ -257,6 +259,8 @@ def help_solvers():
else:
ver = ''
except (AttributeError, NameError):
# Log that a solver was not found/skipped
print(f"Error retrieving version for solver: {s}", file=sys.stderr)
pass
elif s == 'py':
# py is a metasolver, but since we don't specify a subsolver
Expand All @@ -274,6 +278,8 @@ def help_solvers():
else:
avail = ''
_data.append((avail, s, ver, pyomo.opt.SolverFactory.doc(s)))
# Log the result
print(f"Solver: {s}, Availability: {avail}, Version: {ver}", file=sys.stderr)
finally:
# Reset logging level
logging.disable(logging.NOTSET)
Expand Down

0 comments on commit 6c72f73

Please sign in to comment.