Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2006-12-11 10:01:46


On Dec 10, 2006, at 4:14 PM, Greg Watson wrote:

> (Tried to open a bug, but I don't seem to have access...)

Actually, you have an SVN account (right?), so you should be able to
login to trac (using your SVN username and password) and then open a
bug.

> Environment:
>
> Fedora Core 5 (actually I think any Linux will do)
> OMPI 1.2b1 (./configure --with-devel-headers)
>
> Symptom:
>
> MPI_Init(&argc, &argv) corrupts the argc variable.
>
> Repeat By:
>
> 1. Compile the following program using 'mpicc -g -o mpitest
> mpitest.c':
>
> #include <mpi.h>
>
> int main(int argc, char *argv[])
> {
> MPI_Init(&argc, &argv);
> MPI_Finalize();
> }
>
> 2. See corruption under gdb:
>
> $ gdb mpitest
> GNU gdb 6.5
> [snip]
> (gdb) b main
> Breakpoint 1 at 0x80485c5: file mpitest.c, line 6.
> (gdb) r
> Starting program: /home/greg/mpitest
> [Thread debugging using libthread_db enabled]
> [New Thread -1208936784 (LWP 11171)]
> [Switching to Thread -1208936784 (LWP 11171)]
>
> Breakpoint 1, main (argc=1, argv=0xbf81fae4) at mpitest.c:6
> 6 MPI_Init(&argc, &argv);
> (gdb) p argc
> $1 = 1
> (gdb) n
> 7 MPI_Finalize();
> (gdb) p argc
> Cannot access memory at address 0x0
> (gdb)

That's very odd. I don't see where this is happening in the code --
we literally never assign that value. Can you run this through
valgrind and see if there's something else going on?

-- 
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems