From 9875a0e228316477ca4dfa1e09b7dff325ccb5ef Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sat, 11 Dec 2021 13:14:00 -0800 Subject: PICMI: 0.16 & 0.18 & WarpX 1D (#27876) * PICMI: 0.16 & 0.18 & WarpX 1D Update the `py-picmistandard` and the latest WarpX release. Preparing 1D support (testable inputs coming for 22.01+). * Fix style: overlong line * Update pypi example link * Fix requirement ranges * WarpX 21.12: Update Patch Follow-up from https://github.com/ECP-WarpX/WarpX/pull/2646 * fix style Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-picmistandard/package.py | 18 ++++++++++++++---- var/spack/repos/builtin/packages/py-warpx/package.py | 12 +++++++----- var/spack/repos/builtin/packages/warpx/2626.patch | 2 +- var/spack/repos/builtin/packages/warpx/package.py | 13 +++++++++---- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-picmistandard/package.py b/var/spack/repos/builtin/packages/py-picmistandard/package.py index 7c850b36c1..c5c1fe6b96 100644 --- a/var/spack/repos/builtin/packages/py-picmistandard/package.py +++ b/var/spack/repos/builtin/packages/py-picmistandard/package.py @@ -10,16 +10,26 @@ class PyPicmistandard(PythonPackage): """Standard input format for Particle-In-Cell codes""" homepage = "https://picmi-standard.github.io" - url = "https://github.com/picmi-standard/picmi/archive/refs/tags/0.0.14.tar.gz" git = "https://github.com/picmi-standard/picmi.git" + pypi = 'picmistandard/picmistandard-0.0.18.tar.gz' maintainers = ['ax3l', 'dpgrote', 'RemiLehe'] version('develop', branch='master') - version('0.0.14', sha256='b7eefdae1c43119984226b2df358c86fdeef7495084e47b3575e3d07e790ba30') + version('0.0.18', sha256='68c208c0c54b4786e133bb13eef0dd4824998da4906285987ddee84e6d195e71') + # 0.15 - 0.17 have broken install logic: missing requirements.txt on pypi + version('0.0.16', sha256='b7eefdae1c43119984226b2df358c86fdeef7495084e47b3575e3d07e790ba30', + url='https://github.com/picmi-standard/picmi/archive/refs/tags/0.0.14.tar.gz') + version('0.0.14', sha256='8f83b25b281fc0309a0c4f75c7605afd5fa0ef4df3b3ac115069478c119bc8c3') depends_on('python@3.6:', type=('build', 'run')) - depends_on('py-numpy', type=('build', 'run')) + depends_on('py-numpy@1.15:1', type=('build', 'run')) + depends_on('py-scipy@1.5:1', type=('build', 'run')) depends_on('py-setuptools', type='build') - build_directory = 'PICMI_Python' + @property + def build_directory(self): + if self.spec.satisfies('@develop') or self.spec.satisfies('@0.0.16'): + return 'PICMI_Python' + else: + return './' diff --git a/var/spack/repos/builtin/packages/py-warpx/package.py b/var/spack/repos/builtin/packages/py-warpx/package.py index 0c8b8477bf..e9ef28304d 100644 --- a/var/spack/repos/builtin/packages/py-warpx/package.py +++ b/var/spack/repos/builtin/packages/py-warpx/package.py @@ -18,7 +18,7 @@ class PyWarpx(PythonPackage): """ homepage = "https://ecp-warpx.github.io" - url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/21.04.tar.gz" + url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/21.12.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" maintainers = ['ax3l', 'dpgrote', 'RemiLehe'] @@ -46,12 +46,14 @@ class PyWarpx(PythonPackage): when='@{0}'.format(v), type=['build', 'link']) - depends_on('python@3.6:', type=('build', 'run')) + depends_on('python@3.6:3.9', type=('build', 'run')) depends_on('py-numpy@1.15.0:1', type=('build', 'run')) - depends_on('py-mpi4py@2.0.0:', type=('build', 'run'), when='+mpi') + 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.0.14', type=('build', 'run')) - depends_on('py-setuptools@38.6:', type='build') + depends_on('py-picmistandard@0.0.14', type=('build', 'run'), when='@21.03:21.11') + depends_on('py-picmistandard@0.0.16', type=('build', 'run'), when='@21.12') + depends_on('py-setuptools@42:', type='build') + depends_on('py-cmake@3.15:3', type='build') depends_on('py-wheel', type='build') depends_on('warpx +lib ~mpi +shared', type=('build', 'link'), when='~mpi') depends_on('warpx +lib +mpi +shared', type=('build', 'link'), when='+mpi') diff --git a/var/spack/repos/builtin/packages/warpx/2626.patch b/var/spack/repos/builtin/packages/warpx/2626.patch index 29476438cd..699744b89d 100644 --- a/var/spack/repos/builtin/packages/warpx/2626.patch +++ b/var/spack/repos/builtin/packages/warpx/2626.patch @@ -20,7 +20,7 @@ index 04092ba962..a549546ab9 100644 else() set(mod_ext "so") endif() -+ if(IS_ABSOLUTE CMAKE_INSTALL_LIBDIR) ++ if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) + set(ABS_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR}) + else() + set(ABS_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index 73ba698f41..2e67026e07 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -17,7 +17,7 @@ class Warpx(CMakePackage): """ homepage = "https://ecp-warpx.github.io" - url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/21.07.tar.gz" + url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/21.12.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" maintainers = ['ax3l', 'dpgrote', 'MaxThevenet', 'RemiLehe'] @@ -25,6 +25,7 @@ class Warpx(CMakePackage): # NOTE: if you update the versions here, also see py-warpx version('develop', branch='development') + # 22.01+ requires C++17 or newer version('21.12', sha256='847c98aac20c73d94c823378803c82be9a14139f1c14ea483757229b452ce4c1') version('21.11', sha256='ce60377771c732033a77351cd3500b24b5d14b54a5adc7a622767b9251c10d0b') version('21.10', sha256='d372c573f0360094d5982d64eceeb0149d6620eb75e8fdbfdc6777f3328fb454') @@ -34,6 +35,7 @@ class Warpx(CMakePackage): version('21.06', sha256='a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30') version('21.05', sha256='f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc') version('21.04', sha256='51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0') + # 20.01+ requires C++14 or newer variant('app', default=True, description='Build the WarpX executable application') @@ -46,7 +48,7 @@ class Warpx(CMakePackage): description='On-node, accelerated computing backend') variant('dims', default='3', - values=('2', '3', 'rz'), + values=('1', '2', '3', 'rz'), multi=False, description='Number of spatial dimensions') variant('eb', default=False, @@ -105,6 +107,8 @@ class Warpx(CMakePackage): depends_on('rocprim') depends_on('rocrand') + 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') conflicts('compute=sycl', when='+psatd', @@ -148,7 +152,7 @@ class Warpx(CMakePackage): @property def libs(self): - libsuffix = {'2': '2d', '3': '3d', 'rz': 'rz'} + libsuffix = {'1': '1d', '2': '2d', '3': '3d', 'rz': 'rz'} dims = self.spec.variants['dims'].value return find_libraries( ['libwarpx.' + libsuffix[dims]], root=self.prefix, recursive=True, @@ -164,7 +168,8 @@ class Warpx(CMakePackage): self.install_test_root if post_install else self.stage.source_path, self.examples_src_dir) dims = self.spec.variants['dims'].value - inputs_nD = {'2': 'inputs_2d', '3': 'inputs_3d', 'rz': 'inputs_2d_rz'} + inputs_nD = {'1': 'inputs_1d', '2': 'inputs_2d', '3': 'inputs_3d', + 'rz': 'inputs_2d_rz'} inputs = join_path(examples_dir, inputs_nD[dims]) cli_args = [inputs, "max_step=50", "diag1.intervals=10"] -- cgit v1.2.3-60-g2f50