-
Notifications
You must be signed in to change notification settings - Fork 216
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
Race condition in weave_rt? #463
Comments
Thanks for looking into this! I've used multiple processes with weave successfully in the past (on Windows) but I think this was probably only using read access to the catalog file. I was generally writing and testing my code on a single process and then doing big runs on multiple processes, so I guess the code was already compiled when I ran the multiple process versions so I never saw this problem. Unless maybe Windows works differently somehow. |
For now I'm switching to |
OK, if you can switch to Cython and the issue doesn't arise there that sounds like a reasonable interim solution. @mstimberg is away at the moment, he might have some ideas when he gets back. |
This a known limitation of weave, its database is not built for concurrent access. In principle it could work to make weave use different directories for different process (by setting the |
Many thanks! I'll stick to |
Weave no longer supported, so closing this. |
Hey brian2 team,
I sent an email to the brian2 mailing list about the following warning I'd been getting:
It turns out this is pointing to a more serious issue than we originally thought (I think). In addition to these warnings, I'm now getting occasional uncaught
SyntaxError
s. All of the errors originate in calls toweave.inline
inbrian2/codegen/runtime/weave_rt/weave_rt.py
.I've dug into the
scipy
source code (version 0.15.1), and it appears that calls toinline
make use of a set of cache files, which for me have the following paths:My errors and warnings seem to occur when multiple simultaneous
brian2
simulations try to read from and write to these cache files at the same time. Simultaneous writing introduces syntax errors -- i.e., each line is no longer valid python code -- and subsequent reading, followed by an attempted evaluation of the python code, raises the errors.I'm not sure whether this is a problem for
brian2
, a problem forscipy
, or a problem for me. I suppose what is needed is for use of these cache files to be circumvented. (But wouldn't this come with a speed penalty?)The text was updated successfully, but these errors were encountered: