
Chapter 6. C and C++ programming 53
The compilation process, if successful, creates an absolute object file,
named a.out by default. This binary file, a.out, can then be executed.
For example, the following sequence compiles the source file myprog.c
and executes the resulting malleable program a.out with eight proces-
sors:
t3e% cc myprog.c
t3e% mpprun -n 8 ./a.out
Compilation can be terminated with the appropriate options to produce
one of several intermediate translations, including relocatable object
files (option -c), assembly source expansions (option -S), or the output
of the preprocessor phase of the compiler (option -P or -E).
In general, the intermediate files can be saved and later resubmitted to
the CC, cc,orc89 commands, with other files or libraries included as
necessary. By default, the CC, cc,andc89 commands automatically call
the loader, cld, which creates an executable file.
The program can also be compiled and linked into a non-malleable exe-
cutable by:
t3e% cc -X 8 -o myprog.c
6.2 The C compiler
The Cray Standard C compiler consists of a preprocessor, a language
parser, an optimizer and a code generator. The Cray Standard C com-
piler is invoked by commands cc or c89.
The cc command accepts C source files that have the .c and .i suffixes,
object files with the .o suffix, library files with the .a suffix and assem-
bler source files with the .s suffix. The cc command format is generally
as follows:
t3e% cc [compiler_options] files
The sizes of the C datatypes on the T3E are:
• float: 4 bytes
• double: 8 bytes
• long double: 8 bytes
• int: 8 bytes
• long: 8 bytes
• long long: 8 bytes
Kommentare zu diesen Handbüchern