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

Issue parsing Ipopt_jll string option when there is blank space in path #10540

Closed
KSepetanc opened this issue Feb 15, 2025 · 11 comments
Closed

Comments

@KSepetanc
Copy link

KSepetanc commented Feb 15, 2025

hsllib attribute of Ipopt_jll does not load correctly when there is blank space in path. For example, if folder is named "test 2" if fails with an error, but if folder is named "test2" then it works as expected. Sample of a call is illustrated below.

set_optimizer(pol, () -> AmplNLWriter.Optimizer(Ipopt_jll.amplexe))
set_attribute(pol, "linear_solver", "ma27")
set_attribute(pol, "hsllib", joinpath(@__DIR__,"../HSL/libhsl.so"))
optimize!(pol)

Log:

Ipopt 3.14.17: hsllib=/home/karlo/Desktop/test
Unknown keyword "2/sa/../HSL/libhsl.so"
linear_solver=ma27

Run using Julia 1.11.3 and Linux.

@giordano
Copy link
Member

Could you please share an actual error message, including a stacktrace, showing an evidence that whatever error you're observing has anything to do with this repository?

@KSepetanc
Copy link
Author

KSepetanc commented Feb 15, 2025

Thank you for your quick reply.

There is no error message at all. The run just stops after writing the above log. I have no such issue with Ipopt.jl or NLPModelsIpopt.jl, just with Ipopt_jll.jl

Ipopt_jll redirects to write issues here so I wrote it here. Seems useful to support any path.

@giordano
Copy link
Member

My point is that JLLs do very little. I doubt whatever issue you're seeing will have to be fixed here. The code you have shared isn't even reproducible.

@giordano
Copy link
Member

Closing the issue as invalid:

  • code provided is incomplete (I don't even know what packages you're using)
  • there's no evidence at all whatever problem you experience has anything to do with this repository
  • I find it extremely unlikely whatever problem is there will have to be fixed here.

@giordano giordano closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2025
@KSepetanc
Copy link
Author

KSepetanc commented Feb 15, 2025

@giordano can you please help me find the issue or direct me who should I contact?

I am providing complete code as requested.

using JuMP, AmplNLWriter, Ipopt_jll


mod = Model(() -> AmplNLWriter.Optimizer(Ipopt_jll.amplexe))
set_attribute(mod, "linear_solver", "ma27")
set_attribute(mod, "hsllib", joinpath(@__DIR__,"libhsl.so"))
optimize!(mod)

Unknown keyword only appears if located in path with blank space. (Update: Attached mwe was removed due to containing binnary)

@giordano
Copy link
Member

Any way to reproduce it which doesn't involve loading a binary blob I have no clue where it's coming from?

can you please help me find the issue or direct me who should I contact?

Where's the message you're complaining about coming from? The optimize!(mod) line? Where's the otimize! method you're using coming from? That'd be a half decent guess of the responsible of quoting arguments correctly.

@KSepetanc
Copy link
Author

KSepetanc commented Feb 15, 2025

I changed the example so that it does not use binary. Just put it in some location with space.

using JuMP, AmplNLWriter, Ipopt_jll

mod = Model(() -> AmplNLWriter.Optimizer(Ipopt_jll.amplexe))
set_attribute(mod, "output_file", joinpath(@__DIR__,"output.txt"))
optimize!(mod)

Yes. It is coming from optimize!(mod), but it is only occurring when I use Ipopt_jll solver. If you suggest that I will open an issue there (JuMP) too, I will.

@giordano
Copy link
Member

giordano commented Feb 15, 2025

but it is only occurring when I use Ipopt_jll solver

I still don't see how that's relevant at all. Your problem seems to be that some code is not quoting paths correctly. In this repository we only compile from source and provide a way to automatically install it for end users. Stop. You should find what piece of code is not quoting paths correctly and fix it, we aren't responsible for that here.

If you suggest that I will open an issue there (JuMP) too, I will.

If optimize!(mod) is a JuMP method that sounds potentially like a JuMP issue then. Alerting @odow, but again, this issue has extremely likely nothing to do with Yggdrasil, unless someone brings clear evidences that we are packaging external libraries incorrectly.

@KSepetanc
Copy link
Author

KSepetanc commented Feb 15, 2025

OK. Thank you. I will look for help on Discourse. Maybe they will know where to put this issue.

Discourse topic

@odow
Copy link
Contributor

odow commented Feb 15, 2025

Just chiming in to say that this is not related to Yggdrasil. (It would have replied earlier but it's only 07:00 on a Sunday... 😄)

@KSepetanc
Copy link
Author

Thank you all. Sorry for putting this on wrong package. I made wrong judgment. Have a few more issues to post in coming days 😅

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

No branches or pull requests

3 participants