Skip to content

Miscellaneous topics

Using the compilers without the wrappers

Compiler module C compiler C++ compiler Fortran fixed format Fortran free format
cce craycc, clang crayCC, craycxx, clang++ crayftn crayftn
gcc gcc g++ gfortran gfortran
gcc-native gcc-12, etc. g++-12, etc. gfortran-12, etc. gfortran-12, etc.
aocc clang clang++ flang flang
rocm amdclang amdclang++ amdflang amdflang

Remarks

  • The Cray clang compilers need to be pointed to the version of gcc to use using the --gcc-toolchain=<value> option. The wrapper adds something like --gcc-toolchain=/opt/cray/pe/gcc/8.1.0/snos. Otherwise the compile will fail to find a suitable set of include files.

    TODO: Test this.

  • A good trick to figure out which options the PE wrappers add is to use the -craype-verbose flag on the command line of the wrappers.

Compiler versions

CPE cce gcc aocc amd
21.08 12.0.2 gcc/10.3.0 3.0.0 4.5.2
21.12 13.0.0 gcc/11.2.0 3.1.0 4.5.2
22.08 14.0.2 gcc/11.2.0 3.2.0 5.0.2
22.12 15.0.0 gcc/11.2.0 3.2.0 5.2.3
23.03 15.0.1 gcc/11.2.0 3.2.0 5.2.3
23.09 16.0.1 gcc/12.2.0 3.2.0 5.2.3
23.12 17.0.0 gcc-native/12.3 4.1.0 6.0.3
24.03 17.0.1 gcc-native/13.2 4.1.0 6.0.3

Finding the include files etc. for hipcc when compiling other code with the Cray compiler

export HIPCC_COMPILE_FLAGS_APPEND="--offload-arch=gfx90a $(CC --cray-print-opts=cflags)"
export HIPCC_LINK_FLAGS_APPEND=$(CC --cray-print-opts=libs)

Compilers compared