Cray Compiler

Version System A System B System C Notes
9.1.3 + + + Installed in March 2020 (Clang 9 based)
9.1.3 classic + + + Installed in March 2020
9.0.2 + + + Installed in October 2019 (Clang 9 based)
9.0.2 classic + + + Installed in October 2019
8.7.9 + (default) + (default) + (default) Installed in March 2019
8.7.6 + + + Installed in Dedember 2018
8.6.5 + + + Installed in March 2018
8.6.3 + Installed in December 2017
8.6.1 + Installed in August 2017
8.5.8 + Installed in March 2017
8.5.5 + + + Installed in Dedember 2016
8.5.2 + Installed in October 2016

+ : Available for use
― : Not available for use

Version Modulefile Name
9.1.3 cce/9.1.3
9.1.3 classic cce/9.1.3-classic
9.0.2 cce/9.0.2
9.0.2 classic cce/9.0.2-classic
8.7.9 cce/8.7.9
8.7.6 cce/8.7.6
8.6.5 cce/8.6.5
8.6.3 cce/8.6.3
8.6.1 cce/8.6.1
8.5.8 cce/8.5.8
8.5.5 cce/8.5.5
8.5.2 cce/8.5.2

When logging in to the System A, Cray Compiler is set as default:

$ module list
Currently Loaded Modulefiles:
  x)  cce/8.3.0   x) PrgEnv-cray/5.2.14

When logging in to the System B,C, Intel Compiler is set as default. Thus, you need to switch from the Intel Compiler to the Cray Compiler as below:

$ module switch PrgEnv-intel PrgEnv-cray

The default version of Intel Compiler is as listed above.
To switch the version of Cray Compiler to another, execute the module command with the PrgEnv-cray loaded as below:

$ module switch cce/8.0.4 cce/8.0.6

To automatically execute a command when logging in to the System, specify such command in the login shell startup-file by following Setting Up System.
For details on the module command, see Modules.

The architecture of Cray C Compiler 9 and Cray C++ Compiler 9 has moved from proprietary to Clang-based. The compile options of Clang-based version are much different from the previous versions'. Major options are shown in Compile Options. Note that Cray Fortran Compiler 9 continues to be the proprietary-based and its options are same as the previous versions.

At version 9, the proprietary-based Cray C Compiler 9 and Cray C++ Compiler 9 are also provided, called the classic version. The compile options of classic version are same as the previous versions. The module name of classic version is like that: cce/(version name)_classic.

When you switch to Cray Compiler 9, the Clang-based version is loaded first. If you want to use the classic version, switch the loaded cce module from Clang-based to classic version.

See the below document. (Japanese version only)

CDT 19.09

Cray Compiler 8.6.1 is not available by merely switching the version of current cce module to 8.6.1.

craype and cray-mpich (in system BC, cray-impi), and cray-libsci also need to be switched as shown below.

$ module switch craype/2.5.12
$ module switch cray-mpich/7.6.0
$ module switch cray-libsci/17.06.1

PrgEnv command is useful as switching those modules by one command.

$ PrgEnv cce 8.6.1

The craype and cray-mpich (in system BC, cray-impi), and cray-libsci also need to be switched as same as the case of 8.6.1. PrgEnv command is useful as switching those modules. (Sorry, this command is available only in system A.)

Language Commands Operands
Fortran ftn ftn [sequence_of_options] sequence_of_files
C cc cc [sequence_of_options] sequence_of_files
C++ CC CC [sequence_of_options] sequence_of_files

Option Purpose
-o FILENAME Specifies the name of the object file.
-h omp Enables compiler recognition of OpenMP directives. (Enables by default.)
-h noomp Disables compiler recognition of OpenMP directives.
-h autothread Enables autothreading.
-O0/-O1/-O2/-O3 Performs general optimization at four levels. (The default is 2.)
-h msgs Displays optimization messages.
-h negmsgs Displays messages to explain why optimizations did not occur in a given instance.
-h add_paren Performs a calculation in order from left to right when sequencing an operation by operators; +, -, and *.
-h pic Compiles codes using more than 2GB of static memory. (use -dynamic together)
-dynamic Links libraries dynamically.
-g Generates debug information.

Option Purpose
-ra Generates a report.
-m2 Displays all warning messages.
-eI Considers that using an undefined variable is an error.
-Rb Defines an array out of bounds error.
-en Displays information on non-standard functions.
-e0 Initializes all undefined local stack variables to 0. If a user variable is of type character, it is initialized to NUL.
-ez Initializes to 0 when allocating memory dynamically by an ALLOCATE statement.
-f fixed Specifies that Fortran source programs are written in fixed source form.
-f free Specifies that Fortran source programs are written in free source form.
-em Enables modules.
-h byteswapio Supports the big-endian file.
-ev Supports when the total number of local variable within subroutine exceeds 2GB.
-G1/-G2/-Gfast Generates debug information with optimization.

Option Purpose
-h list=a Generates a report.
-h zero Initializes all undefined local stack variables to 0.

The below options are of Clang, so the details of function of options may differ from the classics'.

Option Purpose
-o FILENAME Specifies the name of the object file.
-fopenmp Enables compiler recognition of OpenMP directives. (Disables by default.)
-O0/-O1/-O2/-O3 Performs general optimization at four levels(-O0 by default) Specify "-O3 -ffast-math" to be equivalent to -O3 of classic version.
-ffast-math Tolerant for minute errors of floating point calculation to perform aggressive optimizations.
-fsave-optimization-record Saves optimization messages to a file.
-mcmodel=medium Compiles codes using more than 2GB of static memory. (use -dynamic together)
-dynamic Links libraries dynamically.(Enables by default.)
-static Links libraries statically.
-g Generates debug information.
-Wall Displays warning messages.

Clang Cray Fortran Compiler 9 continues to be the proprietary-based (not Flang) and its options are same as Compile Options (classic version).

$ ftn test.f90           # For Fortran
$ cc test.c              # For C
$ CC test.cpp            # For C++
$ tssrun ./a.out         # Executing

$ ftn -h autothread -h noomp test.f90
$ tssrun -A p=1:t=4:c=4 ./a.out # Executing with the number of parallels = 4

  • classic version

    $ cc -h omp test.c
  • Clang version

    $ cc -fopenmp test.c
$ tssrun -A p=1:t=8:c=8 ./a.out # Executing with the number of parallels = 8

Cray Fortran compiler outputs messages, that indicate important information or programming error, in the format below.

ftn-XXX crayftn: YYY MAIN, File = File name, Line = Line number, Colum = Column number
Message body
  • XXX : Message serial number
  • YYY : Type of message(ERROR/WARNING/CAUTION/NOTE/COMMENT/ANSI)

ftn-1197 crayftn: ERROR MAIN, File = test.f90, Line = 27, Column = 28
  The array subscript for dimension 2 does not fall within the defined range.

Cray C/C++ Compiler outputs messages in the following format when indicating important information or programming errors:

CC-XXX craycc: YYY File = File name, Line = Line number
Message body
  • XXX : Message serial number

  • YYY : Type of message (ERROR/WARNING/CAUTION/NOTE/COMMENT)

  • Examples

CC-175 craycc: WARNING File = test.c, Line = 27
  The indicated subscript is out of range.

Use the explain command to see details of the message that indicate when compiling.

$ explain ftn-XXX   (Fortran)
$ explain CC-XXX   (C/C++)

$ explain ftn-1197
Error: The array subscript for dimension %d does not fall within the defined range.
An array reference was encountered where a subscript was out of bounds for
the array.  (The rest is omitted.)

  • Q-1: An error like below occurs when compiling.

    sample.f90:32: relocation truncated to fit: R_X86_64_32S against `.bss'
    sample.f90:33: additional relocation overflows omitted from the output
  • A-1: This message indicates that the memory usage of the program may exceed 2GB. Please specify the -h pic -dynamic option when compiling.

  • Q-2: The following error occurs when compiling.

    sample.s:837: Error: 0x9ab5c0f0 out range of signed 32bit displacement
  • A-2: This message indicates that the memory usage of local variable within the Fortran subroutine may exceed 2GB. Please specify the -ev option when compiling.

  • Q-3: The following error occurs when writing the CONVERT specifier in the OPEN statement with Cray Fortran.

    ftn-73 crayftn: ERROR MAIN, File = sample.f90, Line = 6, Column = 30
      This control item specifier is not allowed for this I/O statement.
  • A-3: The CONVERT specifier in OPEN statement does not exist in Fortran standards, and is not supported by Cray Fortran compiler. Thus both file formats(big-endian and little-endian) cannot be loaded in the same program by Cray Compiler.

  • Q-4: The following error occurs when executing.

    lib-4211 : UNRECOVERABLE library error
      A WRITE operation tried to write a record that was too long.
    Encountered during a sequential formatted WRITE to unit 11
    Fortran unit 11 is connected to a sequential formatted text file: "fort.11"
     Current format:  1000 FORMAT (1000(f7.5,1x))
  • A-4: This error occurs because it sets 1024 characters per line of output restriction by default in the Cray Fortran compiler. Please specify the number of characters per line (e.g., recl=2048) by using the RECL specifier in the OPEN statement.

  • Q-5: The following error occurs when executing an MPI program including “MPI_LONG_DOUBLE”.

    MPI_Irecv(110): Null Datatype pointer
  • A-5: Cray Compiler does not support “MPI_LONG_DOUBLE”, please use “MPI_DOUBLE”. When using MPI in the System A, Intel Compiler (PrgEnv-intel) and GNU compiler (PrgEnv-gnu) support “MPI_LONG_DOUBLE”.

Library System A System B,C
Cray MPI library +
Cray IntelMPI library (wrapper for cray env.) +

The following numerical libraries are available when using Cray Compiler in the System A,B,C. For details on how to use each library, see each library’s page.

Library System A System B,C
Cray LibSci Library + +
IMSL Library AU

+: Available for all users
AU: Available for academic users only
― : Not available for use

There are restrictions for available combinations of Cray compilers and libraries. The following combinations of Cray compiler modules and Cray MPICH modules, and Cray compiler modules and Cray LibSci modules, can be loaded at the same time.

  • cce and cray-mpich
mpi\cce 8.4.6 8.5.2 8.5.5 8.5.8 8.6.1 8.6.3 8.6.5 8.7.6 8.7.9
7.3.3 x x x x x x x x
7.4.2 x x x x x x
7.5.0 x x x x x x
7.5.3 x x x x x x
7.6.0 x x x x
7.6.3 x x x x
7.7.0 x x x x
7.7.3 x x x x
7.7.6 x x x x
  • cce and cray-libsci
libsci\cce 8.4.6 8.5.2 8.5.5 8.5.8 8.6.1 8.6.3 8.6.5 8.7.6 8.7.9
16.03.1
16.07.1 x
16.11.1 x
16.11.1 x
17.06.1 x x x x
17.09.1 x x x x
18.03.1 x x x x
18.07.1 x x x x
19.02.1 x x x x

If you load modules excluding the above combinations, you cannot compile your program with an error like the following.

Error:
cray-mpich 7.7.6 is not compatible with cce 8.5.8.
Either switch to cce/8.6.0 or later, or switch to cray-mpich earlier than 7.6.0.

The release notes for CCE 8.6 and later are not provided in book style. Please type $ module help cce/<version> to see the release note for each version.


Copyright © Academic Center for Computing and Media Studies, Kyoto University, All Rights Reserved.