Skip to content

Commit

Permalink
removing -Ofast with aocc (spack#45880)
Browse files Browse the repository at this point in the history
Co-authored-by: shbhaska <shbhaska@amd.com>
  • Loading branch information
amd-toolchain-support and shbhaska authored Aug 23, 2024
1 parent 823a2c1 commit 8b81117
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions var/spack/repos/builtin/packages/lammps/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,15 +824,20 @@ def cmake_args(self):
if spec.satisfies("%aocc"):
if spec.satisfies("+intel"):
cxx_flags = (
"-Ofast -fno-math-errno -fno-unroll-loops "
"-O3 -fno-math-errno -fno-unroll-loops "
"-fveclib=AMDLIBM -muse-unaligned-vector-move"
)
if spec.satisfies("%aocc@4.1:"):
cxx_flags += (
" -mllvm -force-gather-overhead-cost=50"
" -mllvm -enable-masked-gather-sequence=false"
)
# add -fopenmp-simd if OpenMP not already turned on
if spec.satisfies("~openmp"):
cxx_flags += " -fopenmp-simd"
cxx_flags += " -DLMP_SIMD_COMPILER -DUSE_OMP_SIMD -DLMP_INTEL_USELRT"
else:
cxx_flags = "-Ofast -mfma -fvectorize -funroll-loops"
cxx_flags = "-O3 -mfma -fvectorize -funroll-loops"
args.append(self.define("CMAKE_CXX_FLAGS_RELEASE", cxx_flags))
args.append(self.define("CMAKE_CXX_FLAGS_RELWITHDEBINFO", cxx_flags))

Expand Down

0 comments on commit 8b81117

Please sign in to comment.