- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Quick question. I have different builds for the same code.
- When I run the code on Xeon processor or any other ordinary one, there is no problem.
- However, when I run it on Xeon Phi using native execution I get a segmentation fault.
I am trying to hunt these errors. But, it seems to me that, when I call printf on corprocessor, message is not displayed immediately like on processor. Code actually executes a little bit more before I can print something on screen. This makes it almost impossible for me to solve this.
Does anyone know how to work around this? Or know of any techniques to deal with this?
Answers, pointers, questions they are all welcome as always. Thanks in advance.
Regards
Matara Ma
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think if you follow your printfs with fflush(0);, it should display the message before moving on.
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use Intel provided debugger to debug your application. More details: http://software.intel.com/en-us/articles/debugging-on-intel-xeon-phi-coprocessor-use-case-overview
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Putting fflush(0); just after printf works.
Oddly enough when using fflush(0) code works without any problem on native mode... Well at least I can get perform a debug now.
Thanks a lot for your lightning answer.
Matara Ma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that segment faults due to coding errors can be caught using the native version of gdb provided with the MPSS drivers. The only exception to this is segment faults due to exceeding coprocessor memory - gdb gets killed too in this case.
Charles
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page