Update openspeedshop and cbtf-krell module creation code (#9234)

* Add the setting of CBTF_MPI_IMPLEMENTATION to the cbtf-krell
  and openspeeedshop package files, so that the mpi implementation
  can be found by the tool.  This allows users to not have to
  set this manually if only one mpi implementation is specified
  in the build.
* Update version ranges for dependencies of cbtf packages
This commit is contained in:
Jim Galarowicz
2018-10-30 20:41:08 -05:00
committed by Peter Scheibel
parent 72fa122101
commit c10d432a2e
7 changed files with 148 additions and 112 deletions

View File

@@ -7,9 +7,6 @@
import spack.store
import os
import os.path
class Openspeedshop(CMakePackage):
"""OpenSpeedShop is a community effort by The Krell Institute with
@@ -29,6 +26,7 @@ class Openspeedshop(CMakePackage):
git = "https://github.com/OpenSpeedShop/openspeedshop.git"
version('develop', branch='master')
version('2.4.0', branch='2.4.0')
version('2.3.1.5', branch='2.3.1.5')
version('2.3.1.4', branch='2.3.1.4')
version('2.3.1.3', branch='2.3.1.3')
@@ -79,8 +77,7 @@ class Openspeedshop(CMakePackage):
depends_on("flex@2.6.1", type='build')
# For binutils
depends_on("binutils", when='@develop', type='build')
depends_on("binutils@2.29.1", when='@2.3.1.3:9999', type='build')
depends_on("binutils")
depends_on("elf", type="link")
depends_on("libdwarf")
@@ -88,60 +85,59 @@ class Openspeedshop(CMakePackage):
depends_on("sqlite")
# For boost
depends_on("boost@1.50.0:", when='@develop')
depends_on("boost@1.66.0", when='@2.3.1.3:9999')
depends_on("boost@1.66.0:")
depends_on("dyninst@develop", when='@develop')
# This will change to version dyninst@10.0 when it is released
depends_on("dyninst@develop", when='@2.3.1.3:9999')
depends_on("python", when='@develop')
depends_on("python@2.7.14:2.7.15", when='@2.3.1.3:9999')
depends_on("python", when='@develop', type=('build', 'run'))
depends_on("python@2.7.14:2.7.15", when='@2.3.1.3:9999', type=('build', 'run'))
depends_on("libxml2")
depends_on("qt@3.3.8b+krellpatch", when='gui=qt3')
# Dependencies for the openspeedshop cbtf packages.
depends_on("cbtf@develop", when='@develop')
depends_on("cbtf@1.9.1.0:9999", when='@2.3.1.3:9999')
depends_on("cbtf@develop", when='@develop', type=('build', 'link', 'run'))
depends_on("cbtf@1.9.1.0:9999", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
depends_on("cbtf-krell@develop", when='@develop')
depends_on("cbtf-krell@1.9.1.0:9999", when='@2.3.1.3:9999')
depends_on("cbtf-krell@develop", when='@develop', type=('build', 'link', 'run'))
depends_on("cbtf-krell@1.9.1.0:9999", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+crayfe', when='@develop+crayfe')
depends_on('cbtf-krell@1.9.1.0:9999+crayfe', when='@2.3.1.3:9999+crayfe')
depends_on('cbtf-krell@develop+crayfe', when='@develop+crayfe', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+crayfe', when='@2.3.1.3:9999+crayfe', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+cti', when='@develop+cti')
depends_on('cbtf-krell@1.9.1.0:9999+cti', when='@2.3.1.3:9999+cti')
depends_on('cbtf-krell@develop+cti', when='@develop+cti', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+cti', when='@2.3.1.3:9999+cti', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+mpich', when='@develop+mpich')
depends_on('cbtf-krell@1.9.1.0:9999+mpich', when='@2.3.1.3:9999+mpich')
depends_on('cbtf-krell@develop+mpich', when='@develop+mpich', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+mpich', when='@2.3.1.3:9999+mpich', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+mpich2', when='@develop+mpich2')
depends_on('cbtf-krell@1.9.1.0:9999+mpich2', when='@2.3.1.3:9999+mpich2')
depends_on('cbtf-krell@develop+mpich2', when='@develop+mpich2', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+mpich2', when='@2.3.1.3:9999+mpich2', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+mpt', when='@develop+mpt')
depends_on('cbtf-krell@1.9.1.0:9999+mpt', when='@2.3.1.3:9999+mpt')
depends_on('cbtf-krell@develop+mpt', when='@develop+mpt', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+mpt', when='@2.3.1.3:9999+mpt', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+mvapich', when='@develop+mvapich')
depends_on('cbtf-krell@1.9.1.0:9999+mvapich', when='@2.3.1.3:9999+mvapich')
depends_on('cbtf-krell@develop+mvapich', when='@develop+mvapich', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+mvapich', when='@2.3.1.3:9999+mvapich', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+mvapich2', when='@develop+mvapich2')
depends_on('cbtf-krell@1.9.1.0:9999+mvapich2', when='@2.3.1.3:9999+mvapich2')
depends_on('cbtf-krell@develop+mvapich2', when='@develop+mvapich2', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+mvapich2', when='@2.3.1.3:9999+mvapich2', type=('build', 'link', 'run'))
depends_on('cbtf-krell@develop+openmpi', when='@develop+openmpi')
depends_on('cbtf-krell@1.9.1.0:9999+openmpi', when='@2.3.1.3:9999+openmpi')
depends_on('cbtf-krell@develop+openmpi', when='@develop+openmpi', type=('build', 'link', 'run'))
depends_on('cbtf-krell@1.9.1.0:9999+openmpi', when='@2.3.1.3:9999+openmpi', type=('build', 'link', 'run'))
depends_on("cbtf-argonavis@develop", when='@develop+cuda')
depends_on("cbtf-argonavis@1.9.1.0:9999", when='@2.3.1.3:9999+cuda')
depends_on("cbtf-argonavis@develop", when='@develop+cuda', type=('build', 'link', 'run'))
depends_on("cbtf-argonavis@1.9.1.0:9999", when='@2.3.1.3:9999+cuda', type=('build', 'link', 'run'))
# For MRNet
depends_on("mrnet@5.0.1-3:+cti", when='@develop+cti')
depends_on("mrnet@5.0.1-3:+lwthreads", when='@develop')
depends_on("mrnet@5.0.1-3:+cti", when='@develop+cti', type=('build', 'link', 'run'))
depends_on("mrnet@5.0.1-3:+lwthreads", when='@develop', type=('build', 'link', 'run'))
depends_on("mrnet@5.0.1-3:+cti", when='@2.3.1.3:9999+cti')
depends_on("mrnet@5.0.1-3:+lwthreads", when='@2.3.1.3:9999')
depends_on("mrnet@5.0.1-3:+cti", when='@2.3.1.3:9999+cti', type=('build', 'link', 'run'))
depends_on("mrnet@5.0.1-3:+lwthreads", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
parallel = False
@@ -283,10 +279,6 @@ def set_mpi_cmake_options(self, spec, cmake_options):
def setup_environment(self, spack_env, run_env):
"""Set up the compile and runtime environments for a package."""
# Common settings to both offline and cbtf versions
# of OpenSpeedShop
run_env.prepend_path('PATH', self.prefix.bin)
# Find Dyninst library path, this is needed to
# set the DYNINSTAPI_RT_LIB library which is
# required for OpenSpeedShop to find loop level
@@ -298,19 +290,33 @@ def setup_environment(self, spack_env, run_env):
# Set Dyninst RT library path to support OSS loop resolution code
run_env.set('DYNINSTAPI_RT_LIB', dyninst_libdir)
# Find openspeedshop library path
oss_libdir = find_libraries('libopenss-framework',
root=self.spec['openspeedshop'].prefix,
shared=True, recursive=True)
run_env.prepend_path('LD_LIBRARY_PATH',
os.path.dirname(oss_libdir.joined()))
run_env.set('OPENSS_RAWDATA_DIR', '.')
cbtf_mc = '/sbin/cbtf_mrnet_commnode'
cbtf_lmb = '/sbin/cbtf_libcbtf_mrnet_backend'
run_env.set('XPLAT_RSH', 'ssh')
run_env.set('MRNET_COMM_PATH',
join_path(self.spec['cbtf-krell'].prefix + cbtf_mc))
# Set CBTF_MPI_IMPLEMENTATON to the appropriate mpi implementation
# This is needed by O|SS and CBTF tools to deploy the correct
# mpi runtimes for ossmpi, ossmpit, ossmpip, and cbtfsummary
# Users may have to set the CBTF_MPI_IMPLEMENTATION variable
# manually if multiple mpi's are specified in the build
if self.spec.satisfies('+mpich'):
run_env.set('CBTF_MPI_IMPLEMENTATION', "mpich")
if self.spec.satisfies('+mvapich'):
run_env.set('CBTF_MPI_IMPLEMENTATION', "mvapich")
if self.spec.satisfies('+mvapich2'):
run_env.set('CBTF_MPI_IMPLEMENTATION', "mvapich2")
if self.spec.satisfies('+mpt'):
run_env.set('CBTF_MPI_IMPLEMENTATION', "mpt")
if self.spec.satisfies('+openmpi'):
run_env.set('CBTF_MPI_IMPLEMENTATION', "openmpi")
run_env.set('CBTF_MRNET_BACKEND_PATH',
join_path(self.spec['cbtf-krell'].prefix + cbtf_lmb))
run_env.prepend_path('PATH', self.spec['mrnet'].prefix.bin)