Re: Do different compilers produce different .mod files?
- From: Gordon Sande <g.sande@xxxxxxxxxxxxxxxx>
- Date: Tue, 04 Mar 2008 20:32:16 GMT
On 2008-03-04 16:12:12 -0400, GaryScott <garylscott@xxxxxxxxxxxxx> said:
On Mar 4, 1:21 pm, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:<bonza...@xxxxxxxxxxx> wrote:Does anyone
know if G95 .mod files should be compatible with other compilers? i
would have though so.
No. The .mod files are compiler-specific. Heck, it is even
compiler-specific whether there is such a thing as a .mod file. Putting
the necessary information in a .mod file is the most common
implementation scheme - enough so to have become a bit of a defacto
standard - but it is not the only scheme.
It has even happened that .mod files are incompatible between different
versions of the same compiler... just like it has happened that object
files have beeen simillarly incompatible. Vendors try to avoid such
version incompatibilities (because it makes life difficult for
customers, who then in turn make life difficult for the vendors), but it
has happened.
Such incompatibilities usually imply to me less than ideal design of
the .mod file structure. There's almost never good justification for
such incompatibilities. It is sometimes due to laziness, for example
creating the file structure as a sequence of structures with no
tagging/markup whatsoever. A tiny bit of thought, such as tagging
(e.g. escape sequences but a little more sophisticated), can avoid all
incompatibilities, and with minimal I/O performance impact (slightly
more difficult to process tho).
The information that a compiler wants to obtain from a USE statement
could be as little as some symbols with a small of amount of additional
information or as much as the full source of the module. There is no
single design that could meet such varying objectives. The Fortran
specification does not say what is there and the actual contents would
depend upon how agressive the compiler implementors choose to be in
being able to analyse the whole program. Those with minor requirements
would certainly object to servicing the needs of those with much more
extensive requirements.
If one were running a Fortran interpreter the USE statement would want
the full source (or functional equivalent) to allow the current program
to be interpreted.
It is a real pain to recompile those old CDC6600 object files to run
on a PC but it is an incompatability that folks have learned to live with.
I do not recall seeing such a complaint in this newsgroup!
--s from experience;
Richard Maine | Good judgement come
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: Do different compilers produce different .mod files?
- From: Catherine Rees Lay
- Re: Do different compilers produce different .mod files?
- From: GaryScott
- Re: Do different compilers produce different .mod files?
- References:
- Do different compilers produce different .mod files?
- From: bonzaboy
- Re: Do different compilers produce different .mod files?
- From: Richard Maine
- Re: Do different compilers produce different .mod files?
- From: GaryScott
- Do different compilers produce different .mod files?
- Prev by Date: Re: Do different compilers produce different .mod files?
- Next by Date: Re: Do different compilers produce different .mod files?
- Previous by thread: Re: Do different compilers produce different .mod files?
- Next by thread: Re: Do different compilers produce different .mod files?
- Index(es):
Relevant Pages
|
|