- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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 copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I think if you follow your printfs with fflush(0);, it should display the message before moving on.
I hope this helps.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora