Re: gfortran problem



On Mar 31, 10:05 pm, Tobias Burnus <bur...@xxxxxxxx> wrote:
On Mar 31, 6:52 pm, rudra <bnrj.ru...@xxxxxxxxx> wrote:

*** glibc detected *** /matsc/students/Rudra/Recursion/Real/run.out:
double free or corruption (out): 0xb7f79008 ***
[...]
#6 0x0024e0c1 in _gfortran_internal_free () from /usr/lib/
libgfortran.so.1
#7 0x0804a075 in coefficient_ (istart=@0xbf8b1eb4, lorbit=@0xbf8b1eac,
nrec=@0xbf8b1ea8, nsite=@0xbf8b1efc,
nmax=@0xbf8b1eb0, nn=@0xbf8b1ef8, cmat=0xbf8b1e50, dmat=0xbf8b1e08) at
coeff.f90:5
#8 0x0804af1b in MAIN__ () at main.f90:64
#9 0x0804af47 in main ()
(gdb)

can anybody tell me whats wrong? gfortran is working well elsewhere

Not without further information such as knowing how "coefficient" in
coeff.f90 looks like. If you use POINTER then it could well be a
programming error, if not it could be a gfortran bug.

Regarding the latter, it would like to know the system (target) and
the version of gfortran (run: gfortran -v).

Additionally, if you have "valgrind", run you program in valigrind.
This provides often a better clue where things go wrong. Sometimes
things go wrong but surface never or only much later. Run also the
ifort program in "valgrind", even though it does not crash it could
well have the same problem.

Tobias

its not a pointer, just an array.
and this is output of gfortran -v:
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --
disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c+
+,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-
plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --
enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/
usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=i386-redhat-
linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
.



Relevant Pages

  • Re: Several questions about character C binding
    ... but that's not what gfortran is doing. ... dummy argument is a POINTER. ... but I also want to point out that your program is not legal Fortran ... the actual argument shall be associated with a target and the ...
    (comp.lang.fortran)
  • Re: Several questions about character C binding
    ... dummy argument is a POINTER. ... I agree that the behavior of gfortran and ifort is inconsistent here, ... the actual argument shall be associated with a target and the ... Intel Fortran Support ...
    (comp.lang.fortran)
  • Re: removing chars from c strings
    ... character:: ch, a) ... integer:: nc, sloc; pointer ... I wanted to see if gfortran's Cray pointer feature ... pointer variable is with gfortran. ...
    (comp.lang.fortran)
  • Re: gfortran problem
    ... can anybody tell me whats wrong? ... Not without further information such as knowing how "coefficient" in ... if not it could be a gfortran bug. ... Additionally, if you have "valgrind", run you program in valigrind. ...
    (comp.lang.fortran)