summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark W. Krentel <krentel@rice.edu>2021-07-06 01:20:47 -0500
committerGitHub <noreply@github.com>2021-07-06 08:20:47 +0200
commitb8f1bd407e4d2b1f58a5a469528a40affb53ada1 (patch)
treed8d1ec5471ba23d3118fcfc723ce0bdc86c09c70
parentcea11f3714afca0156c71c2b4634a606e351987c (diff)
downloadspack-b8f1bd407e4d2b1f58a5a469528a40affb53ada1.tar.gz
spack-b8f1bd407e4d2b1f58a5a469528a40affb53ada1.tar.bz2
spack-b8f1bd407e4d2b1f58a5a469528a40affb53ada1.tar.xz
spack-b8f1bd407e4d2b1f58a5a469528a40affb53ada1.zip
hpcx-mpi: new package (#24194)
This is a virtual package for Nvidia's HPC-X MPI implementation for external specs only.
-rw-r--r--var/spack/repos/builtin/packages/hpcx-mpi/package.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hpcx-mpi/package.py b/var/spack/repos/builtin/packages/hpcx-mpi/package.py
new file mode 100644
index 0000000000..01d6b55080
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpcx-mpi/package.py
@@ -0,0 +1,43 @@
+# 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)
+
+import os
+
+
+class HpcxMpi(Package):
+ """The HPC-X MPI implementation from NVIDIA/Mellanox based on OpenMPI.
+ This package is for external specs only."""
+
+ homepage = "https://developer.nvidia.com/networking/hpc-x"
+ maintainers = ['mwkrentel']
+
+ has_code = False
+
+ provides('mpi')
+
+ def install(self, spec, prefix):
+ raise InstallError('HPC-X MPI is not buildable, it is for external '
+ 'specs only.')
+
+ def setup_dependent_package(self, module, dependent_spec):
+ # This works for AOCC (AMD), Intel and GNU.
+ self.spec.mpicc = os.path.join(self.prefix.bin, 'mpicc')
+ self.spec.mpicxx = os.path.join(self.prefix.bin, 'mpicxx')
+ self.spec.mpif77 = os.path.join(self.prefix.bin, 'mpif77')
+ self.spec.mpifc = os.path.join(self.prefix.bin, 'mpif90')
+
+ def make_base_environment(self, prefix, env):
+ env.set('MPICC', os.path.join(prefix.bin, 'mpicc'))
+ env.set('MPICXX', os.path.join(prefix.bin, 'mpicxx'))
+ env.set('MPIF77', os.path.join(prefix.bin, 'mpif77'))
+ env.set('MPIF90', os.path.join(prefix.bin, 'mpif90'))
+ env.prepend_path('LD_LIBRARY_PATH', prefix.lib)
+ env.set('OPAL_PREFIX', prefix)
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ self.make_base_environment(self.prefix, env)
+
+ def setup_run_environment(self, env):
+ self.make_base_environment(self.prefix, env)