There are two ways of working with multimodule programs depending on the scale of your project.
In a small-scale project, the source files are in a single directory, so module management is not an issue. A simple way to compile and use modules is to incorporate a module before a program unit that references it with USE. In this case, sources may be compiled and linked in the same way as FORTRAN 77 sources; for example if file1.f contains one or more modules and file2.f contains one or more program units that call these modules with the USE directive. The sources may be compiled and linked by the commands:
IA-32 applications:
ifc file1.f file2.f
or
ifc -c file1.f (where -c option stops the compilation after an .o file has been created)
ifc file1.o file2.f
Itanium(TM)-based applications:
efc file1.f file2.f
or
efc -c file1.f (where -c option stops the compilation after an .o file has been created)
efc file1.o file2.f
In a larger-scale software project, module management becomes a significant issue. The Intel Fortran Compiler incorporates the following features to ease this task:
variable grouping of program units in program unit catalogs
variable module search path
detection of stale program units
utilities to find, copy, delete and display program unit catalog entries
program binder to construct an inventory of objects for linking
By default, ifc (IA-32 compiler) or efc (Itanium compiler) compiles each program unit for multimodule usage in the FCE. If you wish to specify independent compilation, use the -ic option:
IA-32 compiler:
Itanium compiler:
efc -ic file.f
If you do not use modules in your programs, you can still benefit from the FCE through the use of its binder. The binder provides features to automate your compilation tasks and expedite your application development. These features are part of the FCE structure.