Compilation order for Fortran programs
If you have a program unit, subprogram, or interface body that uses a module, you must first compile the module. If the module and the code that uses the module are in separate files, you must first compile the file that contains the module. If they are in the same file, the module must come before the code that uses it in the file. If you change any entity in a module, you must recompile any files that use that module.
If only the implementation of a separate
module procedure is changed, but the interface remains the same, you
do not need to recompile the file that contains the module in which
the corresponding module procedure interface body is declared.


