heffte: update versions and arch flags (#36095)
* update versions and arch flags * style update * more style issues * fix hashes and testing problem * return the old versions, but they are really bad * fix style --------- Co-authored-by: Gerald Ragghianti <gerald@ragghianti.com>
This commit is contained in:
parent
b28e9e651d
commit
7e981d83fd
1 changed files with 33 additions and 19 deletions
|
@ -13,9 +13,9 @@
|
||||||
class Heffte(CMakePackage, CudaPackage, ROCmPackage):
|
class Heffte(CMakePackage, CudaPackage, ROCmPackage):
|
||||||
"""Highly Efficient FFT for Exascale"""
|
"""Highly Efficient FFT for Exascale"""
|
||||||
|
|
||||||
homepage = "https://bitbucket.org/icl/heffte"
|
homepage = "https://github.com/icl-utk-edu/heffte/"
|
||||||
url = "https://bitbucket.org/icl/heffte/get/v1.0.tar.gz"
|
url = "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.3.0.tar.gz"
|
||||||
git = "https://bitbucket.org/icl/heffte.git"
|
git = "https://github.com/icl-utk-edu/heffte/"
|
||||||
|
|
||||||
maintainers("mkstoyanov")
|
maintainers("mkstoyanov")
|
||||||
tags = ["e4s", "ecp"]
|
tags = ["e4s", "ecp"]
|
||||||
|
@ -23,13 +23,29 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
|
||||||
test_requires_compiler = True
|
test_requires_compiler = True
|
||||||
|
|
||||||
version("develop", branch="master")
|
version("develop", branch="master")
|
||||||
version("2.3.0", sha256="27c0a8da8f7bc91c8715ecb640721ab7e0454e22f6e3f521fe5acc45c28d60a9")
|
version("2.3.0", sha256="63db8c9a8822211d23e29f7adf5aa88bb462c91d7a18c296c3ef3a06be8d6171")
|
||||||
version("2.2.0", sha256="aff4f5111d3d05b269a1378bb201271c40b39e9c960c05c4ef247a31a039be58")
|
version("2.2.0", sha256="332346d5c1d1032288d09839134c79e4a9704e213a2d53051e96c3c414c74df0")
|
||||||
version("2.1.0", sha256="527a3e21115231715a0342afdfaf6a8878d2dd0f02f03c92b53692340fd940b9")
|
version("2.1.0", sha256="63b8ea45a220afc4fa0b14769c0dd291e614a2fe9d5a91c50d28f16ee29b3f1c")
|
||||||
version("2.0.0", sha256="12f2b49a1a36c416eac174cf0cc50e729d56d68a9f68886d8c34bd45a0be26b6")
|
version(
|
||||||
version("1.0", sha256="0902479fb5b1bad01438ca0a72efd577a3529c3d8bad0028f3c18d3a4935ca74")
|
"2.0.0",
|
||||||
version("0.2", sha256="4e76ae60982b316c2e873b2e5735669b22620fefa1fc82f325cdb6989bec78d1")
|
sha256="b575fafe19a635265904ca302d48e778341b1567c055ea7f2939c8c6718f7212",
|
||||||
version("0.1", sha256="d279a03298d2dc76574b1ae1031acb4ea964348cf359273d1afa4668b5bfe748")
|
deprecated=True,
|
||||||
|
)
|
||||||
|
version(
|
||||||
|
"1.0",
|
||||||
|
sha256="00e66cdff664ba90eeb26b4824f2a7341ba791b1d7220ece8180aba7623d36d5",
|
||||||
|
deprecated=True,
|
||||||
|
)
|
||||||
|
version(
|
||||||
|
"0.2",
|
||||||
|
sha256="6e606aa9de91912925ec49f463de4369459e509e0e21a97ca72dfa07651056e5",
|
||||||
|
deprecated=True,
|
||||||
|
)
|
||||||
|
version(
|
||||||
|
"0.1",
|
||||||
|
sha256="bcdc940c4cb254b178446d16c969b85ea6b5c69fdf4b6332bb3c8fbce00bccdf",
|
||||||
|
deprecated=True,
|
||||||
|
)
|
||||||
|
|
||||||
patch("threads10.patch", when="@1.0")
|
patch("threads10.patch", when="@1.0")
|
||||||
patch("fortran200.patch", when="@2.0.0")
|
patch("fortran200.patch", when="@2.0.0")
|
||||||
|
@ -78,6 +94,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
args = [
|
args = [
|
||||||
|
"-DHeffte_SEQUENTIAL_TESTING=ON",
|
||||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||||
self.define_from_variant("Heffte_ENABLE_CUDA", "cuda"),
|
self.define_from_variant("Heffte_ENABLE_CUDA", "cuda"),
|
||||||
self.define_from_variant("Heffte_ENABLE_ROCM", "rocm"),
|
self.define_from_variant("Heffte_ENABLE_ROCM", "rocm"),
|
||||||
|
@ -86,12 +103,9 @@ def cmake_args(self):
|
||||||
self.define_from_variant("Heffte_ENABLE_MAGMA", "magma"),
|
self.define_from_variant("Heffte_ENABLE_MAGMA", "magma"),
|
||||||
self.define_from_variant("Heffte_ENABLE_FORTRAN", "fortran"),
|
self.define_from_variant("Heffte_ENABLE_FORTRAN", "fortran"),
|
||||||
self.define_from_variant("Heffte_ENABLE_PYTHON", "python"),
|
self.define_from_variant("Heffte_ENABLE_PYTHON", "python"),
|
||||||
"-DBUILD_GPU={0:1s}".format(
|
|
||||||
"ON" if ("+cuda" in self.spec and "+fftw" in self.spec) else "OFF"
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if "+cuda" in self.spec:
|
if "+cuda" in self.spec and self.spec.satisfies("@:2.3.0"):
|
||||||
cuda_arch = self.spec.variants["cuda_arch"].value
|
cuda_arch = self.spec.variants["cuda_arch"].value
|
||||||
if len(cuda_arch) > 0 or cuda_arch[0] != "none":
|
if len(cuda_arch) > 0 or cuda_arch[0] != "none":
|
||||||
nvcc_flags = ""
|
nvcc_flags = ""
|
||||||
|
@ -100,7 +114,7 @@ def cmake_args(self):
|
||||||
|
|
||||||
args.append("-DCUDA_NVCC_FLAGS={0}".format(nvcc_flags))
|
args.append("-DCUDA_NVCC_FLAGS={0}".format(nvcc_flags))
|
||||||
|
|
||||||
if "+rocm" in self.spec:
|
if "+rocm" in self.spec and self.spec.satisfies("@:2.3.0"):
|
||||||
args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc))
|
args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc))
|
||||||
|
|
||||||
rocm_arch = self.spec.variants["amdgpu_target"].value
|
rocm_arch = self.spec.variants["amdgpu_target"].value
|
||||||
|
@ -113,10 +127,10 @@ def cmake_args(self):
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def cmake_bin(self, set=True):
|
def cmake_bin(self, set_path=True):
|
||||||
"""(Hack) Set/get cmake dependency path. Sync with Tasmanian."""
|
"""(Hack) Set/get cmake dependency path. Sync with Tasmanian."""
|
||||||
filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
|
filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
|
||||||
if set:
|
if set_path:
|
||||||
with open(filepath, "w") as out_file:
|
with open(filepath, "w") as out_file:
|
||||||
cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
|
cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
|
||||||
out_file.write("{0}\n".format(cmake_bin))
|
out_file.write("{0}\n".format(cmake_bin))
|
||||||
|
@ -129,10 +143,10 @@ def setup_smoke_test(self):
|
||||||
install_tree(
|
install_tree(
|
||||||
self.prefix.share.heffte.testing, join_path(self.install_test_root, "testing")
|
self.prefix.share.heffte.testing, join_path(self.install_test_root, "testing")
|
||||||
)
|
)
|
||||||
self.cmake_bin(set=True)
|
self.cmake_bin(set_path=True)
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
cmake_bin = self.cmake_bin(set=False)
|
cmake_bin = self.cmake_bin(set_path=False)
|
||||||
|
|
||||||
if not cmake_bin:
|
if not cmake_bin:
|
||||||
tty.msg("Skipping heffte test: cmake_bin_path.txt not found")
|
tty.msg("Skipping heffte test: cmake_bin_path.txt not found")
|
||||||
|
|
Loading…
Reference in a new issue