Spack updates to three Krell packages (#4765)

* Update the krell institute products to use the latest features of spack for building on cluster platforms.

* Address travis error messages and resubmit the pull request.

* Update the contents of openspeedshop package.py so it passes the flake8 tests.

* Fix flake8 error-whitespack issue in mrnet package.py file.

* Add updates based on spack reviewer feedback.

* More fixes based on comments from reviewers.  Switch using extend to using append, remove additional setting of PATH and LD_LIBRARY_PATH that should not be required due to RPATH.

* More review related changes.  Update MPIOption.append lines and take out xercesc references.

* Create a base options function for common openspeedshop base cmake options to reduce redundencies.

* Add libxml2+python depends on to get around issues with the libxml2 package file.

* Using boost over 1.60.0 causes compile errors.  This is a known boost bug. Also, dyninst-9.2.0 is set to be the vesrion of dyninst to use with OSS, as of now. The newer version fails to build.

* Fix bad syntax in specifying the boost version range.

* Update the version numbers for the krell institute components and tools: cbtf and openspeedshop.

* Do not build glib for qt3, it is not needed and causes build problems at this time anyway.

* A fix was added for setting LD_LIBRARY_PATH in the qt3 build, but if LD_LIBRARY_PATH is not set the qt build fails. So so check and set LD_LIBRARY_PATH if not set, update if it is set.

* Update the fix for qt3 build by setting LD_LIBRARY_PATH instead of checking for whether it is set or not per Adams comment that spack clears LD_LIBRARY_PATH.

* A fix was added for setting LD_LIBRARY_PATH in the qt3 build, but if LD_LIBRARY_PATH is not set the qt build fails. So so check and set LD_LIBRARY_PATH if not set, update if it is set.

* Trim comments to fit more concisely.

* Fix tabs versus spaces and swap if and else clause check from a negative to a positive check.

* Fix issues with the cbtf-argonavis build, update to use dyninst-9.3.2, fixes to openspeedshop package build.

* Fix issues with the cbtf-argonavis package.py files related to comments.

* Add changes for changing the krell packages from Package to CMakePackage.

* Add better changes for changing the krell packages from Package to CMakePackage.

* Add more modifications for changing the krell packages from Package to CMakePackage.

* Add additional modifications for changing the krell packages from Package to CMakePackage and fixing Travis erros

* Fix new travis errors.

* Fix new travis errors.

* Add more changes for PR 4765.

* Add more refinements to the conversion from Package to CMakePackage.

* Fix new travis errors.

* Add dependencies for MPI to be passed to cbtf-krell, so it can build the MPI collectors requested by the builder of openspeedshop.

* Remove extra unnecessary routine to adjust build arguments. Fix if-else clause issue.

* Fix more flake issues caused by last changes.
This commit is contained in:
Jim Galarowicz
2017-07-20 13:25:57 -05:00
committed by Adam J. Stewart
parent 5f0e1514ac
commit 5173a8bef9
5 changed files with 236 additions and 552 deletions

View File

@@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##########################################################################
# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@@ -43,7 +43,7 @@
from spack import *
class CbtfKrell(Package):
class CbtfKrell(CMakePackage):
"""CBTF Krell project contains the Krell Institute contributions to the
CBTF project. These contributions include many performance data
collectors and support libraries as well as some example tools
@@ -52,10 +52,6 @@ class CbtfKrell(Package):
"""
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
# optional mirror access template
# url = "file:/home/jeg/cbtf-krell-1.6.tar.gz"
# version('1.6', 'edeb61cd488f16e7b124f77db9ce762d')
version('1.8', branch='master',
git='https://github.com/OpenSpeedShop/cbtf-krell.git')
@@ -81,7 +77,7 @@ class CbtfKrell(Package):
# collectionTool
depends_on("boost@1.50.0:1.59.0")
depends_on("dyninst@9.2.0")
depends_on("dyninst@9.3.2")
depends_on("mrnet@5.0.1:+lwthreads")
depends_on("xerces-c@3.1.1:")
@@ -104,31 +100,7 @@ class CbtfKrell(Package):
parallel = False
def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
# Sets build type parameters into cmakeOptions the options that will
# enable the cbtf-krell built type settings
compile_flags = "-O2 -g"
BuildTypeOptions = []
# Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the
# stdcmakeargs
for word in cmakeOptions[:]:
if word.startswith('-DCMAKE_BUILD_TYPE'):
cmakeOptions.remove(word)
if word.startswith('-DCMAKE_CXX_FLAGS'):
cmakeOptions.remove(word)
if word.startswith('-DCMAKE_C_FLAGS'):
cmakeOptions.remove(word)
if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'):
cmakeOptions.remove(word)
BuildTypeOptions.extend([
'-DCMAKE_VERBOSE_MAKEFILE=ON',
'-DCMAKE_BUILD_TYPE=None',
'-DCMAKE_CXX_FLAGS=%s' % compile_flags,
'-DCMAKE_C_FLAGS=%s' % compile_flags
])
cmakeOptions.extend(BuildTypeOptions)
build_directory = 'build_cbtf_krell'
def set_mpi_cmakeOptions(self, spec, cmakeOptions):
# Appends to cmakeOptions the options that will enable the appropriate
@@ -157,135 +129,30 @@ def set_mpi_cmakeOptions(self, spec, cmakeOptions):
cmakeOptions.extend(MPIOptions)
def install(self, spec, prefix):
def build_type(self):
return 'None'
def cmake_args(self):
spec = self.spec
compile_flags = "-O2 -g"
# Add in paths for finding package config files that tell us
# where to find these packages
# cmake_prefix_path = \
# join_path(spec['cbtf'].prefix) + ':' + \
# join_path(spec['dyninst'].prefix)
# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path
cmake_args = [
'-DCMAKE_CXX_FLAGS=%s' % compile_flags,
'-DCMAKE_C_FLAGS=%s' % compile_flags,
'-DCBTF_DIR=%s' % spec['cbtf'].prefix,
'-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
'-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
'-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
'-DPAPI_DIR=%s' % spec['papi'].prefix,
'-DBOOST_DIR=%s' % spec['boost'].prefix,
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
'-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix]
# Build cbtf-krell with cmake
with working_dir('build_cbtf_krell', create=True):
cmakeOptions = []
cmakeOptions.extend(
['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
'-DCBTF_DIR=%s' % spec['cbtf'].prefix,
'-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
'-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
'-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
'-DPAPI_DIR=%s' % spec['papi'].prefix,
'-DBOOST_DIR=%s' % spec['boost'].prefix,
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
'-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix])
# Add any MPI implementations coming from variant settings
self.set_mpi_cmakeOptions(spec, cmake_args)
# Add any MPI implementations coming from variant settings
self.set_mpi_cmakeOptions(spec, cmakeOptions)
# Add in the standard cmake arguments
cmakeOptions.extend(std_cmake_args)
# Adjust the standard cmake arguments to what we want the build
# type, etc to be
self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
# Invoke cmake
cmake('..', *cmakeOptions)
make("clean")
make()
make("install")
# if '+cray' in spec:
# if 'cray' in self.spec.architecture:
# if '+runtime' in spec:
# with working_dir('build_cbtf_cray_runtime', create=True):
# python_vers='%d.%d' % spec['python'].version[:2]
# cmake .. \
# -DCMAKE_BUILD_TYPE=Debug \
# -DTARGET_OS="cray" \
# -DRUNTIME_ONLY="true" \
# -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \
# -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \
# -DCBTF_DIR=${CBTF_ROOT} \
# -DBOOST_ROOT=${BOOST_INSTALL_PREFIX} \
# -DXERCESC_DIR=${XERCESC_INSTALL_PREFIX} \
# -DBINUTILS_DIR=${KRELL_ROOT} \
# -DLIBMONITOR_DIR=${KRELL_ROOT_COMPUTE} \
# -DLIBUNWIND_DIR=${KRELL_ROOT_COMPUTE} \
# -DPAPI_DIR=${PAPI_ROOT} \
# -DDYNINST_DIR=${DYNINST_CN_ROOT} \
# -DMRNET_DIR=${MRNET_INSTALL_PREFIX} \
# -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48
# else:
# with working_dir('build_cbtf_cray_frontend', create=True):
# python_vers='%d.%d' % spec['python'].version[:2]
# cmake .. \
# -DCMAKE_BUILD_TYPE=Debug \
# -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \
# -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \
# -DCBTF_DIR=${CBTF_ROOT} \
# -DRUNTIME_TARGET_OS="cray" \
# -DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_RUNTIME_ROOT} \
# -DCBTF_CN_RUNTIME_DIR=${CBTF_CN_RUNTIME_ROOT} \
# -DLIBMONITOR_CN_RUNTIME_DIR=${LIBMONITOR_CN_ROOT} \
# -DLIBUNWIND_CN_RUNTIME_DIR=${LIBUNWIND_CN_ROOT} \
# -DPAPI_CN_RUNTIME_DIR=${PAPI_CN_ROOT} \
# -DXERCESC_CN_RUNTIME_DIR=/${XERCESC_CN_ROOT} \
# -DMRNET_CN_RUNTIME_DIR=${MRNET_CN_ROOT} \
# -DBOOST_CN_RUNTIME_DIR=${BOOST_CN_ROOT} \
# -DDYNINST_CN_RUNTIME_DIR=${DYNINST_CN_ROOT} \
# -DBOOST_ROOT=/${KRELL_ROOT} \
# -DXERCESC_DIR=/${KRELL_ROOT} \
# -DBINUTILS_DIR=/${KRELL_ROOT} \
# -DLIBMONITOR_DIR=${KRELL_ROOT} \
# -DLIBUNWIND_DIR=${KRELL_ROOT} \
# -DPAPI_DIR=${PAPI_ROOT} \
# -DDYNINST_DIR=${KRELL_ROOT} \
# -DMRNET_DIR=${KRELL_ROOT} \
# -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48
# fi
#
# make("clean")
# make()
# make("install")
#
# elif '+mic' in spec:
# if '+runtime' in spec:
# with working_dir('build_cbtf_mic_runtime', create=True):
# python_vers='%d.%d' % spec['python'].version[:2]
# cmake .. \
#
# else:
# with working_dir('build_cbtf_cray_frontend', create=True):
# python_vers='%d.%d' % spec['python'].version[:2]
# cmake .. \
# fi
#
# else:
# # Build cbtf-krell with cmake
# with working_dir('build_cbtf_krell', create=True):
# cmake('..',
# '-DCMAKE_BUILD_TYPE=Debug',
# '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
# '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
# '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
# '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
# '-DLIBUNWIND_DIR=%s'% spec['libunwind'].prefix,
# '-DPAPI_DIR=%s' % spec['papi'].prefix,
# '-DBOOST_DIR=%s' % spec['boost'].prefix,
# '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
# '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
# '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
# '-DOPENMPI_DIR=%s' % openmpi_prefix_path,
# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
# *std_cmake_args)
#
# make("clean")
# make()
# make("install")
#
# fi
#
return cmake_args