WarpX: Remove Deprecated Versions (#46765)
* WarpX: Remove Deprecated Versions * Conflict: WarpX SYCL RZ FFT Issue Conflict out on WarpX issue until fixed https://github.com/BLAST-WarpX/warpx/issues/5774 * Fix #49546
This commit is contained in:
parent
bf48b7662e
commit
7a0ef93332
@ -21,34 +21,10 @@ class PyAmrex(CMakePackage, PythonExtension, CudaPackage, ROCmPackage):
|
||||
|
||||
version("develop", branch="development")
|
||||
version("25.03", sha256="5a65545d46b49dd3f2bca2647a174c3ee0384e49791dc3e335a3a39d9a045350")
|
||||
version(
|
||||
"25.02",
|
||||
sha256="c743086b317f9fa90639d825db32a92376cde8dc5e1eab47a4c6a82af36d5b5c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"24.10",
|
||||
sha256="dc1752ed3fbd5113dcfdbddcfe6c3c458e572b288ac9d41ed3ed7db130591d74",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"24.08",
|
||||
sha256="e7179d88261f64744f392a2194ff2744fe323fe0e21d0742ba60458709a1b47e",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"24.04",
|
||||
sha256="ab85695bb9644b702d0fc84e77205d264d27ba94999cab912c8a3212a7eb77fc",
|
||||
deprecated=True,
|
||||
)
|
||||
with default_args(deprecated=True):
|
||||
version("25.02", sha256="c743086b317f9fa90639d825db32a92376cde8dc5e1eab47a4c6a82af36d5b5c")
|
||||
|
||||
version(
|
||||
"24.03",
|
||||
sha256="bf85b4ad35b623278cbaae2c07e22138545dec0732d15c4ab7c53be76a7f2315",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
for v in ["25.03", "25.02", "24.10", "24.08", "24.04", "24.03"]:
|
||||
for v in ["25.03", "25.02", "develop"]:
|
||||
depends_on("amrex@{0}".format(v), when="@{0}".format(v), type=("build", "link"))
|
||||
|
||||
variant(
|
||||
@ -77,8 +53,7 @@ class PyAmrex(CMakePackage, PythonExtension, CudaPackage, ROCmPackage):
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.20:3", type="build", when="@:24.08")
|
||||
depends_on("cmake@3.24:3", type="build", when="@24.09:")
|
||||
depends_on("cmake@3.24:3", type="build")
|
||||
depends_on("pkgconfig", type="build") # amrex +fft
|
||||
depends_on("python@3.8:", type=("build", "run"))
|
||||
depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi")
|
||||
@ -128,38 +103,29 @@ class PyAmrex(CMakePackage, PythonExtension, CudaPackage, ROCmPackage):
|
||||
depends_on("py-pandas", type="test")
|
||||
depends_on("py-cupy", type="test", when="+cuda")
|
||||
|
||||
phases = ("cmake", "build", "install", "pip_install_nodeps")
|
||||
build_targets = ["all", "pip_wheel"]
|
||||
phases = ("cmake", "build", "install")
|
||||
build_targets = ["all", "pip_wheel", "pip_install_nodeps"]
|
||||
|
||||
tests_src_dir = "tests/"
|
||||
|
||||
def cmake_args(self):
|
||||
args = ["-DpyAMReX_amrex_internal=OFF", "-DpyAMReX_pybind11_internal=OFF"]
|
||||
return args
|
||||
pip_args = PythonPipBuilder.std_args(self) + [f"--prefix={self.prefix}"]
|
||||
idx = pip_args.index("install")
|
||||
# Docs: https://pyamrex.readthedocs.io/en/24.10/install/cmake.html#build-options
|
||||
|
||||
def pip_install_nodeps(self, spec, prefix):
|
||||
"""Install everything from build directory."""
|
||||
pip = spec["python"].command
|
||||
pip.add_default_arg("-m", "pip")
|
||||
|
||||
args = PythonPipBuilder.std_args(self) + [
|
||||
f"--prefix={prefix}",
|
||||
"--find-links=amrex-whl",
|
||||
"amrex",
|
||||
return [
|
||||
"-DpyAMReX_amrex_internal=OFF",
|
||||
"-DpyAMReX_pybind11_internal=OFF",
|
||||
"-DPY_PIP_OPTIONS=" + ";".join(pip_args[:idx]),
|
||||
"-DPY_PIP_INSTALL_OPTIONS=" + ";".join(pip_args[idx + 1 :]),
|
||||
]
|
||||
|
||||
with working_dir(self.build_directory):
|
||||
pip(*args)
|
||||
|
||||
# todo: from PythonPipBuilder
|
||||
# ....execute_install_time_tests()
|
||||
|
||||
def check(self):
|
||||
"""Checks after the build phase"""
|
||||
pytest = which("pytest")
|
||||
pytest(join_path(self.stage.source_path, self.tests_src_dir))
|
||||
|
||||
@run_after("pip_install_nodeps")
|
||||
@run_after("install")
|
||||
def copy_test_sources(self):
|
||||
"""Copy the example test files after the package is installed to an
|
||||
install test subdirectory for use during `spack test run`."""
|
||||
|
@ -24,31 +24,6 @@ class PyPicmistandard(PythonPackage):
|
||||
version("0.24.0", sha256="55a82adcc14b41eb612caf0d9e47b0e2a56ffc196a58b41fa0cc395c6924be9a")
|
||||
version("0.23.2", sha256="2853fcfaf2f226a88bb6063ae564832b7e69965294fd652cd2ac04756fa4599a")
|
||||
version("0.23.1", sha256="c7375010b7a3431b519bc0accf097f2aafdb520e2a0126f42895cb96dcc7dcf1")
|
||||
version(
|
||||
"0.0.22",
|
||||
sha256="e234a431274254b22cd70be64d6555b383d98426b2763ea0c174cf77bf4d0890",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"0.0.21",
|
||||
sha256="930056a23ed92dac7930198f115b6248606b57403bffebce3d84579657c8d10b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"0.0.20",
|
||||
sha256="9c1822eaa2e4dd543b5afcfa97940516267dda3890695a6cf9c29565a41e2905",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"0.0.19",
|
||||
sha256="4b7ba1330964fbfd515e8ea2219966957c1386e0896b92d36bd9e134afb02f5a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"0.0.18",
|
||||
sha256="68c208c0c54b4786e133bb13eef0dd4824998da4906285987ddee84e6d195e71",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("python@3.8:", type=("build", "run"))
|
||||
depends_on("py-numpy@1.15:1", type=("build", "run"))
|
||||
|
@ -1,103 +0,0 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyWarpx(PythonPackage):
|
||||
"""This package is deprecated. Please use `warpx +python`.
|
||||
|
||||
WarpX is an advanced electromagnetic Particle-In-Cell code. It supports
|
||||
many features including Perfectly-Matched Layers (PML) and mesh refinement.
|
||||
In addition, WarpX is a highly-parallel and highly-optimized code and
|
||||
features hybrid OpenMP/MPI parallelization, advanced vectorization
|
||||
techniques and load balancing capabilities.
|
||||
|
||||
These are the Python bindings of WarpX with PICMI input support.
|
||||
See the C++ 'warpx' package for the WarpX application and library.
|
||||
"""
|
||||
|
||||
homepage = "https://ecp-warpx.github.io"
|
||||
url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.08.tar.gz"
|
||||
git = "https://github.com/ECP-WarpX/WarpX.git"
|
||||
|
||||
maintainers("ax3l", "dpgrote", "EZoni", "RemiLehe")
|
||||
|
||||
tags = ["e4s", "ecp"]
|
||||
|
||||
license("BSD-3-Clause-LBNL")
|
||||
|
||||
# NOTE: if you update the versions here, also see warpx
|
||||
with default_args(deprecated=True):
|
||||
version("develop", branch="development")
|
||||
version("23.08", sha256="22b9ad39c89c3fae81b1ed49abd72f698fbc79d8ac3b8dd733fd02185c0fdf63")
|
||||
version("23.07", sha256="eab91672191d7bf521cda40f2deb71a144da452b35245567b14873938f97497e")
|
||||
version("23.06", sha256="9bbdcbfae3d7e87cd4457a0debd840897e9a9d15e14eaad4be8c8e16e13adca2")
|
||||
version("23.05", sha256="fa4f6d8d0537057313bb657c60d5fd91ae6219d3de95d446282f1ad47eeda863")
|
||||
version("23.04", sha256="90462a91106db8e241758aeb8aabdf3e217c9e3d2c531d6d30f0d03fd3ef789c")
|
||||
version("23.03", sha256="26e79f8c7f0480b5f795d87ec2663e553b357894fc4b591c8e70d64bfbcb72a4")
|
||||
version("23.02", sha256="596189e5cebb06e8e58a587423566db536f4ac3691d01db8d11f5503f1e7e35e")
|
||||
version("23.01", sha256="ed0536ae5a75df4b93c275c6839a210fba61c9524a50ec6217c44d5ac83776b3")
|
||||
version("22.12", sha256="bdd0a9ec909a5ac00f288bb4ab5193136b460e39e570ecb37d3d5d742b7e67bf")
|
||||
version("22.11", sha256="03c580bcd0cf7b99a81b9ef09d14172c96672c7fb028a0ed6728b3cc9ec207e7")
|
||||
version("22.10", sha256="736747184eaae65fb1bbeb6867b890c90b233132bc185d85ea605525637e7c53")
|
||||
version("22.09", sha256="0dc7076bad1c46045abd812729fa650bc4f3d17fdfded6666cbaf06da70f09d7")
|
||||
version("22.08", sha256="95930c4f4fc239dfe4ed36b1023dd3768637ad37ff746bb33cf05231ca08ee7a")
|
||||
version("22.07", sha256="7d91305f8b54b36acf2359daec5a94e154e2a8d7cbae97429ed8e93f7c5ea661")
|
||||
version("22.06", sha256="faa6550d7dd48fc64d4b4d67f583d34209c020bf4f026d10feb7c9b224caa208")
|
||||
version("22.05", sha256="be97d695a425cfb0ecd3689a0b9706575b7b48ce1c73c39d4ea3abd616b15ad7")
|
||||
version("22.04", sha256="ff6e3a379fafb76e311b2f48089da6b1ab328c5b52eccd347c41cce59d0441ed")
|
||||
version("22.03", sha256="808a9f43514ee40fa4fa9ab5bf0ed11219ab6f9320eb414bb4f043fab112f7a0")
|
||||
version("22.02", sha256="3179c54481c5dabde77a4e9a670bb97b599cecc617ad30f32ab3177559f67ffe")
|
||||
version("22.01", sha256="73a65c1465eca80f0db2dab4347c22ddf68ad196e3bd0ccc0861d782f13b7388")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
variant("mpi", default=True, description="Enable MPI support")
|
||||
|
||||
for v in [
|
||||
"23.08",
|
||||
"23.07",
|
||||
"23.06",
|
||||
"23.05",
|
||||
"23.04",
|
||||
"23.03",
|
||||
"23.02",
|
||||
"23.01",
|
||||
"22.12",
|
||||
"22.11",
|
||||
"22.10",
|
||||
"22.09",
|
||||
"22.08",
|
||||
"22.07",
|
||||
"22.06",
|
||||
"22.05",
|
||||
"22.04",
|
||||
"22.03",
|
||||
"22.02",
|
||||
"22.01",
|
||||
"develop",
|
||||
]:
|
||||
depends_on("warpx@{0}".format(v), when="@{0}".format(v), type=["build", "link"])
|
||||
|
||||
depends_on("python@3.7:", type=("build", "run"))
|
||||
depends_on("python@3.8:", type=("build", "run"), when="@23.09:")
|
||||
depends_on("py-numpy@1.15.0:1", type=("build", "run"))
|
||||
depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi")
|
||||
depends_on("py-periodictable@1.5:1", type=("build", "run"))
|
||||
depends_on("py-picmistandard@0.25.0", type=("build", "run"), when="@23.07:")
|
||||
depends_on("py-picmistandard@0.24.0", type=("build", "run"), when="@23.06")
|
||||
depends_on("py-picmistandard@0.23.2", type=("build", "run"), when="@23.04:23.05")
|
||||
depends_on("py-picmistandard@0.0.22", type=("build", "run"), when="@22.12:23.03")
|
||||
depends_on("py-picmistandard@0.0.20", type=("build", "run"), when="@22.10:22.11")
|
||||
depends_on("py-picmistandard@0.0.19", type=("build", "run"), when="@22.02:22.09")
|
||||
depends_on("py-picmistandard@0.0.18", type=("build", "run"), when="@22.01")
|
||||
depends_on("py-setuptools@42:", type="build")
|
||||
# Since we use PYWARPX_LIB_DIR to pull binaries out of the
|
||||
# 'warpx' spack package, we don't need cmake as declared
|
||||
depends_on("warpx +lib ~mpi +shared", type=("build", "link"), when="~mpi")
|
||||
depends_on("warpx +lib +mpi +shared", type=("build", "link"), when="+mpi")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("PYWARPX_LIB_DIR", self.spec["warpx"].prefix.lib)
|
@ -23,53 +23,24 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
|
||||
license("BSD-3-Clause-LBNL")
|
||||
|
||||
# NOTE: if you update the versions here, also see py-warpx
|
||||
version("develop", branch="development")
|
||||
version("25.03", sha256="18155ff67b036a00db2a25303058316167192a81cfe6dc1dec65fdef0b6d9903")
|
||||
with default_args(deprecated=True):
|
||||
version("25.02", sha256="7bdea9c1e94f82dbc3565f14f6b6ad7658a639217a10a6cf08c05a16aa26266f")
|
||||
version("24.10", sha256="73b486b5fc561d97773fe95bb82751b9085aa8dfe27b4e2f285d646396b41323")
|
||||
version("24.08", sha256="081b0d803d7b2b491626ba36e87e867b1fd1d20ddf0dee9c6ed4ff84f7d37553")
|
||||
version("23.08", sha256="22b9ad39c89c3fae81b1ed49abd72f698fbc79d8ac3b8dd733fd02185c0fdf63")
|
||||
version("23.07", sha256="eab91672191d7bf521cda40f2deb71a144da452b35245567b14873938f97497e")
|
||||
version("23.06", sha256="9bbdcbfae3d7e87cd4457a0debd840897e9a9d15e14eaad4be8c8e16e13adca2")
|
||||
version("23.05", sha256="fa4f6d8d0537057313bb657c60d5fd91ae6219d3de95d446282f1ad47eeda863")
|
||||
version("23.04", sha256="90462a91106db8e241758aeb8aabdf3e217c9e3d2c531d6d30f0d03fd3ef789c")
|
||||
version("23.03", sha256="26e79f8c7f0480b5f795d87ec2663e553b357894fc4b591c8e70d64bfbcb72a4")
|
||||
version("23.02", sha256="596189e5cebb06e8e58a587423566db536f4ac3691d01db8d11f5503f1e7e35e")
|
||||
version("23.01", sha256="ed0536ae5a75df4b93c275c6839a210fba61c9524a50ec6217c44d5ac83776b3")
|
||||
version("22.12", sha256="bdd0a9ec909a5ac00f288bb4ab5193136b460e39e570ecb37d3d5d742b7e67bf")
|
||||
version("22.11", sha256="03c580bcd0cf7b99a81b9ef09d14172c96672c7fb028a0ed6728b3cc9ec207e7")
|
||||
version("22.10", sha256="736747184eaae65fb1bbeb6867b890c90b233132bc185d85ea605525637e7c53")
|
||||
version("22.09", sha256="0dc7076bad1c46045abd812729fa650bc4f3d17fdfded6666cbaf06da70f09d7")
|
||||
version("22.08", sha256="95930c4f4fc239dfe4ed36b1023dd3768637ad37ff746bb33cf05231ca08ee7a")
|
||||
version("22.07", sha256="7d91305f8b54b36acf2359daec5a94e154e2a8d7cbae97429ed8e93f7c5ea661")
|
||||
version("22.06", sha256="faa6550d7dd48fc64d4b4d67f583d34209c020bf4f026d10feb7c9b224caa208")
|
||||
version("22.05", sha256="be97d695a425cfb0ecd3689a0b9706575b7b48ce1c73c39d4ea3abd616b15ad7")
|
||||
version("22.04", sha256="ff6e3a379fafb76e311b2f48089da6b1ab328c5b52eccd347c41cce59d0441ed")
|
||||
version("22.03", sha256="808a9f43514ee40fa4fa9ab5bf0ed11219ab6f9320eb414bb4f043fab112f7a0")
|
||||
version("22.02", sha256="3179c54481c5dabde77a4e9a670bb97b599cecc617ad30f32ab3177559f67ffe")
|
||||
version("22.01", sha256="73a65c1465eca80f0db2dab4347c22ddf68ad196e3bd0ccc0861d782f13b7388")
|
||||
# 22.01+ requires C++17 or newer
|
||||
version("21.12", sha256="3dd96d36db531f518cfec631bec243029fe63e1084b8cf7e8e75be50ebbdc794")
|
||||
version("21.11", sha256="03727c21ee350fdc63057d4eebbff142928d74481f2234a8c3821cf338bfa4a0")
|
||||
version("21.10", sha256="c35a98b1bd349cb944296c02d6e0602b6b7e33d1008207dd0d041a75cfb971e9")
|
||||
version("21.09", sha256="0b20c5d7f13448f01115f68f131a3721e037ad9fab06aa3c24530bc48859c9eb")
|
||||
version("21.08", sha256="5e61e4ec5a8605aa4fb89d49feba4a42d7d3f627745d4c85faab3657baf56011")
|
||||
version("21.07", sha256="fe566f3de8d5b17a720e084d244c6617c87523b7d80756cbb5850df6e8100f5f")
|
||||
version("21.06", sha256="246fb2c2bdb1dad347550c48e375326bc7bdeec0496c113c1057d2721a9ffd14")
|
||||
version("21.05", sha256="16a206e898b22ace07c8dc9ea70af7f6f6f91a7a2e42c392fd15eb223faa1597")
|
||||
version("21.04", sha256="13b13aebb25f43b7239743312dc9bb96bb365b72a99eb3c64492ae38f5141cff")
|
||||
# 20.01+ requires C++14 or newer
|
||||
|
||||
for v in ["25.03", "25.02", "develop"]:
|
||||
depends_on(
|
||||
f"amrex@{v} build_system=cmake +linear_solvers +pic +particles +shared +tiny_profile",
|
||||
when=f"@{v}",
|
||||
type=("build", "link"),
|
||||
)
|
||||
depends_on("py-amrex@{0}".format(v), when="@{0} +python".format(v), type=("build", "run"))
|
||||
|
||||
variant("app", default=True, description="Build the WarpX executable application")
|
||||
variant("ascent", default=False, description="Enable Ascent in situ visualization")
|
||||
variant(
|
||||
"catalyst",
|
||||
default=False,
|
||||
description="Enable Catalyst2 in situ visualization",
|
||||
when="@24.09:",
|
||||
)
|
||||
variant("catalyst", default=False, description="Enable Catalyst2 in situ visualization")
|
||||
variant("sensei", default=False, description="Enable SENSEI in situ visualization")
|
||||
variant(
|
||||
"compute",
|
||||
@ -78,24 +49,14 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
multi=False,
|
||||
description="On-node, accelerated computing backend",
|
||||
)
|
||||
variant(
|
||||
"dims",
|
||||
default="3",
|
||||
values=("1", "2", "3", "rz"),
|
||||
multi=False,
|
||||
description="Number of spatial dimensions",
|
||||
when="@:23.05",
|
||||
)
|
||||
variant(
|
||||
"dims",
|
||||
default="1,2,rz,3",
|
||||
values=("1", "2", "3", "rz"),
|
||||
multi=True,
|
||||
description="Number of spatial dimensions",
|
||||
when="@23.06:",
|
||||
)
|
||||
variant("eb", default=True, description="Embedded boundary support", when="@24.10:")
|
||||
variant("eb", default=False, description="Embedded boundary support", when="@:24.09")
|
||||
variant("eb", default=True, description="Embedded boundary support")
|
||||
# Spack defaults to False but pybind11 defaults to True (and IPO is highly
|
||||
# encouraged to be used)
|
||||
variant(
|
||||
@ -128,19 +89,8 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
for v in ["25.03", "25.02", "24.10", "24.08", "develop"]:
|
||||
depends_on(
|
||||
f"amrex@{v} build_system=cmake +linear_solvers +pic +particles +shared +tiny_profile",
|
||||
when=f"@{v}",
|
||||
type=("build", "link"),
|
||||
)
|
||||
depends_on("py-amrex@{0}".format(v), when="@{0} +python".format(v), type=("build", "run"))
|
||||
|
||||
depends_on("boost@1.66.0: +math", when="+qedtablegen")
|
||||
depends_on("cmake@3.15.0:", type="build")
|
||||
depends_on("cmake@3.18.0:", type="build", when="@22.01:")
|
||||
depends_on("cmake@3.20.0:", type="build", when="@22.08:")
|
||||
depends_on("cmake@3.24.0:", type="build", when="@24.09:")
|
||||
depends_on("cmake@3.24.0:", type="build")
|
||||
with when("+ascent"):
|
||||
depends_on("ascent", when="+ascent")
|
||||
depends_on("ascent +cuda", when="+ascent compute=cuda")
|
||||
@ -161,7 +111,7 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
with when("+eb"):
|
||||
depends_on("amrex +eb")
|
||||
with when("+fft"):
|
||||
depends_on("amrex +fft", when="@24.11:")
|
||||
depends_on("amrex +fft")
|
||||
depends_on("mpi", when="+mpi")
|
||||
with when("+mpi"):
|
||||
depends_on("amrex +mpi")
|
||||
@ -173,12 +123,11 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
depends_on("amrex precision=single")
|
||||
with when("precision=double"):
|
||||
depends_on("amrex precision=double")
|
||||
depends_on("py-pybind11@2.12.0:", when="@24.04: +python", type=("build", "link"))
|
||||
depends_on("sensei@4.0.0:", when="@22.07: +sensei")
|
||||
depends_on("py-pybind11@2.12.0:", when="+python", type=("build", "link"))
|
||||
depends_on("sensei@4.0.0:", when="+sensei")
|
||||
with when("compute=cuda"):
|
||||
depends_on("amrex +cuda")
|
||||
depends_on("cuda@9.2.88:")
|
||||
depends_on("cuda@11.0:", when="@22.01:")
|
||||
depends_on("cuda@11.7:")
|
||||
with when("compute=hip"):
|
||||
depends_on("amrex +rocm")
|
||||
depends_on("rocfft", when="+fft")
|
||||
@ -198,15 +147,14 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
depends_on("fftw ~mpi", when="~mpi")
|
||||
depends_on("fftw +mpi", when="+mpi")
|
||||
depends_on("pkgconfig", type="build")
|
||||
with when("compute=sycl"):
|
||||
depends_on("amrex +sycl")
|
||||
with when("+fft dims=rz"):
|
||||
depends_on("lapackpp")
|
||||
depends_on("blaspp")
|
||||
depends_on("blaspp +cuda", when="compute=cuda")
|
||||
with when("+openpmd"):
|
||||
depends_on("openpmd-api@0.13.1:")
|
||||
depends_on("openpmd-api@0.14.2:", when="@21.09:")
|
||||
depends_on("openpmd-api@0.15.1:", when="@23.05:")
|
||||
depends_on("openpmd-api@0.16.1:", when="@25.02:")
|
||||
depends_on("openpmd-api@0.16.1:")
|
||||
depends_on("openpmd-api ~mpi", when="~mpi")
|
||||
depends_on("openpmd-api +mpi", when="+mpi")
|
||||
|
||||
@ -218,57 +166,19 @@ class Warpx(CMakePackage, PythonExtension):
|
||||
depends_on("py-numpy@1.15.0:", type=("build", "run"))
|
||||
depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi")
|
||||
depends_on("py-periodictable@1.5:1", type=("build", "run"))
|
||||
depends_on("py-picmistandard@0.28.0", type=("build", "run"), when="@23.11:24.07")
|
||||
depends_on("py-picmistandard@0.29.0", type=("build", "run"), when="@24.08")
|
||||
depends_on("py-picmistandard@0.30.0", type=("build", "run"), when="@24.09:24.12")
|
||||
depends_on("py-picmistandard@0.33.0", type=("build", "run"), when="@25.01:")
|
||||
depends_on("py-pip@23:", type="build")
|
||||
depends_on("py-setuptools@42:", type="build")
|
||||
depends_on("py-pybind11@2.12.0:", type=("build", "link"))
|
||||
depends_on("py-wheel@0.40:", type="build")
|
||||
|
||||
conflicts("+python", when="@:24.04", msg="Python bindings only supported in 24.04+")
|
||||
conflicts("dims=1", when="@:21.12", msg="WarpX 1D support starts in 22.01+")
|
||||
conflicts("~qed +qedtablegen", msg="WarpX PICSAR QED table generation needs +qed")
|
||||
|
||||
# https://github.com/BLAST-WarpX/warpx/issues/5774
|
||||
conflicts(
|
||||
"compute=sycl",
|
||||
"compute=sycl dims=rz",
|
||||
when="+fft",
|
||||
msg="WarpX spectral solvers are not yet tested with SYCL " '(use "warpx ~fft")',
|
||||
)
|
||||
conflicts("+sensei", when="@:22.06", msg="WarpX supports SENSEI 4.0+ with 22.07 and newer")
|
||||
|
||||
# The symbolic aliases for our +lib target were missing in the install
|
||||
# location
|
||||
# https://github.com/BLAST-WarpX/warpx/pull/2626
|
||||
patch(
|
||||
"https://github.com/BLAST-WarpX/warpx/pull/2626.patch?full_index=1",
|
||||
sha256="a431d4664049d6dcb6454166d6a948d8069322a111816ca5ce01553800607544",
|
||||
when="@21.12",
|
||||
)
|
||||
|
||||
# Workaround for AMReX<=22.06 no-MPI Gather
|
||||
# https://github.com/BLAST-WarpX/warpx/pull/3134
|
||||
# https://github.com/AMReX-Codes/amrex/pull/2793
|
||||
patch(
|
||||
"https://github.com/BLAST-WarpX/warpx/pull/3134.patch?full_index=1",
|
||||
sha256="b786ce64a3c2c2b96ff2e635f0ee48532e4ae7ad9637dbf03f11c0768c290690",
|
||||
when="@22.02:22.05",
|
||||
)
|
||||
|
||||
# Forgot to install ABLASTR library
|
||||
# https://github.com/BLAST-WarpX/warpx/pull/3141
|
||||
patch(
|
||||
"https://github.com/BLAST-WarpX/warpx/pull/3141.patch?full_index=1",
|
||||
sha256="dab6fb44556ee1fd466a4cb0e20f89bde1ce445c9a51a2c0f59d1740863b5e7d",
|
||||
when="@22.04,22.05",
|
||||
)
|
||||
|
||||
# Fix failing 1D CUDA build
|
||||
# https://github.com/BLAST-WarpX/warpx/pull/3162
|
||||
patch(
|
||||
"https://github.com/BLAST-WarpX/warpx/pull/3162.patch?full_index=1",
|
||||
sha256="0ae573d1390ed8063f84e3402d30d34e522e65dc5dfeea3d07e165127ab373e9",
|
||||
when="@22.06",
|
||||
msg="WarpX spectral solvers are not yet running on SYCL GPUs for RZ (GH#5774)",
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
@ -295,11 +205,8 @@ def cmake_args(self):
|
||||
self.define_from_variant("WarpX_QED_TABLE_GEN", "qedtablegen"),
|
||||
]
|
||||
|
||||
if spec.satisfies("@24.08:"):
|
||||
args.append("-DWarpX_amrex_internal=OFF")
|
||||
args.append(self.define_from_variant("WarpX_FFT", "fft"))
|
||||
else:
|
||||
args.append(self.define_from_variant("WarpX_PSATD", "fft"))
|
||||
args.append("-DWarpX_amrex_internal=OFF")
|
||||
args.append(self.define_from_variant("WarpX_FFT", "fft"))
|
||||
|
||||
# FindMPI needs an extra hint sometimes, particularly on cray systems
|
||||
if "+mpi" in spec:
|
||||
@ -310,10 +217,18 @@ def cmake_args(self):
|
||||
args.append("-DWarpX_openpmd_internal=OFF")
|
||||
|
||||
if "+python" in spec:
|
||||
if spec.satisfies("@24.08:"):
|
||||
args.append("-DWarpX_pyamrex_internal=OFF")
|
||||
args.append("-DWarpX_pybind11_internal=OFF")
|
||||
args.append(self.define_from_variant("WarpX_PYTHON_IPO", "python_ipo"))
|
||||
pip_args = PythonPipBuilder.std_args(self) + [f"--prefix={self.prefix}"]
|
||||
idx = pip_args.index("install")
|
||||
# Docs: https://warpx.readthedocs.io/en/latest/install/cmake.html#build-options
|
||||
args.extend(
|
||||
[
|
||||
"-DWarpX_pyamrex_internal=OFF",
|
||||
"-DWarpX_pybind11_internal=OFF",
|
||||
self.define_from_variant("WarpX_PYTHON_IPO", "python_ipo"),
|
||||
"-DPY_PIP_OPTIONS=" + ";".join(pip_args[:idx]),
|
||||
"-DPY_PIP_INSTALL_OPTIONS=" + ";".join(pip_args[idx + 1 :]),
|
||||
]
|
||||
)
|
||||
|
||||
# Work-around for SENSEI 4.0: wrong install location for CMake config
|
||||
# https://github.com/SENSEI-insitu/SENSEI/issues/79
|
||||
@ -321,32 +236,13 @@ def cmake_args(self):
|
||||
args.append(self.define("SENSEI_DIR", spec["sensei"].prefix.lib.cmake))
|
||||
|
||||
# WarpX uses CCache by default, interfering with Spack wrappers
|
||||
ccache_var = "CCACHE_PROGRAM" if spec.satisfies("@:24.01") else "WarpX_CCACHE"
|
||||
args.append(self.define(ccache_var, False))
|
||||
args.append(self.define("WarpX_CCACHE", False))
|
||||
|
||||
return args
|
||||
|
||||
phases = ("cmake", "build", "install", "pip_install_nodeps")
|
||||
build_targets = ["all"]
|
||||
with when("+python"):
|
||||
build_targets += ["pip_wheel"]
|
||||
|
||||
def pip_install_nodeps(self, spec, prefix):
|
||||
"""Install everything from build directory."""
|
||||
pip = spec["python"].command
|
||||
pip.add_default_arg("-m", "pip")
|
||||
|
||||
args = PythonPipBuilder.std_args(self) + [
|
||||
f"--prefix={prefix}",
|
||||
"--find-links=warpx-whl",
|
||||
"pywarpx",
|
||||
]
|
||||
|
||||
with working_dir(self.build_directory):
|
||||
pip(*args)
|
||||
|
||||
# todo: from PythonPipBuilder
|
||||
# ....execute_install_time_tests()
|
||||
def edit(self, spec, prefix):
|
||||
with when("+python"):
|
||||
self.build_targets.extend(["pip_wheel", "pip_install_nodeps"])
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
@ -374,26 +270,20 @@ def _get_input_options(self, dim, post_install):
|
||||
install_test_root(self) if post_install else self.stage.source_path,
|
||||
self.examples_src_dir,
|
||||
)
|
||||
if spec.satisfies("@:24.09"):
|
||||
inputs_nD = {"1": "inputs_1d", "2": "inputs_2d", "3": "inputs_3d", "rz": "inputs_rz"}
|
||||
if spec.satisfies("@:21.12"):
|
||||
inputs_nD["rz"] = "inputs_2d_rz"
|
||||
else:
|
||||
inputs_nD = {
|
||||
"1": "inputs_test_1d_laser_acceleration",
|
||||
"2": "inputs_base_2d",
|
||||
"3": "inputs_base_3d",
|
||||
"rz": "inputs_base_rz",
|
||||
}
|
||||
inputs_nD = {
|
||||
"1": "inputs_base_1d",
|
||||
"2": "inputs_base_2d",
|
||||
"3": "inputs_base_3d",
|
||||
"rz": "inputs_base_rz",
|
||||
}
|
||||
inputs = join_path(examples_dir, inputs_nD[dim])
|
||||
|
||||
cli_args = [inputs, "max_step=50", "diag1.intervals=10"]
|
||||
# test openPMD output if compiled in
|
||||
if "+openpmd" in spec:
|
||||
cli_args.append("diag1.format=openpmd")
|
||||
# RZ: New openPMD thetaMode output
|
||||
if dim == "rz" and spec.satisfies("@22.04:"):
|
||||
cli_args.append("diag1.fields_to_plot=Er Et Ez Br Bt Bz jr jt jz rho")
|
||||
# RZ: thetaMode output uses different variables
|
||||
cli_args.append("diag1.fields_to_plot=Er Et Ez Br Bt Bz jr jt jz rho")
|
||||
return cli_args
|
||||
|
||||
def check(self):
|
||||
@ -429,8 +319,6 @@ def run_warpx(self, dim):
|
||||
if dim not in self.spec.variants["dims"].value:
|
||||
raise SkipTest(f"Package must be installed with {dim} in dims")
|
||||
dim_arg = f"{dim}d" if dim.isdigit() else dim
|
||||
if self.spec.satisfies("@:23.05") and not dim.isdigit():
|
||||
dim_arg = dim_arg.upper()
|
||||
exe = find(self.prefix.bin, f"warpx.{dim_arg}.*", recursive=False)[0]
|
||||
cli_args = self._get_input_options(dim, True)
|
||||
warpx = which(exe)
|
||||
|
Loading…
Reference in New Issue
Block a user