lammps: enable scafacos (#47638)

* Enable Scafacos in LAMMPS
* lammps: make scafacos work with +lib

---------

Co-authored-by: Richard Berger <rberger@lanl.gov>
This commit is contained in:
Hubertus van Dam 2025-01-15 05:33:44 +01:00 committed by GitHub
parent 335fca7049
commit 0bd9c235a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -399,7 +399,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
depends_on("cxx", type="build")
# scafacos, ml-quip, qmmm require C, but not available in Spack
# ml-quip, qmmm require C, but not available in Spack
for c_pkg in (
"adios",
"atc",
@ -407,15 +407,15 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
"electrode",
"h5md",
"kim",
"mdi",
"ml-pod",
"rheo",
"scafacos",
"tools",
):
depends_on("c", type="build", when=f"+{c_pkg}")
# scafacos, ml-quip require Fortran, but not available in Spack
for fc_pkg in ("kim",):
# ml-quip require Fortran, but not available in Spack
for fc_pkg in ("kim", "scafacos"):
depends_on("fortran", type="build", when=f"+{fc_pkg}")
stable_versions = {
@ -543,6 +543,7 @@ def url_for_version(self, version):
"rheo": {"when": "@20240829:"},
"replica": {},
"rigid": {"default": True},
"scafacos": {"when": "@20210702:"},
"shock": {},
"smtbq": {"when": "@20210702:"},
"snap": {"when": "@:20210527"},
@ -596,9 +597,7 @@ def url_for_version(self, version):
"vtk": {"when": "@20210702:"},
"yaff": {"when": "@20210702:"},
# "ml-quip": {"when": "@20210702:"}, no quip package
# "scafacos": {"when": "@20210702:"}, no scafacos package
# "user-quip": {"when": "@20190201:20210527"}, no quip package
# "user-scafacos": {"when": "@20180905:20210527"}, no scafacos package
}
for pkg_name, pkg_options in supported_packages.items():
@ -741,6 +740,8 @@ def url_for_version(self, version):
with when(_n2p2_cond):
depends_on("n2p2@2.1.4:")
depends_on("n2p2+shared", when="+lib")
depends_on("scafacos", when="+scafacos")
depends_on("scafacos cflags=-fPIC cxxflags=-fPIC fflags=-fPIC", when="+scafacos+lib")
depends_on("vtk", when="+user-vtk")
depends_on("vtk", when="+vtk")
depends_on("hipcub", when="~kokkos +rocm")