convexengineering / gpkit

Geometric programming for engineers
http://gpkit.readthedocs.org
MIT License
206 stars 40 forks source link

Build log cleanup? #1478

Closed pgkirsch closed 4 years ago

pgkirsch commented 4 years ago

This output can be a little alarming to read. Would you be open to something that suppresses the failure if ultimately the solver is found?

# Looking for mosek_cli
#   Trying to run mskexpopt...
#     Calling 'mskexpopt'
##
### CALL BEGINS
/bin/sh: mskexpopt: command not found
### CALL ENDS
##
# `mskexpopt` is not in system path, let's try adding it.
#   Trying to run mskexpopt...
#     Calling 'mskexpopt'
##
### CALL BEGINS
No filename given.
Usage:
     mskexpopt FILENAME [-primal] [-dual] [-p parameterfile]
Return code: 1052
Description: MSK_RES_ERR_FILE_OPEN [An error occurred while opening a file.]
### CALL ENDS
##
# Found mosek_cli in /Users/philippe.kirschen/mosek/8/tools/platform/osx64x86/bin
bqpd commented 4 years ago

For sure!

bqpd commented 4 years ago

How about instead just noting in the message that an error is expected?

pgkirsch commented 4 years ago

Whatever you think is best!

bqpd commented 4 years ago

@pgkirsch how's this look:

# Moving to the directory from which GPkit was imported.

Attempting to find and build solvers:

# Looking for `mosek_cli`
#   (A "success" is if mskexpopt complains that
#    we haven't specified a file for it to open.)
#     Calling 'mskexpopt'
##
### CALL BEGINS
/bin/sh: 1: mskexpopt: not found
### CALL ENDS
##
# Looks like `mskexpopt` was not found in the default PATH,
#  so let's try locating that binary ourselves.
#   Adding /home/tao/mosek/8/tools/platform/linux64x86/bin to the PATH
#     Calling 'mskexpopt'
##
### CALL BEGINS
No filename given.
Usage:
### CALL ENDS
##

Found mosek_cli in /home/tao/mosek/8/tools/platform/linux64x86/bin

# Looking for `mosek_conif`
#   Trying to import mosek...

Found mosek_conif in the default PYTHONPATH

# Looking for `cvxopt`
#   Trying to import cvxopt...

Found cvxopt in the default PYTHONPATH

Found the following solvers: mosek_cli, mosek_conif, cvxopt
#     Replacing directory env
pgkirsch commented 4 years ago

@bqpd the extra info is friendly! Is it supposed to have the lone Usage: line though?

I'm assuming that there isn't an easy way of simply not having the following blocks:

#     Calling 'mskexpopt'
##
### CALL BEGINS
/bin/sh: 1: mskexpopt: not found
### CALL ENDS
##

and

##
### CALL BEGINS
No filename given.
Usage:
### CALL ENDS
##
bqpd commented 4 years ago

I could remove them, but a major use of the build script is to debug when people email me install issues, and those are the actual "content" :-/

pgkirsch commented 4 years ago

Fair enough makes sense!