-
Notifications
You must be signed in to change notification settings - Fork 23
Use pycompilation if installed. #109
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
base: master
Are you sure you want to change the base?
Conversation
|
The pycompilation caching seems to work. On the problem in https://github.com/brocksam/muscle-driven-bicycle-paper if I run the optimal control script twice in a row, the second run takes no time for the compilation step taking total time to instantiate the problem from 180 seconds to 54 seconds (approximately). I did notice that if I open IPython and run the script twice in a row that the cached compilation did not seem to load (always took 180 seconds to complete). Not sure why. |
|
To clarify: shows the speed up on the second run but: didn't. |
|
Bjorn pointed out to me that a version of pycompilation is in sympy/utilities/_compilation. I have it working but I don't know if it caches the compiled code. |
|
In the sympy version the |
|
SymPy includes pycompilation (private modules), so we could just use it from SymPy instead of the standalone package. |
|
The SymPy _compilation code states it isn't tested on windows and mac, so that would need to be addressed in SymPy before we add compatibility. |
|
On ubuntu: |
|
On mac intel: |
|
On mac arm: |
|
On windows many compile errors: |
|
Windows fails with: it is trying to run gcc via mingw |
|
On mac with clang the if self.run_linker:
# both gnu and intel compilers use '-c' for disabling linker
self.flags = list(filter(lambda x: x != '-c', self.flags))
else:
if '-c' not in self.flags:
self.flags.append('-c') |
|
The preferred_vendor is picked up from env var SYMPY_COMPILER_VENDOR or set to gnu. The options are intel, llvm, gnu. |
No description provided.