Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

♦ ♦ ♦ C2H A P T E R 2

Using Oracle Developer Studio Fortran

This chapter describes how to use the Fortran compiler.

The principal use of any compiler is to transform a program written in a procedural language like Fortran into a data file that is executable by the target computer hardware. As part of its job, the compiler may also automatically invoke a system linker to generate the executable file.

The compiler can also be used to:

Generate a parallelized executable file for execution by multiple threads (-openmp).

Transform source files into:

Relocatable binary (.o) files, to be linked later into an executable file or static library (.a) file.

A dynamic shared library (.so) file (-G).

Link files into an executable file.

Compile an executable file with runtime debugging enabled (-g).

Compile with runtime statement or procedure level profiling (-pg).

Check source code for ANSI standards conformance (-ansi).

2.1A Quick Start

This section provides a quick overview of how to use the Fortran compiler to compile and run Fortran programs. A full reference to command-line options appears in the next chapter.

The very basic steps to running a Fortran application involve using an editor to create a Fortran source file with a .f, .for, .f90, .f95, .F, .F90, .F95, .f03, or .F03 filename suffix; (see Table Table 1, “Filename Suffixes Recognized by the Fortran Compiler,” on page 25), invoking the compiler to produce an executable; and finally, launching the program into execution by typing the name of the file:

Example: This program displays a message on the screen:

Chapter 2 • Using Oracle Developer Studio Fortran

23

Соседние файлы в предмете Информационные и сетевые технологии