At 11:13 on 15 January, Daniel Grimwood wrote:
> Today I looked inside a .mod file compiled with Intel 7 / Linux, and
> although the date and the name of a temporary file are in a string at the
> end of the file, the offsets of these are not fixed from the end of file.
> That's because the string is of the form "date module_name tmpfile".
> module_name is not a fixed-width string, and neither is tmpfile (the
> pathname depends on your installation).
>
> We cannot change the file comparison script to comprehinsively accomodate
> Intel 7 / Linux like with the other compilers, but people can look at
> their own .mod files and work out what the range the offsets can be for
> them. (Their own temporary directories should be constant, and standard
> module names are limited to 1 to 32 characters).
I overcome this by doing a line-by-line comparison in Perl. If a
difference is found, I do
$new=~s/FORTRAN Module File.*$//;
$old=~s/FORTRAN Module File.*$//;
and compare again. The only information that follows this string in
the module file is the date-stamp, the module name and "created from
tmpfile", so if the second comparison succeeds the files can be
treated as identical. Oh, there is a version number too, but if the
version changes there will probably be other differences and one
should probably recompile everything anyway.
--
Anthony Stone http://www-stone.ch.cam.ac.uk/
University Chemical Laboratory, Email: [log in to unmask]
Lensfield Road, Phone: +44 1223 336375
Cambridge CB2 1EW Fax: +44 1223 336362
|