Reversion when compiling Molcas

Ignacio Fernández Galván jellby@yahoo.com
Wed Sep 19 15:20:00 GMT 2007


--- Tobias Burnus <burnus@net-b.de> wrote:

> Could you tell us the options you are using? This would help us
> guessing what could go wrong.

I was using the optimization options that I had previously (with older
gfortran builds) determined to be good enough... I have run more tests
now, it fails with "-O1", but it's fine with the following instead:

"-fdefer-pop -fdelayed-branch -fguess-branch-probability
-fcprop-registers -fif-conversion -fif-conversion2 -fsplit-wide-types
-ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter
-ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time
-finline-small-functions -fmerge-constants -fomit-frame-pointer"

which, according to
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html is part of what
"-O1" does (maybe that's not up to date). It's also fine with "-O0".

> Could you additionally try the option -fno-strict-overflow and tell
> us whether this option helps?

I tried with "-O1 -fno-strict-overflow", it did fail as well.

> Otherwise, you could use the options -g -fbounds-check -fbacktrace
> and see whether you can get a glimpse of the backtrace. (The
backtrace
> might get hidden by the wrapper scripts, though.)

OK, I tried that, now I get this in the output:

===================================================
At line 14 of file initim.f
Fortran runtime error: Array reference out of bounds for array 'work',
upper bound of dimension 1 exceeded, 110103560 is greater than 8

Backtrace for this error:
  + function initim_ (0x8274C4D)
    at line 14 of file initim.f
  + function start_ (0x81C368D)
    at line 116 of file start.f
  + in the main program
    at line 8 of file main.f
  + /lib/i686/libc.so.6(__libc_start_main+0xdc) [0x40109d8c]
Command exited with non-zero status 2
===================================================

The subroutine in question (ititim) says (I've added [14] to mark the
14th line):

===================================================
      SubRoutine IniTim()
      Implicit Real*8 (a-h,o-z)
      Include 'WrkSpc.inc'
      Include 'timtra.inc'
      Include 'para_info.inc'
*
      if(nfld_tim.eq.0) return
      if(nfld_tim.gt.nfldmax) then
        write(6,*) 'Too many fields in IniTim:',nfld_tim
        call quit(20)
      end if
      Call GetMem('iGATim','Allo','Real',iGATim,nProcs*nfld_tim*2)
[14]  call Fzero(Work(iGATim),nProcs*nfld_tim*2)
      Return
      End
      SubRoutine IniStat()
      Implicit Real*8 (a-h,o-z)
      Include 'WrkSpc.inc'
      Include 'timtra.inc'
      Include 'para_info.inc'
*
      if(nfld_stat.eq.0) return
      if(nfld_stat.gt.nfldmax) then
        write(6,*) 'Too many fields in IniStat:',nfld_stat
        call quit(20)
      end if
      Call GetMem('iGAStat','Allo','Real',iGAStat,nProcs*nfld_stat)
      call Fzero(Work(iGAStat),nProcs*nfld_stat)
      Return
      End
===================================================

Now, before the call to GetMem, iGAStat is 0, but after that it's
110103560... I'll try to investigate further into GetMem.

Thanks


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 



More information about the Fortran mailing list