-
Notifications
You must be signed in to change notification settings - Fork 57
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
Library issue #1
Comments
I guess we needed a sparse linear algebra library. It should work now if you wipe |
Cool, now it just segfaults - progress! |
@IainNZ how did you end up fixing this? I'm havingthe same problem. What |
I guess it was the |
@joehuchette: you'll definitely need gfortran installed to compile Ipopt with its dependencies |
Yeah I do, looks like it's an issue with the Homebrew version of Ipopt, not with Julia |
Okay now I see staticfloat/homebrew-juliadeps#9 - you'll want to bump Ipopt to 3.11.7 like Miles just did for Linux, there were bug fixes for Mavericks due to the clang C++ standard library change that aren't in 3.11.5. |
That's good to know, but something else seems to be causing a segfault. Looks like an OpenBLAS issue |
Can you run Ipopt's test examples outside of Julia? If it's only segfaulting when running from Julia, then this is probably related to issues that I've debugged to death with the Matlab interface to Ipopt. Matlab (and presumably Julia too when you're using OpenBlas) uses ILP64 BLAS on 64-bit machines. Ipopt and most system BLAS libraries are LP64. If Julia's BLAS and the Ipopt library are both loaded into the same address space, there can be some cross-talk and bad things can happen when integers are the wrong size. Can you post some of what the segfault's outputting, as much of a backtrace as you can get? If this is what's happening, then it might be easier to statically link the reference BLAS (or some other static-lib LP64 BLAS, ATLAS might work too?) into the Ipopt shared library and live with the slight performance loss compared to OpenBlas. That's what I did with the Ipopt Matlab interface, and for sparse problems the choice of BLAS isn't that big a deal. The multifrontal block reductions in Mumps/MA57 are rarely big enough for OpenBlas to outperform Netlib by enough of a margin to be worth the hassle of messing with Julia/OpenBlas compilation options like |
|
@tkelman: that's a good point. Perhaps we can make a configure flag for Ipopt to use ILP64 for blas/lapack. |
@joehuchette Yep, exactly what I thought it was. See https://projects.coin-or.org/Ipopt/browser/releases/3.11.4/Ipopt/src/LinAlg/IpBlas.cpp#L111 for definition of @mlubin Yes we should look into this, but I don't think it will be an easy change. It would take quite a bit of digging to find everywhere that I don't think anyone has tried hacking at this one, at least not AFAIK. The easiest solution is statically linking BLAS and LAPACK into the Ipopt shared library, but for obvious reasons that's not good enough to be a permanent fix. |
With @joehuchette here. Ipopt depends on vecLib, not openblas, so I'm not sure why openblas is being called. How do you go about statically linking the reference blas? |
Name shadowing on
Easiest way is configuring Ipopt To get a shared Ipopt library statically linked to reference blas, try something like
|
Should add a test that uses |
Hmm I tried this, and it still chokes on an openblas call. |
What do |
|
Can you clear out |
Here you go: Thanks for helping to debug, BTW. |
It's reusing libtool from the (previous) Ipopt configure when building Blas and Lapack, so not obeying Just to be sure, let's use a separate build folder, and also be a little more explicit about wanting static libs:
Then let me know what |
I run
and get
|
I think we're in business then, does that a) succeed at Ipopt's You shouldn't need to worry about You also shouldn't need to configure or build Mumps separately, just download its source code with |
The unit tests are choking on a missing symbol in Mumps:
|
Damn, the unit tests ran in Linux but apparently not on Mac. I'll fire up my Mac VM and let you know what I figure out. Might involve building Mumps statically too, like you did but telling Ipopt about it a la |
Can reproduce, more or less, with Ipopt 3.11.4. Please update to Ipopt 3.11.7. Used this build script, essentially identical to this #1 (comment) |
Wow, looks like this works! Thanks so much! |
Nice! Just need to update the homebrew script now. |
I have a fixed version of the BinDeps SimpleBuild, but didn't do the homebrew script. |
The text was updated successfully, but these errors were encountered: