On Sun, Jun 22, 2008 at 3:32 AM, fatemeh.mirjani <f_mirjani@xxxxxxxxxxxx> wrote: > I put the RETURN statement at the end of subroutine but it doesn't work yet. > ----------------------------------------------------------------------- > *** glibc detected *** ./wannier.exe: double free or corruption (out): > 0x09165a88 *** > ======= Backtrace: ========= > /lib/libc.so.6[0xa4c424] > /lib/libc.so.6(__libc_free+0x77)[0xa4c95f] > ./wannier.exe[0x8061f33] > ./wannier.exe[0x804e13d] > ./wannier.exe[0x804f758] > ./wannier.exe[0x8049f81] Looks like you have the issue right there. Your program is exiting for a reason. You obviously need to investigate how you are allocating and deleting memory in that function. corey