- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The following code produces seg fault with v2.0 and v2.1 of TBB on "Linux office.iiita.ac.in 2.6.27-desktop-0.rc8.2mnb #1 SMP i686 Intel Core2 CPU 4400 @ 2.00GHz GNU/Linux" with 1 GB RAM. I am unable to find the fix or source of the problem. Help please!
The following code produces seg fault with v2.0 and v2.1 of TBB on "Linux office.iiita.ac.in 2.6.27-desktop-0.rc8.2mnb #1 SMP i686 Intel Core2 CPU 4400 @ 2.00GHz GNU/Linux" with 1 GB RAM. I am unable to find the fix or source of the problem. Help please!
[cpp]#include#include #include #define N 400 using namespace std; using namespace tbb; void SortExample(float *a) { for( int i = 0; i < N; i++ ) { a = (float) rand() / RAND_MAX; } parallel_sort(a, a + N - 10); } int main() { float *a = (float *) malloc(N * sizeof(float)); SortExample(a); for (int i=0; i<25; i++) { printf("%12.9fn", a); } return 0; } [/cpp]
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You did not activate TBB worker threads.
See the TBB Tutorial for how to do that, or search the forum for "task_scheduler_init".
See the TBB Tutorial for how to do that, or search the forum for "task_scheduler_init".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Alexey Kukanov (Intel)
You did not activate TBB worker threads.
See the TBB Tutorial for how to do that, or search the forum for "task_scheduler_init".
See the TBB Tutorial for how to do that, or search the forum for "task_scheduler_init".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are interested in parallel sorting the Threading Challenge has recently completed using the RadixSort method. I haven't looked at all the entries, one of them is likely using TBB. Even for non-TBB entries it may be a good place to find a good (simple) parallel sort technique.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page