Changing module files
Andrew Benson
abenson@its.caltech.edu
Fri Dec 30 04:22:00 GMT 2011
I'm finding strange behavior in which a module file generated on compiling a
source file sometimes changes, even though the source file (and everything else)
is unchanged. The change seems to be of a binary nature - running md5sum on
the module file returns one of two values. The module files seem to be almost
identical - usually with some lines moved and a few numbers changed.
Everything still compiles correctly, but the changing module files make it
impossible to do dependency checks in a Makefile when compiling a large project
(e.g. sometimes a source file can receive a minor change - one which shouldn't
normally affect the module file - gets recompiled producing a different module
file which then triggers a recompile of a large number of dependent files).
This is happening with gfortran 4.7.0 r182342.
Unfortunately, I haven't been able to find a self-contained test case as the
problem is intermittent and seems to be very sensitive to the structure of the
source file. Additionally, it doesn't even seem to happen on every system that
I've tried it on - the problem occurs on a RHEL5 Linux system, but not on a
Fedora 16 system (both running the exact same version of gfortran). The best I
can offer is a tarball (attached) containing the source file and various module
files which is USEs. I've included a script, test.sh, which compiles the source
100 times and reports the md5sum of the module. The reported value should show
two different values - one reported about 90% of the time and the other about
10% of the time - seemingly at random.
If anyone has suggestions of how to get a better test case I'd be happy to
pursue this further.
-Andrew.
--
* Andrew Benson: http://www.tapir.caltech.edu/~abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moduleProblem.tar.bz2
Type: application/x-bzip-compressed-tar
Size: 174523 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111230/6270c4d6/attachment.bin>
More information about the Fortran
mailing list