On Mon, Jan 08, 2007 at 03:07:57PM -0500, Jeff Squyres wrote: > if you're running in an ssh environment, you generally have 2 choices to > attach serial debuggers: > > 1. Put a loop in your app that pauses until you can attach a > debugger. Perhaps something like this: > > { int i = 0; printf("pid %d ready\n", getpid()); while (0 == i) sleep > (5); } > > Kludgey and horrible, but it works. > > 2. mpirun an xterm with gdb.
If one of the participating hosts is the localhost and it's sufficient to debug only one process, it's even possible to call gdb directly: adi@ipc654~$ mpirun -np 2 -host ipc654,dana \ sh -c 'if [[ $(hostname) == "ipc654" ]]; then gdb test/vm/ring; \ else test/vm/ring ; fi ' (also works great with ddd). -- Cluster and Metacomputing Working Group Friedrich-Schiller-Universität Jena, Germany private: http://adi.thur.de