NCCS | User Info | search  

Cray C and C++


Contents


Introduction

The C compiler on Phoenix is Cray C. It supports the C99 ANSI standard.

cc ...

The C++ compiler on Phoenix is Cray C++. It supports ANSI C++.

CC ...

MPI include files and libraries are available by default. No additional options are required to compile or link MPI codes.


Options

The following options control the amount of debugging information generated by the compiler. They can adversely affect optimization.

-g
Full debugging. Turns off optimization.
-Gp
Block-level debugging. Limits optimization.
-Gf
Function-level debugging. Allows full optimization.

For most cases, the default levels of optimization are appropriate. Here are a few exceptions.

-h list=m
Generate a "loopmark" listing. The listing appears in a file with the suffix ".lst". Loopmarks illustrate where optimization did and did not occur, and why.
-h gen_private_callee
Generate the code necessary to call each procedure from within a stream. With this option, the procedures may be called as usual or from within a multi-streamed region.
-h upc
Compile Unified Parallel C (UPC).

On many systems, you must specify compiler options to create an executable that provides profiling data. On the Cray X1, you instead instrument an existing executabl using the "pat_build" tool.

pat_build old_executable instrumented_executable
You then run the instrumented executable, which produces a ".xf" file. Use "pat_report" to generate a profile.
pat_report file.xf
See "man pat_build" and "man pat_report" for more information on the types of profiles you can produce.

Documentation

See "man cc" or "man CC" for a full list of compiler options. PDF and HTML documentation is also available online from Cray at the following URL.

http://www.cray.com/craydoc/
In particular, see the following documents.
  • Optimizing Applications on the Cray X1 System
  • Cray C and C++ Reference Manual Manual

phoenix | ram | cheetah | eagle
ornl | nccs | ccs | computers | disclaimer

URL http://www.ccs.ornl.gov/Phoenix/cc.html
Updated: Friday, 16-Jan-2004 09:34:33 EST
consult@ccs.ornl.gov