Giter VIP home page Giter VIP logo

Comments (27)

tkelman avatar tkelman commented on July 17, 2024 7

Should be fixed in 0.5.1.

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024 3

It's because opensuse changed threading models. In my local testing it looks like JuliaLang/julia#20152 should fix this.

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024 3

should already work on nightly. I have a PR over at WinRPM that would do the dll replacement for you: JuliaPackaging/WinRPM.jl#97 you just might need to restart Julia.

If you copy all of the gcc dlls from winrpm and replace them in julia's bin folder yourself it should also work, see JuliaLang/julia#20152 (comment)

from ipopt.jl.

sylvaticus avatar sylvaticus commented on July 17, 2024 2

@davidanthoff I confirm that manually moving the dll worked (Win7/Julia 0.5).
In my case I did move all the dlls
from: C:\Users\[yourname]\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin
to: C:\Users\[yourname]\AppData\Local\Julia-0.5.0\bin
(it should be enought to move just the dll indicated by @tkelman in its JuliaLang/julia#20152 comment )

from ipopt.jl.

davidanthoff avatar davidanthoff commented on July 17, 2024 1

@tkelman I'm hesitant to try that WinRPM branch, I have very little time this semester and that branch replaces stuff in my julia folder, right? I don't want to risk messing up my system right now. I was, I guess, more generally hoping for a fix that "just works", i.e. some new tagged releases for all the involved packages where my students can just do Pkg.add("Ipopt") and be done... Obviously totally understand that this might not be trivial.

from ipopt.jl.

mlubin avatar mlubin commented on July 17, 2024

CC @abelsiqueira (the only change of substance between 0.2.5 and 0.2.6)

from ipopt.jl.

abelsiqueira avatar abelsiqueira commented on July 17, 2024

Hello @mdpradeep, can you show the tests on 0.2.5?

from ipopt.jl.

joaquimg avatar joaquimg commented on July 17, 2024

I had the same error installing a Ipopt.jl in a brand new Windows computed yesterday, (no problems in MAC, haven´t tested on linux)

However I updated my old computer´s Ipopt and it still worked.

@abelsiqueira I tested checking out a different version of Ipopt.jl to run the test and the result is the same above.

It does not seem to be a julia issue, because the (only) fix to the problem was copying the WinRPM deps (which include ipopt executable) from the old computed to the new one.

I think the issue is related to either WinRPM or the Ipopt executable.

from ipopt.jl.

mlubin avatar mlubin commented on July 17, 2024

CC @tkelman

from ipopt.jl.

mdpradeep avatar mdpradeep commented on July 17, 2024

Thanks @joaquimg. On my system earlier versions are failing as well. The earlier versions were working on the same system before. As you mentioned it might be a WinRPM issue.

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024

@mlubin I'm watching this repo, no need to ping specifically.

We should try turning up the print level in the ipopt options, and/or adding some debug output to the user-defined functions to see exactly where this is happening.

from ipopt.jl.

mdpradeep avatar mdpradeep commented on July 17, 2024

The parameter passed to the C call is:

prob = Ipopt.IpoptProblem(Ptr{Void} @0x0000000007271000,4,2,[1.0,5.0,5.0,1.0],[0
.0,0.0],[0.0,0.0],[0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0],0.0,0,eval_f,eval_g,eval_g
rad_f,eval_jac_g,eval_h,nothing,:Min)

The ccall made is:

ret = ccall((:IpoptSolve, libipopt),
    Cint, (Ptr{Void}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Any),
    prob.ref, prob.x, prob.g, final_objval, prob.mult_g, prob.mult_x_L, prob.mult_x_U, prob)

https://github.com/JuliaOpt/Ipopt.jl/blob/master/src/Ipopt.jl#L304
Let me know if you need any more information.

from ipopt.jl.

xximranxx avatar xximranxx commented on July 17, 2024

Just fyi, I also have the exact same issue on Windows 7, installed Ipopt today with newest julia release (0.5.0)

from ipopt.jl.

mlubin avatar mlubin commented on July 17, 2024

CCing @yuyichao @ihnorton @vtjnash who may have a better idea of what could cause the ReadOnlyMemoryError() from the ccall.

from ipopt.jl.

mlubin avatar mlubin commented on July 17, 2024

I've reproduced the issue locally on both Julia 0.4 and 0.5, so something has certainly changed in the WinRPM binaries.

from ipopt.jl.

xximranxx avatar xximranxx commented on July 17, 2024

Just bumping...
Is there any idea how I could at least temporarily get Ipopt to work?
I am on the verge of convincing my employer to adopt julia and I need to demonstrate Ipopt for this
Thanks for any help

from ipopt.jl.

mlubin avatar mlubin commented on July 17, 2024

The most effective solution at this point would be to contact Julia Computing for professional support, since they have the expertise to fix this issue.

from ipopt.jl.

ihnorton avatar ihnorton commented on July 17, 2024

stack trace:

image

happening in libstdc seems to indicate a library conflict.

from ipopt.jl.

tyleransom avatar tyleransom commented on July 17, 2024

@xximranxx If you only need to demonstrate something, you might consider using JuliaBox to run some simple examples. That's Linux-based, so there's no issue with Ipopt at the moment. (I am putting together a short demo for a class and just a moment ago was able to successfully run a simple maximum likelihood estimator on JuliaBox.)

Regarding the previous comment by @tkelman, is this opensuse issue going to be resolved in 0.6, or somewhere else?

from ipopt.jl.

davidanthoff avatar davidanthoff commented on July 17, 2024

Is there a plan to fix this for current julia 0.5 users? This is quite a serious issue, essentially Ipopt has not been working on Windows for two months now, right?

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024

try the branch at JuliaPackaging/WinRPM.jl#97

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024

The fix that just works is replacing Julia's gcc dll's. You can try the other way around but that's less likely to work.

from ipopt.jl.

davidanthoff avatar davidanthoff commented on July 17, 2024

Yeah, I fear that doesn't help me right now... I'm teaching a class using this and I know for sure that if I ask students to start replacing julia's gcc dlls I will just cause more problems ;) I guess it is juliabox for now.

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024

the point of JuliaPackaging/WinRPM.jl#97 is to do it automatically, if enough people test that and confirm whether it works.

0.5.1 should get the fix backported

from ipopt.jl.

tyleransom avatar tyleransom commented on July 17, 2024

I second @sylvaticus's procedure. Worked like a charm for me! (N.B. I copied the DLLs instead of moving them)

from ipopt.jl.

mlubin avatar mlubin commented on July 17, 2024

Thanks, @tkelman! I'll close this. If there are remaining problems, please open a new issue.

from ipopt.jl.

tkelman avatar tkelman commented on July 17, 2024

In case anyone else still hits this (as reported on discourse at https://discourse.julialang.org/t/readonlymemoryerror-using-ipopt-not-fixed-in-0-51/), WinRPM doesn't auto-upgrade existing installed binaries so you may need to run something like

using WinRPM
pkgs = String[]
for pkg in eachline(WinRPM.installedlist)
    name = match(Regex("$(WinRPM.OS_ARCH)-(.*)"), last(split(pkg)))
    if name !== nothing && !isempty(WinRPM.lookup(name[1]))
        push!(pkgs, name[1])
    end
end
WinRPM.install(pkgs)

to force it to download new copies.

from ipopt.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.