Print

Print


Jean-Jacques Wasbauer wrote

> I am about to develop a code in F90 that needs to follow quality
> requirements and configuration management. We wonder what is the
> best F90 organization for F90 software development in terms of
> module definition. To be clearer we wonder if encapsulating each
> subroutine by a module will be a valuable software organization. On
> one hand it may avoid very long modules containing a lot of source
> codes lines (difficulties to find a routine in a module), it will
> fasten compilation (only relevant modules will be compiled and not
> the all bunch of routines contained in a module when slightly
> modified), on the other hand the information is dispatched in
> several files.
>
> I would like to have your opinion based on your development
> experience.

I use Fortran to simulate dynamic systems, i.e. systems involving
ordinary differential equations. For me a new project means a new
system, therefore I have to change parts of my program frequently.

Under those circumstance, here is the way I have organized my program.
(*) (Four) groups of modules. Naming convention: the first letter 
    in the file/module name (followed by  _) identifies the group. 
(*) Every group contains more Fortran modules. Every module 
    correspond    one to one to a file. 
    File_name = module_name + ".f90" 
(*) Every module contains one or (generally) more 
    subroutines/functions. In other words every 
    subroutine/function is contained in a module. 
    This allows the compiler to check the consistency.

I don't use include. Actually, I have purged my program from
non-standard/old constructs using Lahey Essential Fortran 90 compiler.
(a free basic version is available on the web from Lahey). Benefit:
the code is more readable, more consistent, portable. I recommend this
procedure as a test of some aspects of code quality.

I hope it helps. Cheers, Vittorio

-------------------------------------------------
Dr. Vittorio G. Caffa     Tel.:   (089) 6088-2054
IABG, Abt. AF 11          Fax:    (089) 6088-3990
Einsteinstr. 20           E-Mail:   [log in to unmask]
D-85521 Ottobrunn


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%