AOCC is AMD’s compiler which is aimed at optimizing the performance of programs running on AMD processors. It offers C/C++/Fortran compilers and is based on the LLVM compiler series. When using the AOCC compilers, certain optimization flags will be different when compared to GCC. Also, it was found in testing that certain code bases are incompatible with LLVM-based compilers like AOCC. If any compilation issues are encountered, it is recommended to use the GCC compiler.
To use AOCC 4.1.0, the appropriate module must first be loaded:
login:~> module load aocc/4.1.0
If MPI is required, it will only be necessary to load:
login:~> module load openmpi/4.1.5/aocc/4.1.0
The following table summarizes the compilers that are available for use after loading the module.
AOCC and OpenMPI Compilers
Language | GCC Compiler | MPI Compiler |
C | clang | mpicc |
C++ | clang++ | mpic++ |
Fortran 77 | flang | mpif77 |
Fortran 90 | flang | mpif90 |
Many compilations often have dependencies for mathematical library dependencies. For AMD AOCC, it is recommended to use the AOCL library. This library can be loaded with:
login:~> module load aocl/4.1
Unlike GCC 13.2.0 static compilations, most compilations that involve AOCL use dynamic linking. For these situations use the -L/nfs/apps/Libraries/AMD/aocl/4.1/pre-compiled flag.
BLAS/LAPACK
For BLAS, link against the BLIS library with -lblis-mt. For LAPACK, link against the FLAME library with -lflame.
FFTW
The multi-threaded AOCL FFTW library can be linked against using -lfftw3 -lfftw3_omp.
scaLAPACK
The AOCL scaLAPACK library can be linked against using -lscalapack.