[-D macro[=def]]
     [-G level]
     [-h arg]
     [-I incldir]
     [-K trap=opt[,opt]...]
     [-l libfile]
     [-L ldir]
     [-o outfile]
     [-O level]
     [-U macro]
     [-W phase,"opt..."]
     [-X npes]
     [-Y phase,dirname]
     [-#] [-##] [-###]
     files ...

     Cray Linux Environment (CLE)

     The CC command invokes the Cray C++ compiler. The compiler conforms to
     the ISO/IEC 14882:2003 standard, with some exceptions. The exceptions
     are noted in the Cray C and C++ Reference Manual.

     Typically, the CC command processes the source files named on the
     command line, generates a binary object file (sourcefile.o), links the
     binary object file, and generates an executable file (named a.out by
     default). Other files used and created by the C++ compiler are
     discussed under the FILES section.

     For a more detailed description of the CC command, see the Cray C and
     C++ Reference Manual. Information contained in this man page may
     differ from the reference manual. Where the information differs, this
     man page supersedes the information contained in the reference manual.

   Conflicting Options
     If you specify conflicting options, the option specified last on the
     command line overrides the previously specified option. Exceptions to
     this rule are noted in the individual option descriptions.

   Conflicts between Options and #pragma Directives
     Most #pragma directives override corresponding command-line options.
               Specifies strict conformance to the ISO C++ standard. The
               -h noconform option specifies partial conformance to the
               standard. The -h const_string_literals, -h dep_name,
               -h exceptions, and -h parse_templates options are enabled by
               the -h conform option in Cray C++. The default is -h

     -h cfront Causes the Cray C++ compiler to accept constructs that were
               accepted by previous cfront-based compilers (such as Cray
               C++ 1.0) but which are not accepted in the C++ standard. The
               -h anachronisms option is implied when -h cfront is

     -h [no]parse_templates
               Allows existing code that defines templates using previous
               versions of the Cray Standard Template Library (STL) (before
               Programming Environment 3.6) to compile successfully with
               the -h conform option. Consequently, this allows you to
               compile existing code without having to use the Cray C++
               STL. To do this, use the noparse_templates option. Also, the
               compiler defaults to this mode when the -h dep_name option
               is used. To have the compiler verify that your code uses the
               Cray C++ STL properly, use the parse_templates option. The
               default is -h noparse_templates.

     -h [no]dep_name
               Enables or disables dependent name processing (that is, the
               separate lookup of names in templates when the template is
               parsed and when it is instantiated). The -h dep_name option
               cannot be used with the -h noparse_templates option. The
               default is -h nodep_name.

     -h [no]exceptions
               Enables support for exception handling. The -h noexceptions
               option issues an error whenever an exception construct, a
               try block, a throw expression, or a throw specification on a
               function declaration is encountered. The -h exceptions
               option is enabled by -h conform.

               The default is -h exceptions; however, if the CRAYOLDCPPLIB
               environment variable is set to a nonzero value, the default
               is -h noexceptions.

     -h [no]anachronisms
               Disables or enables anachronisms in Cray C++. This option is
               overridden by -h conform. The default is -h noanachronisms.

     -h [no]new_for_init
               Enables the new scoping rules for a declaration in a for-
               init-statement. This means that the new standard-conforming
               rules are in effect; the entire for statement is wrapped in
               its own implicitly generated scope. The -h new_for_init
               }  // scope of i ends here for -h nonew_for_init

               Default: -h new_for_init

     -h [no]const_string_literals
               Controls whether string literals are const (as required by
               the standard) or non-const (as was true in earlier versions
               of the C++ language). The default is -h

     -h [no]gnu
               Enables the compiler to recognize the GCC C++ Language
               Extensions. The default is -h nognu.

               For descriptions of the GCC C and C++ language extensions,
               see (link to URL

                         GCC C++ Language Extensions
   GCC C++ Extensions                  Description
   Min and Max                         C++ minimum and maximum operators
   Restricted Pointers                 C99 restricted pointers and
   Backwards Compatibility             Compatibilities with earlier
                                       definitions of C++
   Strong Using                        A using-directive with __attribute
   Explicit template specializations   Attributes may be used on explicit
                                       template specializations

   Table 1. Virtual Function Options
     -h forcevtbl
               Forces the definition of virtual function tables in cases
               where the heuristic methods used by the compiler to decide
               on definition of virtual function tables provide no
               guidance. The virtual function table for a class is defined
               in a compilation if the compilation contains a definition of
               the first non-inline, non-pure virtual function of the
               class. For classes that contain no such function, the
               default behavior is to define the virtual function table
               (but to define it as a local static entity). The
               does not have a C++ compiler. The use of this option
               requires that the main function must be compiled by C++, and
               the static constructor/destructor function must be included
               in the link. With these precautions, mixed object files
               (files with .o suffixes) from C and C++ compilations can be
               linked into executables by using the linker command instead
               of the CC command.

     -h restrict=args
               Globally tells the compiler to treat certain classes of
               pointers as restricted pointers. You can use this option to
               enhance optimizations (this includes vectorization).

               Classes of affected pointers are determined by the value
               contained in args, as follows:

             args         Description
             a            All pointers to object and incomplete types are
                          to be considered restricted pointers, regardless
                          of where they appear in the source code. This
                          includes pointers in class, struct, and union
                          declarations, type casts, function prototypes,
                          and so on.
             f            All function parameters that are pointers to
                          objects or incomplete types can be treated as
                          restricted pointers.
             t (Cray C++  All parameters that are this pointers can be
             only)        treated as restricted pointers.


                    Do not specify restrict=a if, during execution of any
                    function, an object is modified and that object is
                    referenced through either two different pointers or
                    through the declared name of the object and a pointer.
                    Undefined behavior may result.

                    Do not specify restrict=f if, during execution of any
                    function, an object is modified and that object is
                    referenced through either two different pointer
                    function parameters or through the declared name of the
                    object and a pointer function parameter. Undefined
                    behavior may result.

                    Do not specify restrict=t if, during execution of any
                    function, an object is modified and that object is

                    The arguments make assertions about your program that,
                    if incorrect, can introduce undefined behavior. You
                    should not use -h restrict=a if, during the execution
                    of any function, an object is modified and that object
                    is referenced through either of the following:

                    ·  Two different pointers

                    ·  The declared name of the object and a pointer

                    The -h restrict=f and -h restrict=t options are subject
                    to the analogous restriction, with "function parameter
                    pointer" replacing "pointer."

     -h [no]calchars
               Allows the use of the $ character in identifier names. This
               option is useful for porting codes in which identifiers
               include this character. With -h nocalchars, this character
               is not allowed in identifier names.

               The default is -h nocalchars.


                    Use this option with extreme care, because identifiers
                    with this character are within CNL name space and are
                    included in many library identifiers, internal compiler
                    labels, objects, and functions. You must prevent
                    conflicts between any of these uses, current or future,
                    and identifier declarations or references in your code;
                    any such conflict is an error.

     -h [no]signedshifts
               Affects the result of the right shift operator. For the
               expression e1 >> e2 where e1 has a signed type, when
               -h signedshifts is in effect, the vacated bits are filled
               with the sign bit of e1. When -h nosignedshifts is in
               effect, the vacated bits are filled with zeros, identical to
               the behavior when e1 has an unsigned type.

               The default is -h nosignedshifts.

   General Optimization Options
     -h [no]add_paren
               Forces the compiler to evaluate selected associative
               operations (+,-,*) from left to right if the result type is
               float or complex. Left to right evaluation is not required
               by the language standards, but some applications may expect

               The default is -h noadd_paren.
               Controls automatic prefetch optimization. Does not affect
               loop_info [no]prefetch directive.

               Default: autoprefetch.

     -h [no]autothread
               Enables or disables automatic threading. The default is -h

     -h display_opt
               Displays the current optimization settings for this

     -h [no]dwarf
               Controls whether DWARF debugging information is generated
               during compilation. The default is -h dwarf.

     -h flex_mp=level
               Controls the aggressiveness of optimizations which may
               affect floating point and complex repeatability when
               application requirements require identical results when
               varying the number of ranks or threads. The default is -h

               The values for level are:

   level           Description
   intolerant      Has the highest probability of repeatable results, but
                   also has the highest performance penalty.
   conservative    Uses more aggressive optimization and yields higher
                   performance than intolerant, but results may not be
                   sufficiently repeatable for some applications.
   default         Uses more aggressive optimization and yields higher
                   performance than conservative, but results may not be
                   sufficiently repeatable for some applications.
   tolerant        Uses most aggressive optimization and yields highest
                   performance, but results may not be sufficiently
                   repeatable for some applications.

     -h fusionn
               Controls loop fusion and changes the assertiveness of the
               fusion pragma. Loop fusion can improve the performance of
               loops, although in rare cases it may degrade performance.
               The n argument allows you to turn loop fusion on or off and
               determine where fusion should occur.

                          fusion pragma.
             2            Attempt to fuse all loops (includes array syntax
                          implied loops), except those marked with the
                          nofusion pragma.

     -h [no]intrinsics
               Allows the use of intrinsic hardware functions, which allow
               direct access to some hardware instructions or generate
               inline code for some functions. This option has no effect on
               specially handled library functions.

               The default is -h intrinsics.

               See the Cray C and C++ Reference Manual for a complete list
               of hardware intrinsic functions.

     -h [no]keep_frame_pointer
               Retain call stack information back to main entry point for
               CrayPat performance sampling.

               The default is -h nokeep_frame_pointer.

     -h list=opt
               Allows you to create listings and control their formats. The
               listings are written to source_file_name_without_suffix.lst.

               The values for opt are:

             opt          Description
             a            Use all list options;
                          source_file_name_without_suffix.lst includes
                          summary report, options report, and source
             d            Decompiles (translates) the intermediate
                          representation of the compiler into listings that
                          resemble the format of the source code. This is
                          performed twice, resulting in two output files,
                          at different points during the optimization
                          process. You can use these files to examine the
                          restructuring and optimization changes made by
                          the compiler, which can lead to insights about
                          changes you can make to your source code to
                          improve its performance.
                          The compiler produces two decompilation listing
                          files with these extensions per specified source
                          file: .opt and .cg. The compiler generates the
                          architecture of the system is helpful to
                          understanding this listing.
                          The .opt and .cg files are intended as a tool for
                          performance analysis and are not valid source
                          code. The format and contents of the files can be
                          expected to change from release to release.
             e            Expand include files.
                          Using this option may result in a very large
                          listing file. All system include files are also
             i            Intersperse optimization messages within the
                          source listing rather than at the end.
             m            Create loopmark listing;
                          source_file_name_without_suffix.lst includes
                          summary report and source listing.
             s            Create a complete source listing (include files
                          not expanded).
             T            Retains file.T after processing rather than
                          deleting it.

     -h [no]msgs
               Causes the compiler to write optimization messages to

               When the -h msgs option is in effect, you may request that a
               listing be produced so that you can see the optimization
               messages in the listing. For information about obtaining
               listings, see -h list=opt.

               The default is -h nomsgs.

     -h [no]negmsgs
               Causes the compiler to generate messages to stderr that
               indicate why optimizations such as vectorization or inlining
               did not occur in a given instance.

               The -h negmsgs option enables the -h msgs option. The -h
               list=a option enables the -h negmsgs option.

               The default is -h nonegmsgs.

     -h [no]omp_trace
               Turns the insertion of the CrayPat OpenMP tracing calls on
               and off.

               The default is -h noomp_trace; tracing is off.

     -h [no]func_trace
               For use only with CrayPat. If this option is specified, the

     -h [no]overindex
               Declares that there are array subscripts that index a
               dimension of an array that is outside the declared bounds of
               that array. The -h nooverindex option declares that there
               are no array subscripts that index a dimension of an array
               that is outside the declared bounds of that array.

               The default is -h nooverindex.

     -h [no]pattern
               Globally enables or disables pattern matching. Pattern
               matching is on by default.

               When the compiler recognizes certain patterns in the source
               code, it replaces the construct with a call to an optimized
               library routine. A loop or statement that has been pattern
               matched and replaced with a call to a library routine is
               indicated with an A in the loopmark listing.

               Note:  Pattern matching is not always worthwhile. If there
               is a small amount of work in the pattern-matched construct,
               the call overhead may outweigh the time saved by using the
               optimized library routine. When compiling using the default
               optimization settings, the compiler attempts to determine
               whether each given candidate for pattern matching will in
               fact yield improved performance.

     -h pl=program_library
               Create and use a persistent repository of compiler
               information specified by program_library. When used with -h
               wp, this option provides application-wide, cross-file,
               automatic inlining. See -h wp.

               The program_library repository is implemented as a directory
               and the information contained in program library is built up
               with each compiler invocation. Any compilation that does not
               have the -hpl option will not add information to this

               Because of the persistence of program_library, it is the
               user's responsibility to manage it. For example, rm -r
               program_library might be added to the make clean target in
               an application makefile. Because program_library is a
               directory, use rm -r to remove it.

               If an application makefile works by creating files in
               multiple directories during a single build, the
               program_library should be an absolute path, otherwise
               multiple and incomplete program library repositories will be
               created. For example, avoid -hpl=./PL.1 and use
               -hpl=/fullpath/builddir/PL.1 instead.

               The values for n are:

             n            Description
             0            No autothreading or OMP threading.
             1            No parallel region expansion, no loop
                          restructuring for OMP loops, no optimization
                          across OMP constructs.
             2            Parallel region expansion, limited loop
                          restructuring, optimization across OMP
             3            Reduction results may not be repeatable. Loop
                          restructuring, including modifying iteration
                          space for static schedules (breaking standard

     -h unrolln
               Globally controls loop unrolling and changes the
               assertiveness of the unroll pragma. By default, the compiler
               attempts to unroll all loops, unless the nounroll pragma is
               specified for a loop. Generally, unrolling loops increases
               single processor performance at the cost of increased
               compile time and code size.

               The n argument allows you to turn loop unrolling on or off
               and specify where unrolling should occur. It also affects
               the assertiveness of the unroll pragma.

               The default is -h unroll2.

               The values for n are:

             n            Description
             0            No unrolling (ignore all unroll pragmas and do
                          not attempt to unroll other loops).
             1            Attempt to unroll loops that are marked by the
                          unroll pragma.
             2            Unroll loops when performance is expected to
                          improve. Loops marked with the unroll or nounroll
                          pragma override automatic unrolling.

               The options -h pl=program_library and -h wp should be
               specified on all compiler invocations and on the compiler
               link invocation. Since -h wp delays the compiler
               optimization step until link time, -c compiles will take
               less time and the link step will take longer. Normally, this
               is just a time shift from one build phase to another with
               roughly the same overall compile time. In some cases
               increased inlining may cause an increase in overall compile
               time. Using -h wp allows the compiler backend to be invoked
               in parallel during a build. Setting the environment variable
               NPROC controls the number of concurrent compiler backend
               invocations and this parallelism may reduce overall compile

     -O level  Specifies the optimization level for a group of compiler
               features. Specifying -O with no argument is the same as not
               specifying the -O level option; this syntax is supported for
               compatibility with other vendors.

               The level values 0, 1, 2, and 3 enable you to specify
               increasing general levels of optimization.

               The -O 1, -O 2, and -O 3 specifications do not directly
               correspond to the numeric optimization levels for scalar
               optimization and vectorization. For example, specifying -O 3
               does not necessarily enable scalar3 and vector3. Cray
               reserves the right to alter the specific optimizations
               performed at these levels from release to release. You can
               use the -e o option to display the optimization options used
               during compilation.

               The valid level values are:

               level     Optimization Provided

               -O 0      Disables all optimizations including floating
                         point optimizations. Implies -h fp0.

               -O 1, -O 2, -O 3
                         Default: 2.

               See the Cray C and C++ Reference Manual for the -O and -h
               equivalent values.

   Automatic Cache Management Options
     -h [no]align_arrays
               Controls padding of arrays in static data. By default, some
               statically allocated arrays are aligned and padded for
               better cache behavior. Common block data is not affected.

               Default: align_arrays

             1            Conservative automatic cache management.
                          Characteristics include moderate compile time.
                          Symbols are placed in the cache when the
                          possibility of cache reuse exists and the
                          predicted cache footprint of the symbol in
                          isolation is small enough to experience the
             2            Moderately aggressive automatic cache management.
                          Characteristics include moderate compile time.
                          Symbols are placed in the cache when the
                          possibility of cache reuse exists and the
                          predicted state of the cache model is such that
                          the symbol will experience the reuse.
             3            Aggressive automatic cache management.
                          Characteristics include potentially high compile
                          time. Symbols are placed in the cache when the
                          possibility of cache reuse exists and the
                          allocation of the symbol to the cache is
                          predicted to increase the number of cache hits.

               For more information on automatic cache management, see the
               Cray C and C++ Reference Manual.

   Vector Optimization Options
     -h vectorn
               Specifies the level of automatic vectorizing to be
               performed. Vectorization results in dramatic performance
               improvements with a small increase in object code size.
               Vectorization directives are unaffected by this option.

               The default is -h vector2.

               The values of n are:

             n            Description
             0            No automatic vectorization. Characteristics
                          include low compile time and small compile size.
                          This option is compatible with all scalar
                          optimization levels.
             1            Specifies conservative vectorization.
                          Characteristics include moderate compile time and
                          The -h vector1 option is compatible with
                          -h scalar1, -h scalar2, and -h scalar3.
             2            Specifies moderate vectorization. Characteristics
                          include moderate compile time and size. Loop

               targets for inline expansion include all the procedures
               within the input file to the compilation.

             level        Description
             0            All interprocedural analysis and optimizations
                          disabled. All inlining and cloning compiler
                          directives are ignored.
             1            Directive inlining. Inlining is attempted for
                          call sites and routines that are under the
                          control of an inlining compiler directive.
                          Cloning disabled and cloning directives are
             2            Inlining. Inline a call site to an arbitrary
                          depth as long as the expansion does not exceed
                          some compiler-determined threshold. The call site
                          must flatten for any expansion to occur. The call
                          site is said to "flatten" when there are no calls
                          present in the expanded code. The call site must
                          reside within the body of a loop and the entire
                          loop body must flatten. A loop body is said to
                          "flatten" when all call sites within the body of
                          the loop are flattened.
                          Cloning disabled and cloning directives are
             3            Constant actual argument inlining and tiny
                          routine inlining. Default level for inlining.
                          This includes levels 1 and 2, plus any call site
                          that contains a constant actual argument.
                          Additionally, any call nest (regardless of
                          location) that is below some small compiler-
                          determined threshold will be inlined provided
                          that call nest completely flattens.
                          Cloning disabled and cloning directives are
             4            Aggressive inlining. This includes levels 1, 2,
                          and 3, plus a call site does not have to reside
                          in a loop body to inline nor does the call site
                          have to necessarily flatten.
                          Cloning disabled and cloning directives are
             5            Cloning. Includes levels 1, 2, 3, 4, plus routine
                          cloning is attempted if inlining fails at a given
                          call site. Cloning directives are enabled.

               The default is -h ipa3.

               Note:  The routines in source are not actually linked with
               the final program. They are simply templates for the
               inliner. To have a routine contained in source linked with
               the program, you must include it in an input file to the

               Use one or more of the following objects in the source

               C++ source files
                         The routines in C++ source files are candidates
                         for inline expansion and must contain error-free

               dir       A directory that contains any of the C file types.

               For a description of combined inlining, see the Cray C and
               C++ Reference Manual.

   Scalar Optimization Options
     -h [no]interchange
               Allows the compiler to attempt to interchange all loops, a
               technique that is used to gain performance by having the
               compiler swap an inner loop with an outer loop. The compiler
               attempts the interchange only if the interchange will
               increase performance. Loop interchange is performed only at
               scalar optimization level 2 or higher.

               The -h nointerchange option prevents the compiler from
               attempting to interchange any loops. To disable interchange
               of loops individually, use the #pragma _CRI nointerchange

               The default is -h interchange.

     -h scalarn
               Specifies the level of automatic scalar optimization to be
               performed. Scalar optimization directives are unaffected by
               this option.

               The default is -h scalar2.

               The values for n are:

             n            Description
             0            Minimal automatic scalar optimization. The
                          -h matherror=errno and -h zeroinc options are
                          implied by -h scalar0.

     -h [no]zeroinc
               Improves run time performance by causing the compiler to
               assume that constant increment variables (CIVs) in loops are
               not incremented by expressions with a value of 0.

               This option causes the compiler to assume that some constant
               increment variables (CIVs) in loops might be incremented by
               0 for each pass through the loop, preventing generation of
               optimized code.

               For example, in a loop with index i, the expression expr in
               the statement i += expr can evaluate to 0. This rarely
               happens in actual code. -h zeroinc is the safer and slower
               option. This option is affected by the -h scalarn option.

               The default is -h nozeroinc.

   Math Options
     -h fpn    Allows you to control the level of floating-point and
               complex arithmetic optimizations. The n argument controls
               the level of allowable optimization; 0 gives the compiler
               minimum freedom to optimize floating-point and complex
               operations , while 4 gives it maximum freedom. The higher
               the level, the lesser the floating-point operations conform
               to the IEEE standard.

               This option is useful for code using algorithms that are
               unstable but optimizable.

               Generally, this is the behavior and usage for each -h fp

               ·  The -h fp0 causes your program's executable code to
                  conform more closely to the IEEE floating-point standard
                  than the default mode (-h fp2). When you specify this
                  level, many identity optimizations are disabled,
                  vectorization of floating-point and complex reductions
                  are disabled, executable code is slower than higher
                  floating-point optimization levels.

                         Note:  Use the -h fp0 option only when your code
                         pushes the limits of IEEE accuracy or requires
                         strong IEEE standard conformance.

               ·  The -h fp1 option performs various generally safe, non-
                  conforming IEEE optimizations, such as folding a == a to
                  true, where a is a floating point object. At this level,
                  a scaled complex divide mechanism is enabled that
                  increases the range of complex values that can be handled
                  without producing an underflow, and rewrite of division
                  into multiplication by reciprocal is inhibited.

               You should only use -h fp4 if your application uses
               algorithms which are tolerant of reduced precision.

               The Floating-point Optimization Levels table compares the
               various optimization levels of the -h fp option The table
               lists some of the optimizations performed; the compiler may
               perform other optimizations not listed.

                     Floating-point Optimization Levels
 Optimization Type     fp0        fp1        (default)  fp3        fp4
 Complex divisions    Accurate   Accurate   Fast      Fast       Fast
                      and slower and slower
 Exponentiation       None       None       When      Always     Always
 rewrite                                    beneficial
 Strength reduction   None       None       Fast      Fast       Fast
 Rewrite division as  None       None       Yes       Aggressive Aggressive
 reciprocal equivalent
 ( x/y -> x * 1.0/y)
 Floating point       Slow       Fast       Fast      Fast       Fast
 Safety               Maximum    High       High      Moderate   Low
 Expression factoring None       Yes        Yes       Yes        Yes
 Expression tree      None       None       Yes       Yes        Yes
 Precision            Best       Very High  High      Good       Acceptable

     -h matherror=method
               Specifies the method of error processing used if a standard
               math function encounters an error. The method argument can
               have one of the following values:

             method       Description
             abort        If an error is detected, errno is not set.
                          Instead, a message is issued and the program
                          aborts. An exception may be raised.
             errno        If an error is detected, errno is set, and the
                          math function returns to the caller. This method
                          is implied by the -h conform, -h scalar0, -O0,
                          -Gn, and -g options.

                       Table 3. -G level Definitions
 level  Optimization  Breakpoints allowed on  Debugging  Execution speed
 -Gf    Full          Function entry and exit Limited     Best
 -Gp    Partial       Block boundaries        Better      Better
 -Gn    None          Every executable        Best        Limited
 -Gfast Full          Every executable        Best:       Best
                      statement               requires

               Better debugging information comes at the cost of inhibiting
               certain optimization techniques, so choose the option that
               best fits the debugging needs of any particular source file
               in an application.

               The -g option is equivalent to -Gn. The -g option is
               included for compatibility with earlier versions of the
               compiler and many other UNIX systems; the -G option is the
               preferred specification. The -Gn and -g options disable all
               optimizations and imply -O0 and -h fp0.

               The -Gfast option permits both full code optimization and
               the greatest flexibility in setting breakpoints, but
               requires use of the Cray fast-track debugger. For more
               information, see the lgdb(1) man page.

               The debugging options take precedence over any conflicting
               options that appear on the command line. If more than one
               debugging option appears, the last one specified overrides
               the others.

     -h [no]bounds
               Provides checking of pointer and array references to ensure
               that they are within acceptable boundaries. -h nobounds
               disables these checks.

               The pointer check verifies that the pointer is greater than
               0 and less than the machine memory limit. The array check
               verifies that the subscript is greater than or equal to 0
               and is less than the array size, if declared.

     -h dir_check
     -h zero   Causes stack-allocated memory to be initialized to all

   Compiler Message Options
     -h msglevel_n
               Specifies the lowest level of severity of messages to be
               issued. Messages at the specified level and above are

               The default is -h msglevel_3.

               Values for n are:

             n            Description
             0            Comment
             1            Note
             2            Caution
             3            Warning
             4            Error

     -h [no]message=n[:n...]
               Enables or disables specified compiler messages, where n is
               the number of a message to be enabled or disabled. You can
               specify more than one message number; multiple numbers must
               be separated by a colon with no intervening spaces. For
               example, to disable messages CC-1trunk and CC-9, specify:

               -h nomessage=174:9

               The -h [no]message=n option overrides -h msglevel_n for the
               specified messages. If n is not a valid message number, it
               is ignored. Any compiler message except ERROR, INTERNAL, and
               LIMIT messages can be disabled; attempts to disable these
               messages by using the -h nomessage=n option are ignored.

     -h report=args
               Generates report messages specified in args and lets you
               direct the specified messages to a file. The values of args

             args         Description
             f            Writes specified messages to file.V, where file
               % CC -h report=is myfile.C

     -h [no]abort
               Controls whether a compilation aborts if an error is

               The default is -h noabort.

     -h errorlimit[=n]
               Specifies the maximum number of error messages the compiler
               prints before it exits, where n is a positive integer.
               Specifying -h errorlimit=0 disables exiting on the basis of
               the number of errors. Specifying -h errorlimit with no
               qualifier is the same as setting n to 1.

               The default is -h errorlimit=100.

   Compilation Phase Options
     -E        Directs the compiler to execute only the preprocessor phase
               of the compiler. The -E and -P options are equivalent,
               except that -E directs output to stdout and inserts
               appropriate #line linenumber preprocessing directives. The
               -E option takes precedence over the -h feonly, -S, and -c

     -P        Directs the compiler to execute only the preprocessor phase
               of the compiler for each source file specified. The
               preprocessed output for each source file is written to a
               file with a name that corresponds to the name of the source
               file and has a .i suffix substituted for the suffix of the
               source file. The -P option is similar to the -E option,
               except that #line linenumber directives are suppressed, and
               the preprocessed source does not go to stdout. This option
               takes precedence over -h feonly, -S, and -c.

               When both the -P and -E options are specified, the last one
               specified takes precedence.

     -h feonly Limits the compiler to syntax checking. The optimizer and
               code generator are not executed. This option takes
               precedence over -S and -c.

     -S        Compiles the named source files and leaves the assembly
               language output in the corresponding files suffixed with a
               .s. If this option is used with -G or -g, debugging
               information is not generated. This option takes precedence
               over -c.

     -c        Creates a relocatable object file for each named source file
               but does not link the object files. The relocatable object
               file name corresponds to the name of the source file. The .o

               The values of phase are:

           phase                 System Phase          Command
           0 (zero)              Compiler              CC
           a                     Assembler             as
           l                     Linker                ld

               Arguments to be passed to system phases can be entered in
               either of two styles. If spaces appear within a string to be
               passed, the string is enclosed in double quotes. When double
               quotes are not used, spaces cannot appear in the string.
               Commas can appear wherever spaces normally appear; an option
               and its argument can be either separated by a comma or not
               separated. If a comma is part of an argument, it must be
               preceded by the \ character. For example, any of the
               following command lines would send -e name to the linker:

               % CC -Wl,"-e name" file.C

               % CC -Wl,-e,name file.C

               % CC -Wl,"-ename" file.C

               Because the preprocessor is built into the compiler, -Wp and
               -W0 are equivalent.

               The -Wl,-rpath ldir linker option changes the runtime
               library search algorithm to look for files in directory
               ldir. To request more than one library directory, specify
               multiple -rpath options. Note that a library may be found at
               link time with a -L option, but may not be found at run time
               if a corresponding -rpath option is not found. Also note
               that the compiler driver does not pass the -rpath option to
               the linker. You must explicitly specify -Wl when using this


                    At link time, all ldir arguments are added to the
                    executable. The dynamic linker will search these paths
                    first for shared dynamic libraries at runtime, with one
                    exception. The Linux environment variable
                    LD_LIBRARY_PATH precedes all other search paths for

           0 (zero)              Compiler              CC
           a                     Assembler             as
           l                     Linker                ld

               Because there is no separate preprocessor, -Yp and -Y0 are

   Preprocessing Options
     -C        Retains all comments in the preprocessed source code, except
               those on preprocessor directive lines. By default, the
               preprocessor phase strips comments from the source code.
               This option is useful in combination with the -P or -E

     -D macro[=def]
               Defines macro as if it were defined by a #define directive.
               If no =def argument is specified, macro is defined as 1.

               Predefined macros also exist and are described in the Cray C
               and C++ Reference Manual. Any predefined macro except those
               required by the standard can be redefined by the -D option.
               The -U option overrides the -D option when the same macro
               name is specified, regardless of the order of options on the
               command line.

     -h [no]pragma=name[:name ...]
               Enables or disables the processing of specified directives
               in the source code, where name can be the name of a
               directive or a word shown in the following table to specify
               a group of directives. More than one name can be specified.
               Multiple names must be separated by a colon and have no
               intervening spaces.

           name                  Group                 Directives affected
           all                   All                   All directives
           allinline             Inlining              inline_enable,
           allscalar             Scalar optimization   concurrent,
           allvector             Vectorization         novector, loop_info,
                                                       OpenMP accelerator

               When using this option to enable or disable individual
               directives, note that some directives must occur in pairs.
               For these directives, you must disable both directives if
               you want to disable either; otherwise, the disabling of one
               of the directives may cause errors when the other directive
               is (or is not) present in the compilation unit.

               By default, no directives are disabled.

     -I incldir
               Specifies a directory for files named in #include directives
               when the #include file names do not have a specified path.
               Each directory specified must be specified by a separate -I

               The order in which directories are searched for files named
               on #include directives is determined by enclosing the file
               name in either quotation marks ("") or angle brackets (< and

               Directories for #include "file" are searched in the
               following order:

               1. Directory of the input file.

               2. Directories named in -I options, in command-line order.

               3. Site-specific and compiler release-specific include files

               4. Directory /usr/include.

               Directories for #include <file> are searched in the
               following order:

               1. Directories named in -I options, in command-line order.

               2. Site-specific and compiler release-specific include files

               3. Directory /usr/include.

               If the -I option specifies a directory name that does not
               begin with a slash (/), the directory is interpreted as
               relative to the current working directory and not relative
               to the directory of the input file (if different from the
               3. yourdir (relative to the current working directory),
                  specified by -I yourdir.

               4. Site-specific and compiler release-specific include files

               5. Directory /usr/include.

     -M        Provides information about recompilation dependencies that
               the source file invokes on #include files and other source
               files. This information is printed in the form expected by
               make. Such dependencies are introduced by the #include
               directive. The output is directed to stdout.

     -nostdinc Stops the preprocessor from searching for include files in
               the standard directories (/usr/include/c++ and

     -U macro  Removes any initial definition of macro. Any predefined
               macro except those required by the standard can be undefined
               by the -U option. The -U option overrides the -D option when
               the same macro name is specified, regardless of the order of
               options on the command line.

               Predefined macros are described in the Cray C and C++
               Reference Manual. Macros defined in the system headers are
               not predefined macros and are not affected by the -U option.

   Linker Options
     -h [system|default]_alloc
               The -h system_alloc option causes the compiler to use the
               native malloc implementation provided by the OS. By default,
               the compiler uses a modified malloc implementation which
               offers better support for Cray XE memory needs.

               Default: default_alloc

     -h dynamic
               Directs the compiler driver to link dynamic libraries at
               runtime. This option is used to create dynamically linked
               executable files and may not be used with the -h static or
               -h shared options. Note that the preferred invocation is to
               call the generic CC command with the -dynamic option, rather
               than using this compiler specific option. See the CC(1) man

     -h [no]pgas_runtime
               The -h pgas_runtime option directs the CC compiler driver to
               link with the PGAS (coarray Fortran or UPC) runtime
               libraries. This may be necessary when the application uses
               Fortran or UPC source code.

               Directs the compiler driver to search for the specified
               object library file when linking an executable file. To
               request more than one library file, specify multiple -l

               When statically linking, the compiler driver searches for
               libraries by prepending ldir/lib on the front of libname and
               appending .a on the end of it, for each ldir that has been
               specified by using the -L option. It uses the first file it

               When dynamically linking, the library search process is
               similar to the static case, with a few differences. The
               compiler driver searches for libraries by prepending
               ldir/lib on the front of libname and appending .so on the
               end of it, for each ldir that has been specified by using
               the -L option. If a matching .so is not found, the compiler
               driver replaces .so with .a and repeats the process from the
               beginning. It uses the first file it finds.

               There is no search order dependency for libraries.

               If you specify personal libraries by using the -l command
               line option, as in the following example, those libraries
               are added before the default CCE library list. (The -l
               option is passed to the linker.)

               % cc -l mylib target.c

               When the previous command line is issued, the linker looks
               for a library named libmylib.a (following the naming
               convention) and adds it to the top of the list of default

     -L ldir   Changes the -l option search algorithm to look for library
               files in directory ldir during link time. To request more
               than one library directory, specify multiple -L options.

               The linker searches for library files in the compiler
               release-specific directories.

               Note:  Multiple -L options are treated cumulatively as if
               all ldir arguments appeared on one -L option preceding all
               -l options. Therefore, do not attempt to link functions of
               the same name from different libraries through the use of
               alternating -L and -l options.

     -o outfile
               Produces an absolute binary file named outfile. A file named
               a.out is produced by default. When this option is used in
               conjunction with the -c option and a single source file, a
               identify the type of behavior desired. There are three
               option sets, only one member of a set may be used at a time;
               however, all three sets may be used together.

               Default: auto_async_kernel:no_fast_addr:no_deep_copy

               option Set 1:

                         Execute kernels and updates synchronously, unless
                         there is an async clause present on the kernels or
                         update directive.

                         Default. Execute all kernels asynchronously
                         ensuring program order is maintained.

                         Execute all kernels and data transfers
                         asynchronously, ensuring program order is

               option Set 2:

                         Default. Use default types for addressing.

               fast_addr Attempt to use 32 bit integers in all addressing
                         to improve performance. This optimization may
                         result in incorrect behavior for some codes.

               option Set 3:

                         Default. Do not look inside of an object type to
                         transfer sub-objects. Allocatable members of
                         derived type objects will not be allocated on the

               deep_copy (Fortran only) Look inside of derived type objects
                         and recreate the derived type on the accelerator
                         recursively. A derived type object that contains
                         an allocatable member will have memory allocated
                         on the device for the member.

     -h cpu=target_system
               Specifies the target Cray system on which the absolute
               binary file is to be executed, where target_system can be
               either x86-64 or opteron (single or dual-core), barcelona or
               shanghai (quad-core), istanbul (6-core), mc8 (8-core), mc12
               (12-core), interlagos (16-core), interlagos-cu (8-compute
               unit), abudhabi (16-core) or abudhabi-cu (8-compute unit).
               one of the targeting modules (craype-mc12 or craype-
               interlagos-cu, for example). The targeting modules set
               CRAY_CPU_TARGET and define paths to the corresponding
               libraries. The compiler driver script translates
               CRAY_CPU_TARGET to the corresponding cpu=target_system
               option when calling the compiler.

               If a user wishes to override the current target_system value
               set by the module environment (via the CRAY_CPU_TARGET
               definition), they should do so by specifying
               -hcpu=target_system on the compiler command line.

     -h [no]fp_trap
               Controls whether the compiler generates code compatible with
               floating point traps being enabled.

               Default: fp_trap, if traps are enabled using the -K trap
               option, or if -Ofp[0,1] is in effect. Otherwise, the default
               is nofp_trap.

     -h ident=name
               Changes the ident name to name. This name is used as the
               module name in the object file (.o suffix) and assembler
               file (.s suffix). Regardless of whether name is specified or
               the default is used, the following transformations are
               performed on name:

               ·  All . characters in the ident name are changed to $.

               ·  If the ident name starts with a number, a $ is added to
                  the beginning of the ident name.

               The default is the file name specified on the command line.

     -h keepfiles
               Prevents the removal of the object (.o) and temporary
               assembly (.s) files after an executable is created.
               Normally, the compiler automatically removes these files
               after linking them to create an executable. Since the
               original object files are required to instrument a program
               for performance analysis, if you plan to use CrayPat to
               conduct performance analysis experiments, you can use this
               option to preserve the object files.

     -h loop_trips=[tiny|small|medium|large|huge]
               Specifies runtime loop trip counts for all loops in a
               compiled source file. This information is used to better
               tune optimizations to the runtime characteristics of the

     -h mpin   Enables or disables optimization around a selected subset of
               MPI library calls. -h mpi0 disables this option. The default
               accelerator directives. The default is -h omp_acc. For
               details, see the Cray C and C++ Reference Manual.

     -h pic, -h PIC
               Generates position independent code (PIC), which allows a
               virtual address change from one process to another, as is
               necessary in the case of shared, dynamically linked objects.
               The virtual addresses of the instructions and data in PIC
               code are not known until dynamic link time.

     -h prototype_intrinsics
               Simulates the effect of including intrinsics.h at the
               beginning of a compilation. Use this option if the source
               code does not include the intrinsics.h statement and you
               cannot modify the code. This option is off by default.

     -h [no]threadsafe
               Enables or disables the generation of threadsafe code. Code
               that is threadsafe can be used with pthreads and OpenMP.

               C code compiled with -h threadsafe (the default) cannot be
               linked with C code compiled with -h nothreadsafe.

               The default is -h threadsafe.

     -K trap=opt[,opt] ...
               Enable traps for the specified exceptions. By default, no
               exceptions are trapped. Enabling traps using this option
               also has the effect of setting -h fp_trap.

               If the specified options contradict each other, the last
               option has priority. For example, -Ktrap=none,fp is
               equivalent to -Ktrap=fp.

               This option does not affect compile time optimizations; it
               detects runtime exceptions. This option is processed only at
               link time and affects the entire program; it is not
               processed when compiling subprograms. Therefore, traps may
               be set using this command line option at the beginning of
               execution of the main program only. The program may
               subsequently change these settings by calling intrinsic or
               library procedures. Use of this option may require the
               specification of -hfp_trap when compiling other files of the

               opt       Exceptions

               denorm    Trap on denormalized operands.

               divz      Trap on divide-by-zero.

               fp        Trap on divz, inv, or ovf exceptions.

     -V        Displays compiler version information. If the command line
               specifies no source file, no compilation occurs. Version
               information consists of the product name, the version
               number, and the current date and time.

     -X  npes  Specifies the number of processing elements (PEs) that will
               be specified through aprun at job launch. The value for npes
               can range from 1 through 2**31 - 1 inclusive on Cray XE

               Ensure that you compile all object files with the same -X
               npes value and run the resulting executable with that number
               of PEs. If you use mixed -X  npes values or if the number of
               PEs provided at run time differs from the -X npes value, a
               run time error is generated.

               The number of PEs to use cannot be changed at link or run
               time. You must recompile the program with a different value
               for npes to change the number of PEs.

     For a description of #pragma directives, including OpenMP, OpenACC,
     and UPC directives, see the Cray C and C++ Reference Manual and the
     intro_pragmas(1) man page.

     For compile time, run time, and OpenMP environment variables, refer to
     the Cray C and C++ Reference Manual.

     By default, the compilation process creates an absolute binary file
     named a.out that reflects the contents of the source files and any
     referenced library functions. File a.out can then be executed on the
     target Cray compute nodes. The compiler commands accept several types
     of file arguments, as explained in the following paragraphs.

     The CC command interprets files with .C, .c, .i, .c++, .C++, .cc,
     .cxx, .CXX, or .CC suffixes as C++ source files. The source files are
     compiled, and each corresponding object code is left in a file whose
     name is that of the source file, with .o substituted for the previous
     suffix. If no options are selected to control the compilation process,
     the CC command automatically calls the linker. The linker uses file.o
     as input and produces the executable file.

     Files whose names end with .s are interpreted as Cray Assembly
     Language (CAL) source files. They are assembled, and each
     corresponding object code is left in a file. The file name is that of
     the source file, with .o substituted for .s. Again, the linker uses
     file.o as input and produces the executable file.

     Any compatible object files whose names end with .o, plus files whose
     does not translate C++ into an intermediate C form, but instead
     translates source code directly into machine code for the target

     The following summarizes the files used by the C++ compiler:

     File Name    Description
     a.out        Default name of the executable output file
     file.a       Library input file
     file.c       C++ source file
     file.C,      C++ source file
     file.CC      C++ source file
     file.C++,    C++ source file
     file.cxx,    C++ source file
     file.i       Preprocessor output file
     file.L       Pseudo-CAL listing file
     file.o       Object file
     file.s       Assembly language source file
     file.V       Report file for -h report

     craycc(1), crayftn(1), aprun(1), explain(1)

     Cray C and C++ Reference Manual

     Cray Application Developer's Environment User's Guide

     Cray Fortran Reference Manual

Man(1) output converted with man2html