On linux x86,  with -m32 or -m64,
gfortran 4.4.0 exhausts over 2GB of swap space compiling the attached source
file
at -O3.    In contrast 4.1.2 compiles unexceptionally.      This might be
expected behavior of 4.4.0 due to some new laborious optimization, which
would terminate eventually with enough RAM/swap, or it might just
be spinning its wheels pointlessly.    

To reproduce from attached files, substantially condensed from SPEC MPI 2007
127.wrf2:

/bin/rm -f *.o *.mod
gfortran -c bigmod.f90
gfortran -c shift_domain_em.f90 -O3
f951: out of memory allocating 239668920 bytes after a total of 3520262144
bytes


Compile times:

        4.1.2       4.4.0
-O2:     
real    1m19.827s   real    2m58.945s
user    1m14.541s   user    2m44.450s
sys     0m1.668s    sys     0m3.140s

-O3:
real    1m30.645s   real   10m5.166s
user    1m25.613s   user   8m39.388s
sys     0m1.492s    sys     0m7.632s





Verbose expansion of failing compile:

/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/bin/gfortran
--verbose -c shift_domain_em.f90 -O3
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with:
/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/gcc-4.4.0/configure
--prefix=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local
--exec-prefix=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local
--enable-languages=c++,fortran
--with-gmp-include=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/include
--with-mpfr-include=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/include
--with-gmp-lib=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib64
--with-mpfr-lib=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib64
Thread model: posix
gcc version 4.4.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-O3' '-mtune=generic'
/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/f951
shift_domain_em.f90 -quiet -dumpbase shift_domain_em.f90 -mtune=generic
-auxbase shift_domain_em -O3 -version -fintrinsic-modules-path
/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude
-o /tmp/ccBfbVaD.s
GNU Fortran (GCC) version 4.4.0 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0, GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

f951: out of memory allocating 239668920 bytes after a total of 3520262144
bytes



Verbose expansion of correspond successful compile:

/usr/bin/gfortran --verbose -c shift_domain_em.f90 -O3
Using built-in specs.
Target: x86_64-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-libgcj-multifile
--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.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/f951 shift_domain_em.f90 -quiet
-dumpbase shift_domain_em.f90 -mtune=generic -auxbase shift_domain_em -O3
-version -I /usr/lib/gcc/x86_64-redhat-linux/4.1.2/finclude -o /tmp/cc0MGeZy.s
GNU F95 version 4.1.2 20070626 (Red Hat 4.1.2-14) (x86_64-redhat-linux)
        compiled by GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as -V -Qy -o shift_domain_em.o /tmp/cc0MGeZy.s
GNU assembler version 2.17.50.0.6-5.el5 (x86_64-redhat-linux) using BFD version
2.17.50.0.6-5.el5 20061020


-- 
           Summary: gfortran 4.4.0 -O3 exhausts memory in 127.wrf2
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dh458 at oakapple dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40773

Reply via email to