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

Revisit linkage with Python casadi for Windows wheels and move away from pybamm-team/casadi-vcpkg-registry #3603

Open
agriyakhetarpal opened this issue Dec 8, 2023 · 2 comments
Labels
feature priority: high To be resolved as soon as possible

Comments

@agriyakhetarpal
Copy link
Member

Please read through #3100 and #3193 for background discussion. This proposition is about getting back to linking against the Python-based CasADi distribution from PyPI when building the IDAKLU extension for the Windows wheels. We currently use a custom vcpkg registry at https://github.com/pybamm-team/casadi-vcpkg-registry/ for this reason, but further releases mean that the versions for casadi at build-time and that at run-time can sometimes run out of sync with each other due to lack of periodic updates to the repository, and might cause issues with the import of the IDAKLUSolver after importing PyBaMM such as the one introduced in the PyPI wheels for certain users where a serialisation error was introduced (#3193).

This would serve two purposes:

  1. Provide a more maintainable solution for building the Windows wheels, since the only vcpkg registry we would need to interface would be the one for SUNDIALS – which is needed because we require it to be built and distributed with KLU
  2. Use the same version for build-time and run-time dependencies which ensures a stable binary.

I have tried building the Windows wheels and used casadi==3.6.4 from PyPI for the linkage in a workflow run for my fork, but it resulted in an error where the libcasadi.lib file was requested but just casadi.lib exists in the casadi/ folder, this might be a mismatch from their end or some error in our configuration (see #3100 (comment))

@agriyakhetarpal
Copy link
Member Author

I have been reading about this a bit and one way is to set a filesystem registry instead of a Git registry. I haven't tried this locally yet. Another thing we can look into for the time being is to move both Git registries into one registry (one single repository) since even that would ease things up by a bit.

@jbuonagurio
Copy link

Hi, I just submitted PR microsoft/vcpkg#36885 which adds klu feature support to the vcpkg sundials port (as well as all of the other linear solvers + backends available in vcpkg). Hopefully I can get it merged without too much trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature priority: high To be resolved as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants