opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
759 stars 308 forks source link

Upgrade opensim-core to use later casadi #3700

Closed aymanhab closed 3 weeks ago

aymanhab commented 5 months ago

Older ipopt/casadi stack has two main side-effects:

  1. Can't build on Apple Silicon due to old code base of ipopt
  2. Can't make conda packages on either osx or linux because the code base is too old for the conda compilers/tools making jupyter notebooks impossible.
aymanhab commented 3 months ago

@chrisdembia If you have a minute to explain how you created the windows ipopt packaging on myosin I'd appreciate it. I can build the latest ipopt with simhody's lapack but the installation/layout is totally different from yours. This could be a change in ipopt that we need to accommodate now or something during build/configure that you did and we're not doing now. If you do remember any details about it would be very helpful. Thank you

chrisdembia commented 3 months ago

Myosin has ipopt?

chrisdembia commented 3 months ago

Are we talking about simbody's ipopt or casadi's ipopt? I thought they were different.

aymanhab commented 3 months ago

Thanks @chrisdembia for the quick response, I'm referring to this line https://github.com/opensim-org/opensim-core/blob/8b22c470eb96880f1003ea0df9abd6ab8d7f8214/dependencies/CMakeLists.txt#L277 which uses a custom build of ipopt you created on windows. I'm trying to reproduce this with the latest ipopt (as the old code doesn't compile with recent tools/conda and we want the same version on all platforms ipopt 3.14.14). I was wondering how you created the layout of the zip file and if there's a reason you used openblas rather than the blas that ship with simbody. As to ipopt, simbody absorbs/builds its own version so we're decoupled from it.

chrisdembia commented 3 months ago

Oof the day has come. I was really hoping that conda would have a good ipopt package by now for Windows. I wonder what the CasADi folks are doing nowadays for this.

nickbianco commented 3 months ago

CasADi's uses their own custom patch of a recent Ipopt release which is making things a bit more difficult here.

EDIT: CasADi's patch is not the issue here.

chrisdembia commented 3 months ago

Looks like conda-forge has binaries for ipopt built for msvc https://anaconda.org/conda-forge/ipopt/files

I think I originally used libopenblas because conda had it available and it should be faster than the reference implementation.