AOCC Install Guide: Installing AOCC On Linux
AOCC Install Guide: Installing AOCC On Linux
Contents
• If there are failing checks then correct them (repeat any of the above steps that
you may have missed) and run prerequisites_check.sh again
• Repeat until prerequisites_check.sh displays ‘Check:PASSED’
• Note: If you have only warnings in failing checks then you can proceed if
packages mentioned in the warnings are not required for your run
• The compiler is installed, and your environment set to point to the current release of
AOCC. At any point in time you can source <compdir>/setenv_AOCC.sh to set the
environment variables for the installed compiler
Using AOCC
• source <compdir>/setenv_AOCC.sh
• To build and run a C/C++ program
o $ clang [command line options] xyz.c -o xyz
o $ ./xyz
o Optimization flags: Please read the options listed in Clang - the C, C++ Compiler guide
• To build and run Fortran programs using flang:
o $ flang [command line options] hello.f90 -o hello
o $ ./hello
o Optimization flags: Please read the options listed in Flang - the Fortran Compiler guide
Some applications may benefit from optimized libraries. AOCC is known to work seamlessly with
these libraries. It is recommended that you evaluate these libraries while building your application
with AOCC as they may help boost the performance of your application over and above the compiler
optimizations that come with AOCC.
• export LD_LIBRARY_PATH=<compdir>/aocc-compiler-2.0.0/lib:$LD_LIBRARY_PATH
• clang [command line flags] xyz.c -L<compdir>/aocc-compiler-2.0.0/lib -lamdlibm -o xyz
• ./xyz
AOCC requires few prerequisite software installs for working as expected. To quickly check if you
already have the required prerequisites you can run this script as follows
• bash <compdir>/AOCC-2.0-Compiler/AOCC-2.0-prerequisites-check.sh
Upgrading AMD LibM (Required only when upgrading AMD LibM from here )
• RHEL 7.4
• SLES 12 SP3
• Ubuntu 18.04 LTS