add openmp_max_threads variant and enable avx 512 optimizations for icelake (#37379)

* add openmp_max_threads variant and enable avx 512 optimizations for icelake and cascadelake

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>

* revert manual enabling of avx512 for icelake and cascadelake

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>

---------

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>
This commit is contained in:
Andrey Parfenov 2023-05-11 16:23:04 +02:00 committed by GitHub
parent dc58449bbf
commit c0f020d021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,10 @@ class Gromacs(CMakePackage, CudaPackage):
"+mdrun_only", when="@2021:", msg="mdrun-only build option was removed for GROMACS 2021."
)
variant("openmp", default=True, description="Enables OpenMP at configure time")
variant("openmp_max_threads", default="none", description="Max number of OpenMP threads")
conflicts(
"+openmp_max_threads", when="~openmp", msg="OpenMP is off but OpenMP Max threads is set"
)
variant(
"sve",
default=True,
@ -570,6 +574,11 @@ def cmake_args(self):
else:
options.append("-DGMX_CYCLE_SUBCOUNTERS:BOOL=OFF")
if "+openmp" in self.spec and self.spec.variants["openmp_max_threads"].value != "none":
options.append(
"-DGMX_OPENMP_MAX_THREADS=%s" % self.spec.variants["openmp_max_threads"].value
)
if "^mkl" in self.spec:
# fftw-api@3 is provided by intel-mkl or intel-parllel-studio
# we use the mkl interface of gromacs