Fortran User's Guide

Modules (Fortran 90)

f90 automatically creates module information files for each MODULE declaration encountered in the source files, and searches for modules referenced by a USE statement. All the modules appearing in a source file are compiled into a single file with the primary name of the MODULE and .mod suffix. For example, f90 generates the module information file list.mod for the MODULE list unit found on file mysrc.f90 .

The compiler searches the current directory for module files referenced in USE statements. Modules files must be compiled before compiling any source file referencing a MODULE in a USE statement. Directories can be added to the search path with the -M command-line option. However, individual .mod files cannot be specified directly on the command line.