private components in module files

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Oct 23 16:49:00 GMT 2019


On Wed, Oct 23, 2019 at 06:25:42PM +0200, Tobias Burnus wrote:
>
> Regarding submodules, I don't have any idea. I just observe
> that using submodules, one may end up having two identical
> files – name.mod and name.smod, which also looks like a waste
> of space. But I don't know anything about the implementation.
> 

A major point of submodules is to avoid compilation cascades.
Consider a project to numerous source file that USE a params.
module.  Prior to submodules, a change to the params module 
would require a recompilation of those numerous files.  With
submodules, you compile/create the *.mod once with interface
information.  The *.smod file contains the implementation
detailsi, and can be recompiled multiple time without causing
the cascade.  

-- 
Steve



More information about the Fortran mailing list