Install AMD AOCC C C++ Fortran compiler

The no-cost AMD AOCC compiler is tuned for AMD CPUs, akin to how Intel oneAPI is tuned for Intel CPUs. Install the “.rpm” file after downloading on a RHEL-based Linux like:

dnf install ./aocc-compiler*.x86_64.rpm

Create a source script “~/” like:


[[ ! -d ${root} ]] && echo "ERROR: ${root} not found" && exit 1

source ${root}/

export CC=clang CXX=clang++ FC=flang

export MPI_ROOT=

flang --version

To use the AOCC compiler:

source ~/