Invoking from the Compiler Command Line

To invoke the Intel® Fortran Compiler from the command line requires these steps :

  1. Set the environment variables

  2. Issue the compiler command, ifc or efc

Setting the Environment Variables

Set the environment variables to specify locations for the various components. The Intel Fortran Compiler installation includes shell scripts that you can use to set environment variables. From the command line, execute the shell script that corresponds to your installation. With the default compiler installation, these scripts are located at:

IA-32 systems:
/opt/intel/compiler60/ia32/bin/ifcvars.sh

Itanium(TM)-based systems:
/opt/intel/compiler60/ia64/bin/efcvars.sh

Running the Shell Scripts

To run the ifcvars.sh script on IA-32, enter the following on the command line:

prompt>. /opt/intel/compiler60/ia32/bin/ifcvars.sh

If you want the ifcvars.sh to run automatically when you start Linux*, edit your .bash_profile file and add the following line to the end of your file:

# set up environment for Intel compiler ifc
. /opt/intel/compiler60/ia32/bin/ifcvars.sh

The procedure is similar for running the efcvars.sh shell script on Itanium-based systems.

Command Line Syntax

The command for invoking the compiler depends on what processor architecture you are targeting the compiled file to run on, IA-32 or Itanium(TM)-based applications. The following describes how to invoke the compiler from the command line for each targeted architecture.

Note
Throughout this manual, where applicable, command line syntax is given for both IA-32- and Itanium-based compilations as seen above.

options

Indicates one or more command-line options. The compiler recognizes one or more letters preceded by a hyphen (-) as an option.

Some options take arguments in the form of filenames, strings, letters, or numbers. Except where otherwise noted, you can enter a space between the option and its argument(s) or you can combine them.

file1, file2 . . .

Indicates one or more files to be processed by the compilation system. You can specify more than one file. Use a space as a delimiter for multiple files. See Compiler Input Files.

linker_options

-Ldir - instruct linker to search dir for libraries

-lname - link with library named name

 Note
Specified options on the command line apply to all files. For example, in the following command line, the
-c and -w options apply to both files x.f and y.f:

prompt>ifc -c x.f -w y.f

prompt>efc -c x.f -w y.f