Hi, 
I am running a C++ program with OMPI.I got error: 
*** glibc detected *** /nsga2b: free(): invalid next size (fast): 
0x0000000001817a90 ***
I used GDB: 
======= Backtrace: =========Program received signal SIGABRT, 
Aborted.0x00000038b8830265 in raise () from /lib64/libc.so.6(gdb) bt#0  
0x00000038b8830265 in raise () from /lib64/libc.so.6#1  0x00000038b8831d10 in 
abort () from /lib64/libc.so.6#2  0x00000038b886a99b in __libc_message () from 
/lib64/libc.so.6#3  0x00000038b887245f in _int_free () from /lib64/libc.so.6#4  
0x00000038b88728bb in free () from /lib64/libc.so.6#5  0x000000000044a4e3 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=0x7fffffffb1f0, netplan=...)    at 
src/nsga2/workerRunTask.cpp:447#6  0x00000000004514d9 in main (argc=1, 
argv=0x7fffffffcb48)    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. 
                                          

Reply via email to