diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2021-07-27 12:37:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 16:37:00 +0000 |
commit | 0a41d4ebb831ec11de83ba6a9e6eb7c65b4eb9b5 (patch) | |
tree | 057aafcac9a469c39bb4ccc01083deac33064c4a | |
parent | ca260a3d632eb3b3f50ea7ebd6c4a81a2237c34a (diff) | |
download | spack-0a41d4ebb831ec11de83ba6a9e6eb7c65b4eb9b5.tar.gz spack-0a41d4ebb831ec11de83ba6a9e6eb7c65b4eb9b5.tar.bz2 spack-0a41d4ebb831ec11de83ba6a9e6eb7c65b4eb9b5.tar.xz spack-0a41d4ebb831ec11de83ba6a9e6eb7c65b4eb9b5.zip |
pbs: new virtual package (#24568)
* pbs: new virtual package
Some of our clusters have an older installation of
libtorque and tm.h that are *not* from OpenPBS. Using the current
openpbs dependency for openmpi causes concretization errors due to
restrictions on older python and hwloc requirements that don't apply,
even with an external non-buildable installation.
The new 'torque' bundle package allows users to point to that external
installation without problems.
Detailed description of torque by Sergey Kosukhin <skosukhin@gmail.com>
-rw-r--r-- | etc/spack/defaults/packages.yaml | 1 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openmpi/package.py | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/torque/package.py | 37 |
3 files changed, 40 insertions, 2 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 0a5e00ce08..aeed54fd08 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -43,6 +43,7 @@ packages: opencl: [pocl] onedal: [intel-oneapi-dal] osmesa: [mesa+osmesa, mesa18+osmesa] + pbs: [openpbs, torque] pil: [py-pillow] pkgconfig: [pkgconf, pkg-config] rpc: [libtirpc] diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index a1cceae1c4..d98d829c04 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -307,7 +307,7 @@ class Openmpi(AutotoolsPackage): depends_on('knem', when='fabrics=knem') depends_on('lsf', when='schedulers=lsf') - depends_on('openpbs', when='schedulers=tm') + depends_on('pbs', when='schedulers=tm') depends_on('slurm', when='schedulers=slurm') depends_on('openssh', type='run') @@ -588,7 +588,7 @@ class Openmpi(AutotoolsPackage): def with_or_without_tm(self, activated): if not activated: return '--without-tm' - return '--with-tm={0}'.format(self.spec['openpbs'].prefix) + return '--with-tm={0}'.format(self.spec['pbs'].prefix) @run_before('autoreconf') def die_without_fortran(self): diff --git a/var/spack/repos/builtin/packages/torque/package.py b/var/spack/repos/builtin/packages/torque/package.py new file mode 100644 index 0000000000..297944d0d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/torque/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Torque(Package): + """TORQUE (Terascale Open-source Resource and QUEue Manager) is an open + source project based on the original PBS resource manager developed by NASA, + LLNL, and MRJ.""" + + homepage = "https://github.com/abarbu/torque" + has_code = False + + maintainers = ['sethrj'] + + version('3.0.4') + version('3.0.2') + + provides('pbs') + + # TORQUE needs to be added as an external package to SPACK. For this, the + # config file packages.yaml needs to be adjusted: + # + # packages: + # torque: + # buildable: False + # externals: + # - spec: torque@3.0.2 + # prefix: /opt/torque (path to your TORQUE installation) + + def install(self, spec, prefix): + raise InstallError( + self.spec.format('{name} is not installable, you need to specify ' + 'it as an external package in packages.yaml')) |