mod file compatibility between major releases
Tobias Burnus
burnus@net-b.de
Fri May 16 16:45:00 GMT 2008
FX wrote:
>> However, I don't know what efforts, if
>> any, there are for enabling mod files from different major versions to
>> interop in current or future releases of gfortran. Are there any
>> efforts on this front, or is it expected that the sources be recompiled
>> by the next major version to get the new mod files?
>
> No, there are no efforts to make module files compatible between
> versions (theoretically, not even minor versions, though we of course
> avoid breaking them unless there is a compelling reason; I don't think
> this has happened in the recent past).
As FX wrote, we try to avoid .mod changes but if they are needed for new
features, they are done. As new features are only added to new major
versions, minor versions should be compatible. Additionally, the file
format is such that certain kinds of changes are possible without
breaking the up-/downward compatibility.
> A recurring problem is that of distributing module files along with
> libraries, for people to use to interface their code to the library,
> but that's not how module files are supposed to be used (the proper
> solution, in that case, is to distribute a file containing interfaces,
> to be included or compiled by the users).
I think this works reasonably well for the libraries distributed by the
Linux distributions. Most users use the system compiler and then it
magically works.
The proper way is to use Fortran source files which contains the
interface definitions, which hardly any library/distribution does. Using
submodules makes it easier to maintain the interfaces, but unfortunately
(almost?) no compiler supports them so far.
Tobias
PS: I see you moved from lanl.gov to cray.com, which have their own nice
Fortran compiler. Will you continue to occasionally contribute to gfortran?
More information about the Fortran
mailing list