gromacs: default to external blas & lapack (#40490)
* gromacs: default to external blas & lapack * drop vendored lapack/blas altogether
This commit is contained in:
parent
51275df0b1
commit
9b8fb413c3
1 changed files with 8 additions and 28 deletions
|
@ -142,8 +142,6 @@ class Gromacs(CMakePackage, CudaPackage):
|
||||||
msg="GMX_RELAXED_DOUBLE_PRECISION option removed for GROMACS 2021.",
|
msg="GMX_RELAXED_DOUBLE_PRECISION option removed for GROMACS 2021.",
|
||||||
)
|
)
|
||||||
variant("hwloc", default=True, description="Use the hwloc portable hardware locality library")
|
variant("hwloc", default=True, description="Use the hwloc portable hardware locality library")
|
||||||
variant("lapack", default=False, description="Enables an external LAPACK library")
|
|
||||||
variant("blas", default=False, description="Enables an external BLAS library")
|
|
||||||
variant("cycle_subcounters", default=False, description="Enables cycle subcounters")
|
variant("cycle_subcounters", default=False, description="Enables cycle subcounters")
|
||||||
|
|
||||||
variant("cp2k", default=False, description="CP2K QM/MM interface integration")
|
variant("cp2k", default=False, description="CP2K QM/MM interface integration")
|
||||||
|
@ -151,16 +149,6 @@ class Gromacs(CMakePackage, CudaPackage):
|
||||||
"+cp2k", when="@:2021", msg="CP2K QM/MM support have been introduced in GROMACS 2022"
|
"+cp2k", when="@:2021", msg="CP2K QM/MM support have been introduced in GROMACS 2022"
|
||||||
)
|
)
|
||||||
conflicts("+shared", when="+cp2k", msg="Enabling CP2K requires static build")
|
conflicts("+shared", when="+cp2k", msg="Enabling CP2K requires static build")
|
||||||
conflicts(
|
|
||||||
"~lapack",
|
|
||||||
when="+cp2k",
|
|
||||||
msg="GROMACS and CP2K should use the same lapack, please disable bundled lapack",
|
|
||||||
)
|
|
||||||
conflicts(
|
|
||||||
"~blas",
|
|
||||||
when="+cp2k",
|
|
||||||
msg="GROMACS and CP2K should use the same blas, please disable bundled blas",
|
|
||||||
)
|
|
||||||
conflicts("%intel", when="@2022:", msg="GROMACS %intel support was removed in version 2022")
|
conflicts("%intel", when="@2022:", msg="GROMACS %intel support was removed in version 2022")
|
||||||
conflicts("%gcc@:8", when="@2023:", msg="GROMACS requires GCC 9 or later since version 2023")
|
conflicts("%gcc@:8", when="@2023:", msg="GROMACS requires GCC 9 or later since version 2023")
|
||||||
conflicts(
|
conflicts(
|
||||||
|
@ -255,8 +243,8 @@ class Gromacs(CMakePackage, CudaPackage):
|
||||||
depends_on("cmake@3.16.0:3", type="build", when="%fj")
|
depends_on("cmake@3.16.0:3", type="build", when="%fj")
|
||||||
depends_on("cuda", when="+cuda")
|
depends_on("cuda", when="+cuda")
|
||||||
depends_on("sycl", when="+sycl")
|
depends_on("sycl", when="+sycl")
|
||||||
depends_on("lapack", when="+lapack")
|
depends_on("lapack")
|
||||||
depends_on("blas", when="+blas")
|
depends_on("blas")
|
||||||
depends_on("gcc", when="%oneapi ~intel_provided_gcc")
|
depends_on("gcc", when="%oneapi ~intel_provided_gcc")
|
||||||
depends_on("gcc", when="%intel ~intel_provided_gcc")
|
depends_on("gcc", when="%intel ~intel_provided_gcc")
|
||||||
|
|
||||||
|
@ -504,21 +492,13 @@ def cmake_args(self):
|
||||||
if "+cuda" in self.spec:
|
if "+cuda" in self.spec:
|
||||||
options.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix)
|
options.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix)
|
||||||
|
|
||||||
if "+lapack" in self.spec:
|
|
||||||
options.append("-DGMX_EXTERNAL_LAPACK:BOOL=ON")
|
options.append("-DGMX_EXTERNAL_LAPACK:BOOL=ON")
|
||||||
if self.spec["lapack"].libs:
|
if self.spec["lapack"].libs:
|
||||||
options.append(
|
options.append("-DGMX_LAPACK_USER={0}".format(self.spec["lapack"].libs.joined(";")))
|
||||||
"-DGMX_LAPACK_USER={0}".format(self.spec["lapack"].libs.joined(";"))
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
options.append("-DGMX_EXTERNAL_LAPACK:BOOL=OFF")
|
|
||||||
|
|
||||||
if "+blas" in self.spec:
|
|
||||||
options.append("-DGMX_EXTERNAL_BLAS:BOOL=ON")
|
options.append("-DGMX_EXTERNAL_BLAS:BOOL=ON")
|
||||||
if self.spec["blas"].libs:
|
if self.spec["blas"].libs:
|
||||||
options.append("-DGMX_BLAS_USER={0}".format(self.spec["blas"].libs.joined(";")))
|
options.append("-DGMX_BLAS_USER={0}".format(self.spec["blas"].libs.joined(";")))
|
||||||
else:
|
|
||||||
options.append("-DGMX_EXTERNAL_BLAS:BOOL=OFF")
|
|
||||||
|
|
||||||
if "+cp2k" in self.spec:
|
if "+cp2k" in self.spec:
|
||||||
options.append("-DGMX_CP2K:BOOL=ON")
|
options.append("-DGMX_CP2K:BOOL=ON")
|
||||||
|
|
Loading…
Reference in a new issue