Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore logging for OS other than Windows #167

Merged
merged 2 commits into from Aug 26, 2022

Conversation

NLaws
Copy link
Contributor

@NLaws NLaws commented May 18, 2022

and update control parameters for latest FICO Xpress release 8.14.0

@NLaws
Copy link
Contributor Author

NLaws commented May 18, 2022

addresses #166

@NLaws
Copy link
Contributor Author

NLaws commented May 18, 2022

@joaquimg I guess that a maintainer will have to run the tests in order to get the secret for the Xpress license?

@odow
Copy link
Member

odow commented May 18, 2022

I guess that a maintainer will have to run the tests in order to get the secret for the Xpress license?

Yes. Can you instead post a screenshot of the tests passing? And perhaps solving a model with logging?

@NLaws
Copy link
Contributor Author

NLaws commented May 20, 2022

Screen Shot 2022-05-20 at 10 14 58 AM

Screen Shot 2022-05-20 at 10 14 45 AM

Screen Shot 2022-05-20 at 10 14 33 AM

Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I'll wait for @joaquimg to check.

Copy link
Member

@joaquimg joaquimg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Did you test on linux?

if Sys.iswindows() && # is win
model.inner.logfile == "" && # no file -> screen
model.log_level != 0 # has log
if model.inner.logfile == "" && # no file -> screen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux also requires this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to FICO:

Prior to Xpress 8.9, the Optimizer library would automatically print messages to stdout for all Unix-like platforms
(including MacOS) if no message callback function was defined. With Xpress 8.9 and later, the Optimizer library will no longer print messages automatically for any platform.

To print the messages produced by the Optimizer, a user should set a message callback, using XPRSaddcbmessage():

https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/XPRSaddcbmessage.html

and provide it with a function that prints each message to stdout, as in the example provided in the link above.

Copy link
Contributor Author

@NLaws NLaws May 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you add:

os: [ubuntu-latest, windows-latest, macOS-latest]

to the CI? Then all major platforms will be tested automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux also requires this?

Short answer: yes.

@rafabench
Copy link
Collaborator

@joaquimg It's working on Xpress 8.11 on Linux too
image
image

@joaquimg joaquimg merged commit 5adbcc0 into jump-dev:master Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants