- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I originally built my TBB code on Windows and it worked fine. Today I moved my code to Linux system (OpenSUSE).
When I tried to run it, I got Segmentation fault. The TBB version I used is TBB21. I also checked where the probelm occured.
and I found it happened when it got to task::spawn_root_and_wait(tl) becuase I could get the cout information before that line and could not get the cout information after that line; The part of code is put below.
SolverP2 Improve(&inst,&mysolution,StartSolT1,&P1Queue,&P2Queue,&P3Queue,iterControl,exchangeControl,&stopControl );
task_list tl;
P2MainTask& a=*new(task::allocate_root()) P2MainTask(&Improve);
tl.push_back(a);
SolverP2T2 Thread2(&inst,&mysolution,StartSolT2,&P1Queue,&P2Queue,iterControl,exchangeControl,&stopControl );
P2Thread2Task& b=*new(task::allocate_root()) P2Thread2Task(&Thread2);
tl.push_back(b);
SolverP2T3 Thread3(&inst,&mysolution,StartSolT3,&P1Queue,&P3Queue,iterControl,exchangeControl,&stopControl );
P2Thread3Task& c=*new(task::allocate_root()) P2Thread3Task(&Thread3);
tl.push_back(c);
Shaking shakeSol(&inst,&mysolution,StartSolT4,&P4Queue,&stopControl );
ShakingTask& d=*new(task::allocate_root()) ShakingTask(&shakeSol);
tl.push_back(d);
cout<<"task deine finished"< task::spawn_root_and_wait(tl);
cout<<"task start finished"<
Could you tell me how to solve this problem? Thanks. In addition I ran a exampel TBB code on this Linux system. It worked.
In addition, after finish these tasks, how can we release the memory defined by new for resue? Thanks!
When I tried to run it, I got Segmentation fault. The TBB version I used is TBB21. I also checked where the probelm occured.
and I found it happened when it got to task::spawn_root_and_wait(tl) becuase I could get the cout information before that line and could not get the cout information after that line; The part of code is put below.
SolverP2 Improve(&inst,&mysolution,StartSolT1,&P1Queue,&P2Queue,&P3Queue,iterControl,exchangeControl,&stopControl );
task_list tl;
P2MainTask& a=*new(task::allocate_root()) P2MainTask(&Improve);
tl.push_back(a);
SolverP2T2 Thread2(&inst,&mysolution,StartSolT2,&P1Queue,&P2Queue,iterControl,exchangeControl,&stopControl );
P2Thread2Task& b=*new(task::allocate_root()) P2Thread2Task(&Thread2);
tl.push_back(b);
SolverP2T3 Thread3(&inst,&mysolution,StartSolT3,&P1Queue,&P3Queue,iterControl,exchangeControl,&stopControl );
P2Thread3Task& c=*new(task::allocate_root()) P2Thread3Task(&Thread3);
tl.push_back(c);
Shaking shakeSol(&inst,&mysolution,StartSolT4,&P4Queue,&stopControl );
ShakingTask& d=*new(task::allocate_root()) ShakingTask(&shakeSol);
tl.push_back(d);
cout<<"task deine finished"<
cout<<"task start finished"<
Could you tell me how to solve this problem? Thanks. In addition I ran a exampel TBB code on this Linux system. It worked.
In addition, after finish these tasks, how can we release the memory defined by new for resue? Thanks!
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for using the forum. Is it possible for you to share your sample code where you observed the problem? I'll try to run it here and report what I find and we can go from there. If in case you want to share code, please e-mail it to NOSPAMkrishna.ramkumar@intel.com (remove NOSPAM).
Best regards,
Krishna
Thanks for using the forum. Is it possible for you to share your sample code where you observed the problem? I'll try to run it here and report what I find and we can go from there. If in case you want to share code, please e-mail it to NOSPAMkrishna.ramkumar@intel.com (remove NOSPAM).
Best regards,
Krishna
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
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