lammps: compiler flags for Intel compiler on AMD zen+ procs (#31183)
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
This commit is contained in:
parent
eec78f7702
commit
e046dc3ca4
1 changed files with 9 additions and 0 deletions
|
@ -4,6 +4,8 @@
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
|
|
||||||
|
import archspec
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
|
@ -530,6 +532,13 @@ def cmake_args(self):
|
||||||
cxx_flags = '-Ofast -mfma -fvectorize -funroll-loops'
|
cxx_flags = '-Ofast -mfma -fvectorize -funroll-loops'
|
||||||
args.append(self.define('CMAKE_CXX_FLAGS_RELEASE', cxx_flags))
|
args.append(self.define('CMAKE_CXX_FLAGS_RELEASE', cxx_flags))
|
||||||
|
|
||||||
|
# Overwrite generic cpu tune option
|
||||||
|
cmake_tune_flags = archspec.cpu.TARGETS[spec.target.name].optimization_flags(
|
||||||
|
spec.compiler.name,
|
||||||
|
spec.compiler.version
|
||||||
|
)
|
||||||
|
args.append(self.define('CMAKE_TUNE_FLAGS', cmake_tune_flags))
|
||||||
|
|
||||||
lammps_sizes = self.spec.variants['lammps_sizes'].value
|
lammps_sizes = self.spec.variants['lammps_sizes'].value
|
||||||
args.append(self.define('LAMMPS_SIZES', lammps_sizes))
|
args.append(self.define('LAMMPS_SIZES', lammps_sizes))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue