summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJim Galarowicz <jeg@trenzasynergy.com>2022-01-13 19:59:05 -0600
committerGitHub <noreply@github.com>2022-01-13 19:59:05 -0600
commitb7accb6a9d9a547e9f6e555a470a65ab5c544331 (patch)
tree95dc400803545866c05a84f5f7bdb824753a200d /var
parenteda565f3b12236096cd9cd7a933fff1b19dfaf38 (diff)
downloadspack-b7accb6a9d9a547e9f6e555a470a65ab5c544331.tar.gz
spack-b7accb6a9d9a547e9f6e555a470a65ab5c544331.tar.bz2
spack-b7accb6a9d9a547e9f6e555a470a65ab5c544331.tar.xz
spack-b7accb6a9d9a547e9f6e555a470a65ab5c544331.zip
Add new survey package to spack. (#25518)
* Add new package to spack. survey is a lightweight application performance tool that also gathers system information and stores it as metadata. * Add maintainer and note about source access. * Update the man path per spack reviewer suggestion. * Remove redundant settings for PYTHONPATH, PATH, and MANPATH. * Move to a one mpi collector approach for cce/tce integration. * Add pyyaml dependency * Make further spack reviewer changes to python type specs, mpi args, build type variant. * Add reviewer requested changes. * Add reviewer docstring requested changes. * Add more updates from spack reviewer comments. * Update the versions to use tags, not branches * Redo dashes to fix issue with spack testing. Co-authored-by: Jim Galarowicz <jgalarowicz@newmexicoconsortium.org>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/survey/package.py101
1 files changed, 101 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/survey/package.py b/var/spack/repos/builtin/packages/survey/package.py
new file mode 100644
index 0000000000..54279fe60b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/survey/package.py
@@ -0,0 +1,101 @@
+# 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 Survey(CMakePackage):
+ """Survey is a high level performance tool product from Trenza, Inc.
+ The survey collector/analytics framework is a new generation,
+ high level, lightweight multiplatform Linux tool set that
+ targets metric collection for high level performance analysis
+ of applications running on both single node and on large scale
+ platforms, including the Cray platforms.
+
+ The collector is designed to work on sequential, MPI, OpenMP,
+ and hybrid codes and directly leverages several interfaces
+ available for tools inside current MPI implementations including:
+ MPICH, MVAPICH, MPT, and OpenMPI. It also supports multiple
+ architectures and has been tested on machines based on Intel,
+ AMD, ARM, and IBM P8/9 processors and integrated GPUs.
+
+ Survey is a licensed product with the source not openly available.
+ To access the survey source and build with spack please contact:
+ Trenza Inc. via: dmont@trenzasynergy.com or
+ jeg@trenzasynergy.com
+ """
+
+ homepage = "http://www.trenzasynergy.com"
+ git = "git@gitlab.com:trenza/survey.git"
+
+ maintainers = ['jgalarowicz']
+
+ version('master', branch='master')
+ version('1.0.1.1', tag='1.0.1.1')
+ version('1.0.1', tag='1.0.1')
+ version('1.0.0', branch='1.0.0')
+
+ variant('mpi', default=False,
+ description="Enable mpi, build MPI data collector")
+
+ # must have cmake at 3.12 or greater to find python3
+ depends_on('cmake@3.12:', type='build')
+
+ # for collectors
+ depends_on("libmonitor@2021.04.27+commrank", type=('build', 'link', 'run'))
+
+ depends_on("papi@5:", type=('build', 'link', 'run'))
+ depends_on("gotcha@master", type=('build', 'link', 'run'))
+ depends_on("llvm-openmp@9.0.0", type=('build', 'link', 'run'))
+
+ # MPI Installation
+ depends_on("mpi", when="+mpi")
+
+ depends_on("python@3:", type=('build', 'link', 'run'))
+ depends_on("py-setuptools", type='build')
+ depends_on("py-pip", type='build')
+ depends_on("py-pandas", type=('build', 'run'))
+ depends_on("py-psutil", type=('build', 'run'))
+ depends_on("py-sqlalchemy", type=('build', 'run'))
+ depends_on("py-pyyaml", type=('build', 'run'))
+
+ extends('python')
+
+ parallel = False
+
+ def get_mpi_cmake_options(self, spec):
+ # Returns MPI cmake_options that will enable the appropriate
+ # MPI implementation is specified as a cmake argument.
+ mpi_args = ['-D%s_DIR=%s' % (spec['mpi'].name.upper(), spec['mpi'].prefix)]
+ return mpi_args
+
+ def cmake_args(self):
+ spec = self.spec
+
+ # Add in paths for finding package config files that tell us
+ # where to find these packages
+ cmake_args = [
+ '-DCMAKE_VERBOSE_MAKEFILE=ON',
+ '-DTLS_MODEL=implicit',
+ '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
+ '-DPAPI_DIR=%s' % spec['papi'].prefix,
+ '-DLIBIOMP_DIR=%s' % spec['llvm-openmp'].prefix,
+ '-DPYTHON_DIR=%s' % spec['python'].prefix,
+ '-DGOTCHA_DIR=%s' % spec['gotcha'].prefix
+ ]
+
+ # Add any MPI implementations coming from variant settings
+ mpi_options = self.get_mpi_cmake_options(spec)
+ cmake_args.extend(mpi_options)
+ return cmake_args
+
+ def setup_run_environment(self, env):
+ """Set up the compile and runtime environments for a package."""
+
+ # Set SURVEY_MPI_IMPLEMENTATON to the appropriate mpi implementation
+ # This is needed by survey to deploy the correct mpi runtimes.
+ env.set('SURVEY_MPI_IMPLEMENTATION', self.spec['mpi'].name.lower())
+ # For compatibility reasons we need
+ env.prepend_path('PATH', self.spec['python'].prefix.bin)