[fortran,patch] Don't write common more than once in a module file (PR 30285)
Jerry DeLisle
jvdelisle@verizon.net
Mon Nov 12 10:46:00 GMT 2007
FX Coudert wrote:
> PR 30285 is about deeply nested module files containing commons, which
> take a huge amount of memory when they're read back (and loads of disk
> space, but that's not so much of a problem). This commonly happens with
> MPICH and openmpi, and leads some people to run out of memory when
> compiling mpi-enabled programs.
>
> The problem is that we write each common name more than once (a number
> of times that grows exponentially with the nesting). I tried to change
> the way we load modules, to avoid creating these duplicate symbols, but
> the diagnostics code for commons with binding labels requires this
> creation of multiple symbols, so I went for something that is a bit of a
> hack: we get rid of duplicate common names (specificaly: duplicate pairs
> of name and binding label) when writing the module files, by creating a
> list of them as we go through and checking them against that list.
>
> I agree it's not a perfect solution, but I couldn't make it work in any
> other way (see the PR for a tentative patch), and I think it's worth
> committing now, as it's a serious problem for our users. Regtested on
> x86_64-linux, OK to commit?
>
> FX
>
>
>
> :ADDPATCH fortran:
Reviwed and with Heralds positive report. OK to commit.
Jerry
More information about the Fortran
mailing list