The AMD Optimizing C/C++ Compiler (AOCC) is a high-performance compiler suite designed specifically for AMD processors on the SeaWulf computing environments. AOCC provides advanced optimization techniques tailored for AMD EPYC processors, delivering enhanced performance for scientific and technical applications running on AMD hardware. This compiler suite is built on the LLVM/Clang infrastructure and incorporates AMD-specific optimizations that leverage the unique architecture of AMD CPUs.
Loading AOCC
- module
aocc/3.2.0 - module
aocc/4.0.0 - module
aocc/4.2.0 - module
openmpi/aocc4.2/4.1.5 - module
openmpi/aocc4.0/4.1.5 - module
mvapich2/aocc4.2/2.3.7
which after loading.Commands
clangC Compilerclang++C++ CompilerflangFortran Compilermpicc (OpenMPI)AOCC C compiler wrappermpicxx (OpenMPI)AOCC C++ compiler wrappermpifort (OpenMPI)AOCC Fortran compiler wrappermpicc (MVAPICH2)AOCC C compiler wrappermpicxx (MVAPICH2)AOCC C++ compiler wrappermpif90 (MVAPICH2)AOCC Fortran compiler wrapper
Example usage
Load AOCC
module load aocc/4.2.0
Load AOCC with OpenMPI
module load aocc/4.2.0 module load openmpi/aocc4.2/4.1.5
Load AOCC with MVAPICH2
module load aocc/4.2.0 module load mvapich2/aocc4.2/2.3.7
Verify compiler location
which clang
Compile with AOCC compilers
clang myprogram.c -o myprogram clang++ myprogram.cpp -o myprogram flang myprogram.f90 -o myprogram
Compile MPI programs with wrapper scripts
mpicc mpi_program.c -o mpi_program mpicxx mpi_program.cpp -o mpi_program mpifort mpi_program.f90 -o mpi_program mpif90 mpi_program.f90 -o mpi_program
Optimization examples
clang -O3 myprogram.c -o myprogram clang -Ofast myprogram.c -o myprogram clang -march=znver3 myprogram.c -o myprogram clang -O3 -fvectorize -Rpass=loop-vectorize myprogram.c -o myprogram
Profile-guided optimization
clang -O3 -fprofile-instr-generate myprogram.c -o myprogram ./myprogram llvm-profdata merge -output=myprogram.profdata default.profraw clang -O3 -fprofile-instr-use=myprogram.profdata myprogram.c -o myprogram
Link AMD math library
clang -O3 -march=znver3 myprogram.c -o myprogram -lamdlibm
Aggressive inlining
clang -O3 -finline-functions -mllvm -inline-threshold=1000 myprogram.c -o myprogram
Availability
AOCC is available on: SeaWulf.