Re: [OMPI users] OMPI free() error

2011-03-18 Thread Jeff Squyres
Getting deeper into valgrind- and debugger-identified errors is somewhat 
outside the scope of this mailing list -- we're really here to talk about Open 
MPI-related things.

I suggest you read the valgrind documentation and/or google around for other 
memory debugging resources.

Good luck.


On Mar 18, 2011, at 2:07 AM, Jack Bryan wrote:

> Hi, 
> 
> I am running a C++ program with OMPI.
> I got error: 
> 
> *** glibc detected *** /nsga2b: free(): invalid next size (fast): 
> 0x01817a90 ***
> 
> I used GDB: 
> 
> === Backtrace: =
> Program received signal SIGABRT, Aborted.
> 0x0038b8830265 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x0038b8830265 in raise () from /lib64/libc.so.6
> #1  0x0038b8831d10 in abort () from /lib64/libc.so.6
> #2  0x0038b886a99b in __libc_message () from /lib64/libc.so.6
> #3  0x0038b887245f in _int_free () from /lib64/libc.so.6
> #4  0x0038b88728bb in free () from /lib64/libc.so.6
> #5  0x0044a4e3 in workerRunTask (message_to_master_type=0x38c06efe18, 
> nodeSize=2, myRank=1, xVSize=84, objSize=7, 
> xdata_to_workers_type=0x1206350, 
> recvXDataVec=std::vector of length 0, capacity 84, myNsga2=..., 
> Mpara_to_workers_type=0x1205390, events=0x7fffb1f0, netplan=...)
> at src/nsga2/workerRunTask.cpp:447
> #6  0x004514d9 in main (argc=1, argv=0x7fffcb48)
> at src/nsga2/main-parallel2.cpp:425
> -
> 
> In valgrind, 
> 
> there are some invalid read and write butno errors about this 
>  free(): invalid next size .
> 
> ---
> (populp.ind)->xreal   = new double[nreal];
>   (populp.ind)->obj   = new double[nobj];
>   (populp.ind)->constr= new double[ncon];
>   (populp.ind)->xbin  = new double[nbin];
>   if ((populp.ind)->xreal == NULL || (populp.ind)->obj == NULL || 
> (populp.ind)->constr == NULL || (populp.ind)->xbin == NULL )
>   {
>   #ifdef DEBUG_workerRunTask
>   cout << "In workerRunTask(), I am rank "<< myRank << " 
> (populp.ind)->xreal or (populp.ind)->obj or (populp.ind)->constr or 
> (populp.ind)->xbin is NULL .\n\n" << endl;  
>   #endif
>   }   
> 
> delete [] (populp.ind)->xreal ;
>   delete [] (populp.ind)->xbin ;
>   delete [] (populp.ind)->obj ;
>   delete [] (populp.ind)->constr ;
>   delete [] sendResultArrayPr;
> 
> 
> 
> thanks
> 
> Any help is really appreciated. 
> 
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] OMPI free() error

2011-03-18 Thread Ashley Pittman

On 18 Mar 2011, at 06:07, Jack Bryan wrote:

> Hi, 
> 
> I am running a C++ program with OMPI.
> I got error: 
> 
> *** glibc detected *** /nsga2b: free(): invalid next size (fast): 
> 0x01817a90 ***

This error indicates that when glibc tried to free some memory the internal 
data structures it uses were corrupt.

> In valgrind, 
> 
> there are some invalid read and write butno errors about this 
>  free(): invalid next size .

You need to fix the invalid write errors, the above error is almost certainly a 
symptom is these.

Ashley.

-- 

Ashley Pittman, Bath, UK.

Padb - A parallel job inspection tool for cluster computing
http://padb.pittman.org.uk




[OMPI users] OMPI free() error

2011-03-18 Thread Jack Bryan

Hi, 
I am running a C++ program with OMPI.I got error: 
*** glibc detected *** /nsga2b: free(): invalid next size (fast): 
0x01817a90 ***
I used GDB: 
=== Backtrace: =Program received signal SIGABRT, 
Aborted.0x0038b8830265 in raise () from /lib64/libc.so.6(gdb) bt#0  
0x0038b8830265 in raise () from /lib64/libc.so.6#1  0x0038b8831d10 in 
abort () from /lib64/libc.so.6#2  0x0038b886a99b in __libc_message () from 
/lib64/libc.so.6#3  0x0038b887245f in _int_free () from /lib64/libc.so.6#4  
0x0038b88728bb in free () from /lib64/libc.so.6#5  0x0044a4e3 in 
workerRunTask (message_to_master_type=0x38c06efe18, nodeSize=2, myRank=1, 
xVSize=84, objSize=7, xdata_to_workers_type=0x1206350, 
recvXDataVec=std::vector of length 0, capacity 84, myNsga2=..., 
Mpara_to_workers_type=0x1205390, events=0x7fffb1f0, netplan=...)at 
src/nsga2/workerRunTask.cpp:447#6  0x004514d9 in main (argc=1, 
argv=0x7fffcb48)at 
src/nsga2/main-parallel2.cpp:425-
In valgrind, 
there are some invalid read and write butno errors about this  free(): invalid 
next size .
---(populp.ind)->xreal  = new 
double[nreal];(populp.ind)->obj   = new double[nobj];   
  (populp.ind)->constr= new double[ncon]; (populp.ind)->xbin
  = new double[nbin]; if ((populp.ind)->xreal == NULL || 
(populp.ind)->obj == NULL || (populp.ind)->constr == NULL || (populp.ind)->xbin 
== NULL ){   #ifdef DEBUG_workerRunTask 
 cout << "In workerRunTask(), I am rank "<< myRank << " 
(populp.ind)->xreal or (populp.ind)->obj or (populp.ind)->constr or 
(populp.ind)->xbin is NULL .\n\n" << endl;   #endif  }  
 
delete [] (populp.ind)->xreal ; delete [] (populp.ind)->xbin ;  
delete [] (populp.ind)->obj ;   delete [] (populp.ind)->constr ;
delete [] sendResultArrayPr;

thanks
Any help is really appreciated.