diff options
author | Ted Stern <sternt@google.com> | 2023-06-01 13:01:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 13:01:43 -0700 |
commit | cd27611d2f601a04aab1bed10fd2d728ef20c24e (patch) | |
tree | f63dd7bdfe1ad874d496e65ba2d38c946fc91c04 | |
parent | b111d2172e4d937f35b2b4c506060282720ea15d (diff) | |
download | spack-cd27611d2f601a04aab1bed10fd2d728ef20c24e.tar.gz spack-cd27611d2f601a04aab1bed10fd2d728ef20c24e.tar.bz2 spack-cd27611d2f601a04aab1bed10fd2d728ef20c24e.tar.xz spack-cd27611d2f601a04aab1bed10fd2d728ef20c24e.zip |
Adding libpsm3 package (#37444)
* Adding libpsm3 package
* Make changes suggested by flake8
* Make one more flake8-suggested change, blank line after 'import os'
* Change to standard header to pass flake8 tests
* Update doc string, remove unnecessary comments
* Reviewer-recommende changes
* Alphabetize variants
* Use helper functions
* Change quotes to pass spack style check
-rw-r--r-- | var/spack/repos/builtin/packages/libpsm3/package.py | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libpsm3/package.py b/var/spack/repos/builtin/packages/libpsm3/package.py new file mode 100644 index 0000000000..620777fc17 --- /dev/null +++ b/var/spack/repos/builtin/packages/libpsm3/package.py @@ -0,0 +1,60 @@ +# Copyright 2013-2023 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) + +import os + +from spack.package import * + + +class Libpsm3(AutotoolsPackage): + """PSM3 provider for the PSM3 OFI provider""" + + homepage = "https://ofiwg.github.io/libfabric/v1.12.0/man/fi_psm3.7.html" + url = "https://github.com/intel/eth-psm3-fi/archive/refs/tags/v11.4.1.0.tar.gz" + git = "https://github.com/intel/eth-psm3-fi.git" + + version( + "11.4.1.0", + sha256="272adb9ec10edf709bfcfccc6b6e9296d25d892c36b845ad577caeb82b70c9ac", + preferred=True, + ) + + variant("atomics", default=True, description="Enable atomics") + variant("debug", default=False, description="Enable debugging") + variant("sockets", default=True, description="Enable PSM3 sockets") + variant("verbs", default=False, description="Enable PSM3 verbs") + + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("numactl") + depends_on("uuid") + + maintainers("dodecatheon", "douglasjacobsen") + + def configure_args(self): + config_args = [] + config_args.extend(self.enable_or_disable("atomics")) + config_args.extend(self.enable_or_disable("debug")) + config_args += self.enable_or_disable("psm3-sockets", variant="sockets") + config_args += self.enable_or_disable("psm3-verbs", variant="verbs") + return config_args + + def build(self, spec, prefix): + make() + + def install(self, spec, prefix): + install_tree("src/.libs", prefix.lib) + os.unlink("%s/libpsm3-fi.la" % prefix.lib) + install("src/libpsm3-fi.la", prefix.lib) + + def setup_run_environment(self, env): + env.prepend_path("FI_PROVIDER_PATH", self.prefix.lib) + env.set("FI_PROVIDER", "psm3") + env.set("PSM3_ALLOW_ROUTERS", "1") + if "+sockets" in self.spec and "~verbs" in self.spec: + env.set("PSM3_HAL", "sockets") + env.set("FI_PSM3_NAME_SERVER", "1") + if "+debug" in self.spec: + env.set("PSM3_IDENTIFY", "1") |