program runs until end of subroutine!

fatemeh.mirjani f_mirjani@ph.iut.ac.ir
Sun Jun 22 06:33:00 GMT 2008


Dear all;

I have envisaged a problem in my program and many a time I worked on
it but I couldn't find the mistake. When I call the subroutine, the
program runs until end of subroutine, but it cannot comes out of the
subroutine. (the next command after calling the subroutine in the main
program doesn't run.) you can see the error of run at below.
Have you ever seen this error?
I put the RETURN statement at the end of subroutine but it doesn't work yet.

this subroutine takes (filname,j,k,m,y) quantities and makes a file
that it's name is filname.  (filname is acharacter and j,k,m,y are
integer)
After that I should use this file in main program.


-----------------------------------------------------------------------
*** 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]
/lib/libc.so.6(__libc_start_main+0xc6)[0x9fdde6]
./wannier.exe[0x8049ec1]
======= Memory map: ========
009c7000-009e1000 r-xp 00000000 16:02 2548379    /lib/ld-2.3.5.so
009e1000-009e2000 r-xp 00019000 16:02 2548379    /lib/ld-2.3.5.so
009e2000-009e3000 rwxp 0001a000 16:02 2548379    /lib/ld-2.3.5.so
009e9000-00b0d000 r-xp 00000000 16:02 2548380    /lib/libc-2.3.5.so
00b0d000-00b0f000 r-xp 00124000 16:02 2548380    /lib/libc-2.3.5.so
00b0f000-00b11000 rwxp 00126000 16:02 2548380    /lib/libc-2.3.5.so
00b11000-00b13000 rwxp 00b11000 00:00 0
00b15000-00b37000 r-xp 00000000 16:02 2548381    /lib/libm-2.3.5.so
00b37000-00b38000 r-xp 00021000 16:02 2548381    /lib/libm-2.3.5.so
00b38000-00b39000 rwxp 00022000 16:02 2548381    /lib/libm-2.3.5.so
00b3b000-00b3d000 r-xp 00000000 16:02 2548382    /lib/libdl-2.3.5.so
00b3d000-00b3e000 r-xp 00001000 16:02 2548382    /lib/libdl-2.3.5.so
00b3e000-00b3f000 rwxp 00002000 16:02 2548382    /lib/libdl-2.3.5.so
00d65000-00d6e000 r-xp 00000000 16:02 2548384    /lib/
libgcc_s-4.0.0-20050520.so.1
00d6e000-00d6f000 rwxp 00009000 16:02 2548384    /lib/
libgcc_s-4.0.0-20050520.so.1
08048000-080f0000 r-xp 00000000 16:05 2029792    /home/mirjani/Fortran/
Mmn-inside/wannier.exe
080f0000-080f6000 rwxp 000a7000 16:05 2029792    /home/mirjani/Fortran/
Mmn-inside/wannier.exe
080f6000-080fd000 rwxp 080f6000 00:00 0
09155000-09176000 rwxp 09155000 00:00 0          [heap]
40000000-40001000 r-xp 40000000 00:00 0
40001000-40002000 rwxp 40001000 00:00 0
40026000-40028000 rwxp 40026000 00:00 0
40100000-40121000 rwxp 40100000 00:00 0
40121000-40200000 --xp 40121000 00:00 0
bffe1000-bfff6000 rwxp bffe1000 00:00 0          [stack]
forrtl: error (76): Abort trap signal
Image              PC        Routine            Line        Source
wannier.exe        080B7D23  Unknown               Unknown  Unknown
wannier.exe        080B7343  Unknown               Unknown  Unknown
wannier.exe        08072136  Unknown               Unknown  Unknown
wannier.exe        08052180  Unknown               Unknown  Unknown
wannier.exe        08053885  Unknown               Unknown  Unknown
.                  40000420  Unknown               Unknown  Unknown
libc.so.6          00A12948  Unknown               Unknown  Unknown
libc.so.6          00A4652A  Unknown               Unknown  Unknown
libc.so.6          00A4C424  Unknown               Unknown  Unknown
libc.so.6          00A4C95F  Unknown               Unknown  Unknown
wannier.exe        08061F33  Unknown               Unknown  Unknown
wannier.exe        0804E13D  Unknown               Unknown  Unknown
wannier.exe        0804F758  Unknown               Unknown  Unknown
wannier.exe        08049F81  Unknown               Unknown  Unknown
libc.so.6          009FDDE6  Unknown               Unknown  Unknown
wannier.exe        08049EC1  Unknown               Unknown  Unknown
-------------------------------------------------------------------------
Please let me know if there is anyone that has suggestion about this problem?
Thank you very much for your guidelines.
Kind regards,
Fatemeh

-- 
+------------------------------------------------------------------------------+
|Fatemeh Mirjani                              | Email: f_mirjani@ph.iut.ac.ir  |
|Computational Condensed Matter Research Lab. | Tel/Fax Office: +98311-3913746 |
|ICTP Affiliated Center in Isfahan,           | Tel Lab.: +98311-3913731       |
+----------Physics Department, Isfahan University of Technology, Iran----------+



More information about the Gcc-help mailing list