Intel® Fortran Compiler 17.0 Developer Guide and Reference

Running Fortran Applications from the Command Line

For programs run from the command line, the operating system searches directories listed in the PATH environment variable to find the requested executable file.

The program can also be run by specifying the complete path of the executable file. On Windows* operating systems, any DLLs you are using must be in the same directory as the executable or in one specified in the path.

Multithreaded Programs

If the program is multithreaded, each thread starts on whichever processor is available at the time. On a computer with one processor, the threads all run in parallel, but not simultaneously; the single processor switches among them. On a computer with multiple processors, the threads can run simultaneously.

Using the -fpscomp filesfromcmd Option

If you specify the fpscomp option with keyword filesfromcmd, the command line that executes the program can include additional filenames to satisfy OPEN statements in the program for which the filename field (FILE specifier) has been left blank. The first filename on the command line is used for the first OPEN statement executed, the second filename for the second OPEN statement, and so on.

Note

In the Visual Studio* IDE, you can provide these filenames using Project > Properties. Choose the Debugging category and enter the filenames in the Command Arguments text box.

Each filename on the command line (or in an IDE dialog box) must be separated from the names around it by one or more spaces or tab characters. You can enclose each name in quotation marks ("<filename>"), but this is not required unless the argument contains spaces or tabs. A null argument consists of an empty set of quotation marks with no filename enclosed ("").

The following example runs the program MYPROG.EXE from the command line:

MYPROG "" OUTPUT.DAT

Because the first filename argument is null, the first OPEN statement with a blank filename field produces the following message:

File name missing or blank - please enter file name
UNIT number  ?

The number is the unit number specified in the OPEN statement. The filename OUTPUT.DAT is used for the second OPEN statement executed. If additional OPEN statements with blank filename fields are executed, you will be prompted for more filenames.

Instead of using the fpscomp option with keyword filesfromcmd, you can:

See Also