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

Support the new precompiled Ipopt with LBT #369

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

amontoison
Copy link
Contributor

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f66f888) 94.02% compared to head (8923b17) 94.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #369   +/-   ##
=======================================
  Coverage   94.02%   94.02%           
=======================================
  Files           4        4           
  Lines         921      921           
=======================================
  Hits          866      866           
  Misses         55       55           
Impacted Files Coverage Δ
src/Ipopt.jl 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@odow
Copy link
Member

odow commented Jun 7, 2023

Looks like an issue with spral:

In SpralSolverInterface::Factorization: Unhandled error. info.flag = -53.
Maybe one forgot to set environment variable OMP_CANCELLATION to TRUE.

I'd rather not need to set environment variables. have you tested spral? Perhaps we could just stick with mumps as the default?

@odow
Copy link
Member

odow commented Jun 7, 2023

Is this going to fix our Windows binary issue?

@amontoison
Copy link
Contributor Author

amontoison commented Jun 7, 2023

Looks like an issue with spral:

In SpralSolverInterface::Factorization: Unhandled error. info.flag = -53.
Maybe one forgot to set environment variable OMP_CANCELLATION to TRUE.

I'd rather not need to set environment variables. have you tested spral? Perhaps we could just stick with mumps as the default?

I thought that MUMPS was still the default linear solver:
coin-or/Ipopt#654 (comment)

The plan is to keep MUMPS as the default linear solver.
I can easily do a patch if it's needed but I opened a PR upstream:
https://github.com/coin-or/Ipopt/pull/677/files

SPRAL is working if we define the following environment variables before that we start Julia:

export OMP_CANCELLATION=TRUE
export OMP_NESTED=TRUE
export OMP_PROC_BIND=TRUE

but it's not user-friendly (ralna/spral#25 (comment)).

This new artifact is compiled with LBT and without some link flags that were not relevant so It could solve the issue with the binary on Windows.
This Ipopt_jll is also compiled with the optimization level -O3 so It should be faster than before.

@odow
Copy link
Member

odow commented Jun 7, 2023

I can easily do a patch if it's needed but I opened a PR upstream:

Seems like we could also set the solver ourselves inside Ipopt.jl?

@amontoison
Copy link
Contributor Author

amontoison commented Jun 7, 2023

Can we do that by default everytime that we create a JuMP model?

@odow
Copy link
Member

odow commented Jun 7, 2023

You could do it here in CreateIpoptProblem:

Ipopt.jl/src/C_wrapper.jl

Lines 274 to 292 in f66f888

prob = IpoptProblem(
ipopt_problem,
n,
m,
zeros(Float64, n),
zeros(Float64, m),
zeros(Float64, m),
zeros(Float64, n),
zeros(Float64, n),
0.0,
0,
eval_f,
eval_g,
eval_grad_f,
eval_jac_g,
eval_h,
nothing,
)
finalizer(FreeIpoptProblem, prob)

@amontoison
Copy link
Contributor Author

amontoison commented Jun 7, 2023

Stefan released Ipopt 3.14.13 this morning. MUMPS will be the default linear solver now if SPRAL is installed.

Project.toml Outdated Show resolved Hide resolved
@odow odow merged commit c5d1c16 into jump-dev:master Jun 7, 2023
11 checks passed
@amontoison amontoison deleted the ipopt_jll_lbt branch June 7, 2023 21:33
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

2 participants