NERSCPowering Scientific Discovery Since 1974

Cray C/C++ predefined _RELEASE macro returns wrong value [updated]

November 18, 2013 by Mike Stewart, NERSC USG

Status:  Reported to Cray as bug 797442, became documentation bug 805340.

Updated October 14, 2014 by Scott French, NERSC USG

According to the Sept, 2013, version of the Cray C/C++ manual at, Chapter 10, "Using Predefined Macros":




Defined as the major release level of the compiler.

_RELEASE returns the value 11 and not the major release number, currently 8.

Cray told us and we have verified that the _RELEASE_MAJOR macro will return the correct value for the major release level, but they have not formally documented this. This has caused problems with cmake for some users.

As of October 2014, Chapter 10 of the Cray C and C++ Reference Manual (S-2179-83) correctly indicates that _RELEASE_MAJOR should be used (and not _RELEASE).