Miscellaneous Options
Descriptions of miscellaneous options.
-h cpu=target_system
Specifies the Cray system on which the absolute binary file is to be executed, where target_system can be either sandybridge, ivybridge, haswell, broadwell, mic-knl, x86-skylake, x86-cascadelake, x86-naples, or arm-thunderx2.
Rather than setting this option directly, users should load one of the targeting modules (craype-x86-skylake, 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= option when calling the compiler.
If the target_system is set during compilation of any source file, it must also be set to that same target during linking and loading. 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 craylibs_arch_override
Forces Craymath to honor the processor architecture specified by the -h cpu option. Processor architecture is typically specified by loading one of the targeting modules, e.g., craype-sandybridge, but can be overriden at link time by using the -h cpu option. If the CRAYLIBS_ARCH_OVERRIDE environment variable is specified, it takes precedence over this option.
-h [no]fp_trap
Default: fp_trap if traps are enabled using the -K trap option, or if -hfp[0,1] is in effect. Otherwise, the default is nofp_trap.
Controls whether the compiler generates code that is compatible with floating-point traps.
-h ident=name
Default: -h ident=File name specified on the command line
- All
.characters in ident name are changed to$. - If the ident name starts with a number, a
$is added to the beginning of the ident name.
-h [no]heap_allocate
Default: noheapallocate
-h heap_allocate forces all variable-size local arrays and temporary arrays to be allocated on the heap. heap_allocate directives are ignored.
-h noheap_allocate places variable-size local arrays and temporary arrays on the stack, except where the heap_allocate directive applies.
-h keepfiles
Default: off
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 CrayPat is to be used to conduct performance analysis experiments, use this option to preserve the object files.
-h keep_frame_pointeropts
Default: off
Retain call stack information back to main entry point for CrayPat performance sampling. Prevents call stack frame from being optimized out of a function so CrayPat performance sampling is able to trace call stack back to entry point.
-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 optimize the runtime characteristics of the application.
-h network=nic
Specifies the target machine's system interconnection network. Currently, supported values for nic are gemini and aries.
Rather than setting this option directly, users should load one of the network modules (craype-network-aries for example). The network modules cause the corresponding compiler option to be set and define paths to the corresponding libraries.
-h pic, -h PIC
Generate 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. For the Cray implementation, the pic and PIC options have the same effect and should be used to compile codes using more than 2GB of static memory, or for creating dynamically linked libraries.
-h prototype_intrinsics
Default: off
Simulates the effect of including intrinsics.h at the beginning of a compilation. Use this option if the source code does not include intrinsics.h and the code cannot be modified.
See Intrinsic Functions.
-h [no]threadsafe
Default: -h threadsafe
Enables or disables the generation of threadsafe code. Code that is threadsafe can be used with pthreads and OpenMP. This option is not binary-compatible with code generated by Cray C 8.1 or Cray C++ 5.1 and earlier compilers.
Users who need binary compatibility with previously compiled code can use -h nothreadsafe, which causes the compiler to be compatible with Cray C 8.1 or Cray C++ 5.1 and earlier compilers at the expense of not being threadsafe. C or C++ code compiled with -h threadsafe (the default) cannot be linked with C or C++ code compiled with -h nothreadsafe or with code compiled with a Cray C 8.1, Cray C++ 5.1, or earlier compiler.
-K trap=exceptions
Default: off
Enable traps for the specified exceptions. By default, no exceptions are trapped. Enabling traps by using this option also has the effect of setting -h fp_trap.
If the specified options contradict each other, the last option predominates. For example, -K trap=none,fp is equivalent to -Ktrap=fp.
This option does not affect compile time optimizations; it detects run time exceptions.
This option is processed only at link time and affects the entire program; it is not processed when compiling subprograms. Use this command line option to set traps beginning with execution of the main program. The program may subsequently change these settings by calling intrinsic or library procedures. If this option is used, -hfp_trap may need to be specified when other files of the application are compiled.
- denorm
- Trap on denormalized operands.
- divz
- Trap on divide-by-zero.
- fp
- Trap on divz, inv, or ovf exceptions.
- inexact
- Trap on inexact result (i.e., rounded result). Enabling traps for inexact results is not recommended.
- inv
- Trap on invalid operation.
- none
- Disables all traps (default).
- ovf
- Trap on overflow (i.e., the result of an operation is too large to be represented).
- unf
- Trap on underflow (i.e., the result of an operation is too small to be represented).
-V
Directs each compilation phase to send a message containing version information to the stderr file.This consists of the product name, the version number, and the current date and time.
Unlike other command-line options, this option can be specified without specifying an input file name. If the command line specifies no source file, no compilation occurs.
--version
Directs each compilation phase to send a message containing version information to stdout.This consists of the product name, the version number, and the current date and time.
Unlike other command-line options, this option can be specified without specifying an input file name. If the command line specifies no source file, no compilation occurs.
-X npes
Specifies the number of UPC threads for a UPC source file compiled under the UPC static threads environment. The npes value must match the number of processing elements (PEs) that will be specified through aprun at job launch. Ensure that all object files are compiled using the same npes value. When using mixed npes values or if the number of PEs provided at run time differs from the -X npes value, a run time error will be received.