Cypress CSC-1200T Betriebsanweisung Seite 41

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 124
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 40
Chapter 5. Fortran programming 41
5.2 Basic usage
The CF90 compiler is invoked using the command f90 followed by op-
tional compiler options and the filenames to be compiled:
t3e% f90 [options] filenames
If the -c option is not specified, the f90 command will automatically
invoke the linker to create an executable program.
You can compile and link in a single step:
t3e% f90 -o prog.x prog.f90 sub.f90
Here the source code files prog.f90 and sub.f90 were compiled into
the executable program prog.x. The compilation and linking can also
be done in several steps using the -c option:
t3e% f90 -c prog.f90
t3e% f90 -c sub.f90
t3e% f90 -o prog.x prog.o sub.o
This way, only the changed program units have to be compiled before
linking the .o files.
The malleable program prog.x can now be executed using the mpprun
command:
t3e% mpprun -n 16 ./prog.x
Here we used 16 processors.
The program can also be compiled and linked into a non-malleable exe-
cutable by:
t3e% f90 -X 16 -o prog.x prog.f90 sub.f90
5.3 Fixed and free format source code
The Fortran compiler uses filename extensions to distinguish different
types of files. The compiler interprets the extensions .f and .F to mean
the traditional fixed form of source code (“FORTRAN 77 style”). The
extensions .f90 and .F90 imply the new free form of source code. You
can override these defaults using the options -f fixed and -f free.
Table 5.1 illustrates the use of the file extensions.
Seitenansicht 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 123 124

Kommentare zu diesen Handbüchern

Keine Kommentare