-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Use new context-based API for blosc benchmark to fix hanging #82
Conversation
…ich uses global state.
Yes, I can reproduce that in my Linux box. But as I said before, the '_ctx()' is not the 'new' API, and besides, your PR is breaking the test suite in TravisCI. This should be some artifact introduced after 1.5.0. @crspeller do you have some suggestion on this one? |
Tested with clang (3.3 and 3.5) and GCC (4.9.1) on Ubuntu 14.10 and all exposes the problem. |
I spoke too soon, perhaps, when I said these changes fixed the threading problem. After I submitted this PR, I realized I had only tried running the
|
I compiled the blosc benchmark program on multiple systems with varying hardware configurations and under both Windows and Linux; then I ran the
suite
benchmark, specifying various numbers for the thread count (based on the number of cores in a particular system). Each time, the program ran fine for 1 and 2 threads, then hung once it reached theCompression Level 0
step for 3 threads. Strangely, I was able to run thesingle
benchmark just fine for larger numbers of threads (e.g., 4).Out of curiosity, I modified the
bench
program so it used the new context-based APIs instead of the older "global" functions and the problem disappeared -- I'm able to run thesuite
benchmark without issue now. This PR includes the changes I made to the benchmark program to use the new context-based APIs.