Actually, I don't see it printing "We're an MPI program!" under gdb,
which means it isn't working.

Geoffrey

On Thu, Feb 21, 2013 at 4:07 PM, Ralph Castain <r...@open-mpi.org> wrote:
> Hmmm...works with 1.6.4 for me on Mac 10.8.2:
>
> Ralphs-iMac:v1.6 rhc$ ./fork-bug
> We're an MPI program!
> child status = 0
> Ralphs-iMac:v1.6 rhc$ gdb ./fork-bug
> GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 
> 2012)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared 
> libraries ... done
>
> (gdb) r
> Starting program: /Volumes/RHCHD/rhc/openmpi/v1.6/fork-bug
> Reading symbols for shared libraries ++............................. done
> child status = 0
>
> Program exited normally.
> (gdb)
>
> Afraid I have no idea why you might be hitting the problem, though...
>
>
> On Feb 21, 2013, at 3:50 PM, Geoffrey Irving <irv...@naml.us> wrote:
>
>> The singleton fork/exec itself is fine, since normal MPI programs work
>> under gdb (e.g., fork-bug.c without the fork).  gdb is has
>> follow-fork-mode set to parent, so it's odd that gdb is looking at the
>> child process's trickery at all.
>>
>> I've confirmed that it's still broken under 1.6.4, unfortunately.
>>
>> Geoffrey
>>
>> On Thu, Feb 21, 2013 at 3:36 PM, Ralph Castain <r...@open-mpi.org> wrote:
>>> Singletons fork/exec a daemon to support them - my guess is that gdb may 
>>> not like it on your machine?
>>>
>>> FWIW - it runs fine for me using the developer's trunk. You might try with 
>>> 1.6.4 in case it's a bug in 1.6.0
>>>
>>>
>>> On Feb 21, 2013, at 3:18 PM, Geoffrey Irving <irv...@naml.us> wrote:
>>>
>>>> The attached program illustrates the problem.  It forks, and the child
>>>> calls MPI_Init.  This works fine unless I'm inside gdb.  Inside gdb,
>>>> MPI_Init silently crashes.
>>>>
>>>> I'm using OpenMPI 1.6.0 on Mac 10.8.2.  I'm running the program
>>>> directly, not through mpirun.
>>>>
>>>> Any ideas what might be wrong?
>>>>
>>>> Thanks,
>>>> Geoffrey
>>>>
>>>> cone:scratch% /usr/local/bin/mpicc -o fork-bug fork-bug.c
>>>> cone:scratch% ./fork-bug
>>>> We're an MPI program!
>>>> child status = 0
>>>> cone:scratch% gdb ./fork-bug
>>>> gdb ./fork-bug
>>>> GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Thu Nov 15 10:42:43 UTC 
>>>> 2012)
>>>> Copyright 2004 Free Software Foundation, Inc.
>>>> GDB is free software, covered by the GNU General Public License, and you 
>>>> are
>>>> welcome to change it and/or distribute copies of it under certain 
>>>> conditions.
>>>> Type "show copying" to see the conditions.
>>>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>>>> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
>>>> shared libraries ... done
>>>>
>>>> (gdb) run
>>>> Reading symbols for shared libraries ++............................. done
>>>> child status = 5
>>>>
>>>> Program exited normally.
>>>> (gdb) cone:scratch%
>>>> <fork-bug.c>_______________________________________________
>>>> users mailing list
>>>> us...@open-mpi.org
>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> us...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users

Reply via email to