Skip to content

Instantly share code, notes, and snippets.

@scivision
Last active September 10, 2026 22:01
Show Gist options
  • Select an option

  • Save scivision/392c61d9f35f7c15aa763dbee34bdaf6 to your computer and use it in GitHub Desktop.

Select an option

Save scivision/392c61d9f35f7c15aa763dbee34bdaf6 to your computer and use it in GitHub Desktop.
AOCC AMD compiler source script
# Activate AOCC compilers by
# source aocc.sh
version=6.0.0
root=/opt/AMD/aocc-compiler-${version}
[[ ! -d ${root} ]] && echo "ERROR: ${root} not found" && exit 1
source ${root}/setenv_AOCC.sh
# setenv_AOCC doesn't set these
if [[ ${version%%.*} -ge 6 ]]; then
export CC=aoc CXX=aoc++ FC=aof
else
export CC=clang CXX=clang++ FC=flang
fi
export CXXFLAGS=
export MPI_ROOT=
$FC --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment