Fortran Programs with or without Modules

There are two ways of working with multi-module programs depending on the scale of your project.

Small-Scale Projects

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

Larger-Scale Projects

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

By default, ifc (IA-32 compiler) or efc (Itanium compiler) compiles each program unit for multi-module usage in the FCE. If you wish to specify independent compilation, use the -ic option:

IA-32 compiler:

ifc -ic file.f

Itanium compiler:

efc -ic   file.f  

Fortran Programs Without Modules

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.