Note: The options are for the
aocc.py file included in this repository and are
not the same as those for the repository at CSCS.
Note about the compilers¶
- AMD/ROCm 5.0.2 is based on LLVM 14.0.0
The cpeAMD toolchain supports the common toolchain options, the additional AMD flags and some additional Cray-specific flags, two of which are really just redefinitions of standard compiler flags.
Default toolchain options that may not behave as expected¶
rpath: rpath linking in EasyBuild has not been properly tested in the HPE Cray PE.
unroll: As it is not clear from the docunentation for the Fortran compiler which options should be set to enable or disable (if any at all)
AMD-specific toolchain options¶
|Enable Link Time Optimization (in the default 'full' mode)
|Enable LTO for offload compilation (in the default 'full' mode)
cpeAMD-specific flags (coming from the HPE Cray PE compiler wrappers)¶
|Generate dynamically linked executable (default: True)
|Alternate Cray-MPICH library for MT support (default: False)
mpich-mt: Directs the driver to link in an alternate version of the Cray-MPICH library which provides fine-grained multi-threading support to applications that perform MPI operations within threaded regions. (default: False)
Two further options trigger different compiler flags than in the GCC toolchain:
optarch but have otherwise the same meaning.
Mapping of options onto compiler flags¶
Compiler optimization level¶
The common options translate into:
|-O2 -fvectorize -fslp-vectorize
Other optimization-related options (and see also parallelism below):
Floating point precision¶
The decision of our mapping is based partly on information from Cray and partly on looking through various manuals on Clang.
strict: We simply stick to
-ffp-model=strict. This automatically disables all of the
-ffast-mathenablements so there is no need to add
-fno-fast-math. Note that at this level, fused multiply adds are disabled.
precise: We stick to
- Default level: Currently the same as
loose: Set to
-ffp-model=fastbut try to turn on again a few safeguards:
veryloose: Set to
Note: Very recnet versions of clang add
may be interesting to add to
loose but is not
yet supported by AOCC 2.2.
|-ffp-model=fast -fhonor-infinities -fhonor-nans -fsigned-zeros
Other floating-point optimisation and accuracy-related flags:
|Not supported in clang/flang
Common parallelism-related options¶
|False: -fno-vectorize -fno-slp-vectorize
|True: -fvectorize -fslp-vectorize
|-ftree-switch-conversion -floop-interchange -floop-strip-mine -floop-block
|No compiler flags
Code generation and linking options¶
|No flag as this is currently the only mode supported
|Pack the linker options as comma separated list (default: False)
|Use RPATH wrappers when --rpath is enabled in EasyBuild configuration (default: True)
rpath has not yet been checked and is likely broken. There is a better way to do this in the /hPE Cray PE
than what EasyBuild does as the wrappers already support rpath linking.