This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30285] gfortran excessive memory usage with large modules
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2007 11:09:51 -0000
- Subject: [Bug fortran/30285] gfortran excessive memory usage with large modules
- References: <bug-30285-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from anlauf at gmx dot de 2007-02-02 11:09 -------
> from what i see so far, the problem is in the .mod files, not in the reading of
> them. there are hundreds of thousands of 'commons' defined, which is silly.
This gave me the idea to the code below. Try compiling:
module mod0
implicit none
INCLUDE 'mpif.h'
private
public :: sub0
contains
subroutine sub0 ()
end subroutine sub0
end module mod0
module mod1
use mod0, only : sub0
implicit none
private
public :: sub1
contains
subroutine sub1 ()
end subroutine sub1
end module mod1
module mod2
use mod0, only : sub0
use mod1, only : sub1
implicit none
private
public :: sub2
contains
subroutine sub2 ()
end subroutine sub2
end module mod2
with mpif.h cut down to:
INTEGER MPI_BOTTOM
COMMON /MPIPRIV/ MPI_BOTTOM
and look at the module files. If you repeat the above,
the module files will explode.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30285