I've started parallelising a large application using a mixture of RCCE and POP-SHM, and I'm hitting deadlocks and other sorts of bugs.
Does anyone have tips as to useful ways to debug a RCCE application? E.g., is it possible to attach a debugger like gdb to one of the RCCE threads?
Thanks
Ally
What would be really useful would be a way to have the output printed by distinct cores go to different places. At the moment I get output which continually switches between cores. Is there any way to redirect such output?
Thanks
Ally
OK, I figured the latter one out: I can change rccerun to give pssh the -o <folder> argument, then it makes an output file for each core in the given folder.
A
On this thread http://communities.intel.com/thread/22876, check the reply of Ted where he describes how to use gdb.
Hi,
I know what you are looking for.
In "main.cpp" just create an ofstream object in this way:
#include <fstream>
using namespace std;
ofstream fout( "logfile.txt" );
Then you can put debug strings in your program simply writing
fout << "Debug string\n"; fout.flush();
This would create a different log file per each core. The log file will be automatically created in the root home directory on each core. After your program fails or complete successfully, you can see what happened logging into each core:
ssh root@rck03 less logfile.txt
and see where the program stopped.
I have used this method successfully to find a bug in the RCCE library, so I'm sure it works.
Regards,
Vincenzo
You could cross compile gdb and run RCCE Applications under gdb. I do most of my debugging in this manner.
The description I put in http://communities.intel.com/thread/22876 is basically what Keith explained to me a while back. The gdb download I pointed to is a cross-compiled version.
Dear all
Thank you for your various pointers - this has proved really useful. Sorry a) that I didn't find the posts elsewhere, and b) for taking so long to write this!
Ally

