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

Windows Compilation #14

Open
wcxily opened this issue May 21, 2024 · 3 comments
Open

Windows Compilation #14

wcxily opened this issue May 21, 2024 · 3 comments

Comments

@wcxily
Copy link

wcxily commented May 21, 2024

Dear Author:
I have a problem in compilation. I have install gcc and g++, but when I run Python Code, something happened
23dcd4062f6741d55f23d0c86ad8d07

@wcxily
Copy link
Author

wcxily commented May 21, 2024

Dear Author:
I also have another question about running speed of ALPAQA. I'm using the python version of the ALPAQA(.build, not .compile), and I haven‘t tired C++ version. So which is faster, the C++ version 、the python version(.build), or the python version(.compile)? Looking forward to your reply.

@tttapa
Copy link
Collaborator

tttapa commented May 21, 2024

Hello,

On Windows, alpaqa requires Microsoft Visual Studio for the compilation of CasADi problems. The C code is compiled by invoking cmake -B build -S /folder/containing/generated/code -A x64 (where the final argument depends on whether you're running a 32-bit or 64-bit version of Python. There is currently no way to use your own CMake generator, but I may decide to add this in the future.

If you install Visual Studio now, you may have to clear the CMake cache first: alpaqa cache clean --cmake (https://kul-optec.github.io/alpaqa/Sphinx/usage/tips-and-tricks.html#compilation-and-caching)

In my experience, the Python .compile version is usually 2 to 5 times faster than the Python .build version.
The C++ version of alpaqa allows many different types of problem implementations, so it's hard to say in general how it will compare, it'll depend on your specific implementation.

@wcxily
Copy link
Author

wcxily commented Jun 9, 2024

Ok, thank you very much:)

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

2 participants