-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
importing problems with new C functions? #152
importing problems with new C functions? #152
Conversation
Hello. Delete build directory and try again? Seems to me that montecarlo_test_wrappers.pyx was not recompiled. I think this happens because montecarlo_test_wrappers.pyx does not know it depends on montecarlo.pyx and thus does not recompiles when montecarlo.pyx changes. |
Hello - hmmm no, I tried "nuking" the build directory
but then still get the same problem after first doing:
then
Is there possibly something odd about paths? |
@orbitfold I get the same problem on my mavericks 10.9 machine |
Hard to say why this happens. I don't own a Mac to test on. I don't have a similar issue on Linux. Symbol not found means that montecarlo_test_wrappers.so was not linked against anything containing compute_distance2electron which in this case is cmontecarlo.c. So the thing to check is if montecarlo_test_wrappers.pyx is linked against cmontecarlo.c. |
Yet actual Tardis simulation runs fine right? |
Nope. It's not importable. It crashes when I do 'from tardis import montecarlo' |
@ssim @orbitfold I've converted the issue into a PR and attached a fix that @orbitfold and I found. |
@orbitfold @ssim - ready for merge? |
I have not tried it out, but it passes ok so I'm happy for us to merge - I will then try it when I get some time? So @wkerzendorf do merge if you are happy. |
importing problems with new C functions?
Excellent - and I can now confirm that, at least on my local machine, the tests now pass. I will try a clean setup shortly. On 5 Jun 2014, at 16:52, Wolfgang Kerzendorf notifications@github.com wrote:
|
For the record - the problem was with how clang does inlining (well they claim it is the correct behavior). As can be read about here http://clang.llvm.org/compatibility.html#inline |
Hello
@orbitfold @wkerzendorf
I'm having trouble with import (this is with latest master branch of code):
This problem means that the test suite doesn't work for me just now. Since it's complaining about computedistance2electon, I wonder if it's something to do with having moved those functions to C? Any suggestions?