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

Working with external server #101

Open
aferragu opened this issue May 18, 2022 · 3 comments
Open

Working with external server #101

aferragu opened this issue May 18, 2022 · 3 comments

Comments

@aferragu
Copy link

I have some issues related to working with a remote Mosek server. In this case, the server is not the trial server (solve.mosek.com:30080) but a locally running container.

I work on Linux (Fedora 36) and Julia 1.7.2 trying the master branch of MosekTools.jl and Mosek.jl 1.2.2. My server listens in mosek://localhost:30080

First of all, the way that MosekTools handles remote servers is a bit confusing: you have to set the "fallback" parameter, which is a very bad name.

using MosekTools, JuMP
model = JuMP.Model(Mosek.Optimizer)
set_optimizer_attribute(model,"fallback","mosek://localhost:30080")
#....model stuff...
optimize!(model)
  • If Mosek.jl does not find a locally installed license then it connects to the server and solves the problem.
  • If Mosek.jl finds a local license, then it solves the problem locally.

I think this explains the name "fallback" in the sense that it only sends the problem to the remote server if there is no local license. However, I htink that this functionality is becoming more and more important in cloud deployments, so properly choosing a remote server (and providing an access token if needed) would be an interesting addition.

@ulfworsoe
Copy link
Contributor

I'll see if I can make it a configuration parameter so it select remote optimization as first priority.

In truth, the "fallback" was implemented mainly to allow the automated in tests to run on github.

@ulfworsoe
Copy link
Contributor

I think it is, in fact, already possible as it is. Please try to set the parameter "MSK_IPAR_REMOTE_OPTSERVER_HOST" to the full solver host (protocol, hostname, port). Mosek should recognize that from version 10.

@aferragu
Copy link
Author

Great! I'll try it when I find time to update to Mosek 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants