Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://star.arm.ac.uk/f77to90/cray.html
Дата изменения: Thu Oct 24 09:46:35 1996
Дата индексирования: Mon Oct 1 21:50:13 2012
Кодировка:
Поисковые слова: martian surface
|
Cray CF77 and CF90
Cray has a full Fortran 90 system available, but many of the new
commands in Fortran 90 were already available in Cray Fortran 77,
since Cray Research has been active in the development of the new
standard. The array concepts are almost entirely included, since this
area is close to Cray's general interest in vectorization and
parallelization. See articles in CRAY CHANNELS, Fall 1992, (Vol. 14,
No. 4), pp. 18-21.
For the present CF77 version 6.0 the following is already included:
Basic properties:
- The special characters ", ! and _ are included.
- The special character @ is also included but it is used by the system
for special purposes.
- The accepted line length can be switched from 72 to 80
characters.
- Comments can start with a ! anywhere on the line except
in position 6.
- A statement can have up to 99 continuation lines.
- A variable name (identifier) can have up to 31 characters, including
the special character _.
- Character strings can be delimited with either ' or ".
- Octal and hexadecimal constants are available, and
also bit operations according to Appendix 3, item 14.
- A repetition factor for new lines has been added, that is
for / in FORMAT.
- Only the old form (fix form) of the source code is available.
Control statements:
- DO, DO WHILE, END DO and WHERE, are available,
but not EXIT and CYCLE.
Specifications:
- IMPLICIT NONE and INCLUDE are available.
- The NAMELIST functionality is available, but it can have another
form, in addition to the one from Fortran 90.
- The new type of specifications with :: is not available.
File operations.
- All the new specifications to OPEN and INQUIRE are available.
Intrinsic functions:
- The bit manipulation functions (Appendix 5, item 10) and the bit copy
subroutine MVBITS are available, together with the following array
functions: MERGE, PACK, SPREAD, UNPACK, RESHAPE, SUM, PRODUCT,
MAXVAL, MINVAL, COUNT, ANY, ALL, TRANSPOSE, EOSHIFT, CSHIFT,
MAXLOC, MINLOC, MATMUL and DOT_PRODUCT.
- In addition the three bit manipulation functions from HPF are available.
Arrays:
- Adjustable arrays, assumed-size arrays, automatic arrays, array
sections and array assignments are available.
- The command ALLOCATABLE is not available.
Additional concepts:
- Recursion is available with certain special considerations,
no RESULT
clause is required.
- Pointers are available but they are defined in a different way,
compared with Fortran 90.
You have to be careful with both recursion and pointers on the Cray.
Pointers in Fortran 90 and Cray Fortran are discussed in the article
"Fortran 90 Pointers vs. "Cray" Pointers" by Jeanne Martin in the
Fortran Forum, Vol. 11, No. 2, pp. 17 - 23, June 1992.
Removed extensions:
- Of compatibility reasons the abbreviation DOUBLE for
DOUBLE PRECISION
and the specification DOUBLE COMPLEX were removed. Some system
commands have also been changed.
I here list the most important switches to the compilation command
for the Cray CF 90 Programming Environment.
-c compilation only (no linking)
-C creates an information file
-d disables compiling options
-e enables compiling options
-f fixed the old form of the source code
-f free the new form of the source code
-g generates information for debugging
-G more general debugging
-i decides on integer length
-I incldir Fortran 90 looks automatically for
files to INCLUDE in the present directory,
in directories in the I-list and in
/usr/local/lib/f90
-l linking of a library
-Ldir Add dir to the list of directories
for library routines
-m specifies the level for error messages
-M used to suppress error messages
-N specifies 72 or 80 colums for the fixed form source code
For free source code 132 is always valid
-o naming the output file
-O optimization level
-p pathname Fortran 90 looks automatically for
modules in the present directory,
in directories in the I-list and in
/usr/local/lib/f90
-r produces a compilation list
-S produces source code in assembler
-v give comment about how the compilation
is proceeding
-V gives the compiler's version number
-Wl sens information to the linker segldr
It can be mentioned here that Cray CF90 permits the use of REAL*8
instead of REAL and REAL*16 instead of
DOUBLE PRECISION .
The use of these notations should be avoided.
System parameters on the Cray, using the Cray Fortran 90 compiler
are given here. Compare with the
NAG table.
Note that Cray
uses the number of bytes for the KIND value. Cray also permits the
values 1, 2 and 4 for logical variables (with the same result as the
default value 8), the values 1, 2, 4, 6 and 8 for integers and
the values 4, 8 and 16 for real and complex variables.
The notation half for the REAL case with
KIND = 4 is my own, and so are also the notations int7, int15, int31,
int46 and int63.
Remark. Our tests indicate that half is not implemented completely on
the Cray Y-MP,
in reality you get variables of the usual precision (called single
below).
Information from Cray Research indicate that half is
introduced in order to
obtain a certain compatibility with Cray T3D, on which system that
precision
(half) really exists.
WARNING: I will have to double check this table at each revision of the
compiler! The parameters are being
changed by Cray. The present system is Cray F90 Version 1.0 (1.56 or 1.70),
CRAY CF 90 Version 1.0.1.0 (779005) or 1.0.2.0 (047431). The parameters below
are also valid for Cray CF90 Version 2.0.0.0.
See also the numerical inquiry functons in
Appendix 5.8.
LOGICAL Default
KIND number = 8
INTEGER Default int7 int15
KIND number = 6 1 2
digits = 46 7 15
radix = 2 2 2
range = 13 2 4
huge = 70368744177663 127 32767
bit_size = 46 8 16
INTEGER int31 int46 int64
KIND number = 4 6 8
digits = 31 46 63
radix = 2 2 2
range = 9 13 18
huge = 2147483647 70368744177663 9223372036854775807
bit_size = 32 46 46
REAL half Default,single double
KIND number = 4 8 16
digits = 24 47 96
maxexponent = 8189 8189 8190
minexponent = -8188 -8188 -8189
precision = 6 13 28
radix = 2 2 2
range = 2465 2465 2465
epsilon = 0.11920929E-06 0.14210855-13 0.25243549E-28
tiny = 0.73344155-2465 0.73344155-2465 0.73344155-2465
huge = 0.13634352+2466 0.13634352+2466 0.13634352+2466
COMPLEX half Default,single double
KIND number = 4 8 16
precision = 6 13 28
range = 2465 2465 2465
The Cray system is also available on other systems, especially on the Sun SPARC.
For further information see
CraySoft Fortran 90 Programming Environment.
NSC has made the Cray Fortran 77 and Fortran 90 manuals available on
line with a system described in Swedish
in Newsletter 109, item 3.
Back to Appendix 6
Last modified: 23 October 1996
boein@nsc.liu.se