<div class="gmail_quote">On Wed, Jun 22, 2011 at 14:59, John Fettig <span dir="ltr"><<a href="mailto:john.fettig@gmail.com">john.fettig@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Wed, Jun 22, 2011 at 8:53 AM, Jed Brown <<a href="mailto:jed@59a2.org">jed@59a2.org</a>> wrote:<br>
> On Wed, Jun 22, 2011 at 14:43, John Fettig <<a href="mailto:john.fettig@gmail.com">john.fettig@gmail.com</a>> wrote:<br>
>><br>
>> I'm using mpich2-1.3.2p1 My screen version (which is hopefully not<br>
>> important) is 4.00.03.<br>
><br>
> Interesting. Which operating system? When some processes attach<br>
> successfully, what does the backtrace from gdb look like?<br>
<br>
</div></div>I'm using CentOS 5.6. Here's the backtrace from -np 2 (where only one<br>
gdb is launched):<br>
<br>
#0 0x000000310ee9a510 in __nanosleep_nocancel () from /lib64/libc.so.6<br>
#1 0x000000310ee9a364 in sleep () from /lib64/libc.so.6<br>
#2 0x00002b37a6601a83 in PetscSleep (s=10) at psleep.c:56<br>
#3 0x00002b37a5ef049b in PetscAttachDebugger () at adebug.c:410<br>
#4 0x00002b37a6302351 in PetscOptionsCheckInitial_Private () at init.c:392<br>
#5 0x00002b37a65cdeb6 in PetscInitialize (argc=0x7fff636a6d3c,<br>
args=0x7fff636a6d30, file=0x0, help=0x9f3d4d "") at pinit.c:639<br>
#6 0x0000000000409ac4 in main (argc=2, argv=0x7fff636a6ee8) at main.c:694</blockquote><div><br></div><div>Okay, this is the right place. Can you do a couple experiments:</div><div><br></div><div>$ cat > redirect.sh</div>
<div>#!/bin/sh</div><div><br></div><div>echo ppid=$PPID pwd=$PWD cmd="$@"</div><div>sleep 10</div><div>exec "$@"</div><div>$ chmod +x redirect.sh</div><div><br></div><div>Then show me the output of:</div>
<div><br></div><div>$ mpiexec -n 2 .... -debug_terminal "redirect.sh echo"</div><div><br></div><div>and</div><div><br></div><div>$ mpiexec -n 2 .... -debug_terminal "screen -X -S debug screen redirect.sh"</div>
<div><br></div><div>You should be able to see some output in the screen session before gdb is invoked.</div></div>