summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsameershende <sameershende@users.noreply.github.com>2019-01-23 22:40:58 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2019-01-23 20:40:58 -0800
commit7d12ff6e16bf0414143c984d0ba936884dee9229 (patch)
tree26f540ff763aad5ef05eda7be67eedf2b82ad1d9
parent9252f7f957decc46934b28e35393ba7be80f6e8c (diff)
downloadspack-7d12ff6e16bf0414143c984d0ba936884dee9229.tar.gz
spack-7d12ff6e16bf0414143c984d0ba936884dee9229.tar.bz2
spack-7d12ff6e16bf0414143c984d0ba936884dee9229.tar.xz
spack-7d12ff6e16bf0414143c984d0ba936884dee9229.zip
Update ecp st tau pdt (#8192)
* Updated MPI and TAU versions in the TAU package * Updated PDT versions * Added support for Python (+python), default to `False` * Cleaned up binutils, python, mpi usage. * Updated binutils install to add additional header files to the include/extra directory. * Resolving review problems with TAU and binutils packages. The binutils package was updated to include support for installing the ELF headers as a +headers variant. The TAU package was updated to use all known Spack dependencies.
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py16
-rw-r--r--var/spack/repos/builtin/packages/tau/package.py153
2 files changed, 135 insertions, 34 deletions
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index f684e45529..ca90f629e9 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import glob
class Binutils(AutotoolsPackage):
@@ -28,6 +29,7 @@ class Binutils(AutotoolsPackage):
variant('gold', default=True, description="build the gold linker")
variant('libiberty', default=False, description='Also install libiberty.')
variant('nls', default=True, description='Enable Native Language Support')
+ variant('headers', default=False, description='Install extra headers (e.g. ELF)')
patch('cr16.patch', when='@:2.29.1')
patch('update_symbol-2.26.patch', when='@2.26')
@@ -75,3 +77,17 @@ class Binutils(AutotoolsPackage):
configure_args.append('--program-prefix=g')
return configure_args
+
+ @run_after('install')
+ def install_headers(self):
+ # some packages (like TAU) need the ELF headers, so install them
+ # as a subdirectory in include/extras
+ if '+headers' in self.spec:
+ extradir = join_path(self.prefix.include, 'extra')
+ mkdirp(extradir)
+ # grab the full binutils set of headers
+ install_tree('include', extradir)
+ # also grab the headers from the bfd directory
+ for current_file in glob.glob(join_path(self.build_directory,
+ 'bfd', '*.h')):
+ install(current_file, extradir)
diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py
index 5ba83211e7..b744edf96d 100644
--- a/var/spack/repos/builtin/packages/tau/package.py
+++ b/var/spack/repos/builtin/packages/tau/package.py
@@ -5,7 +5,9 @@
from spack import *
import os
+import fnmatch
import glob
+import platform
from llnl.util.filesystem import join_path
@@ -16,39 +18,68 @@ class Tau(Package):
"""
homepage = "http://www.cs.uoregon.edu/research/tau"
- url = "https://www.cs.uoregon.edu/research/tau/tau_releases/tau-2.25.tar.gz"
+ url = "https://www.cs.uoregon.edu/research/tau/tau_releases/tau-2.28.tar.gz"
+ git = "https://github.com/UO-OACISS/tau2"
+ version('develop', branch='master')
+ version('2.28', '68c6f13ae748d12c921456e494006796ca2b0efebdeef76ee7c898c81592883e')
+ version('2.27.2p1', 'b9cc42ee8afdcfefe5104ab0a8f23a23')
+ version('2.27.2', 'b264ab0df78112f9a529e59a5f4dc191')
version('2.27.1', '4f98ff67ae5ab1ff2712f694bdec1fa9')
- version('2.27', '76602d35fc96f546b5b9dcaf09158651')
+ version('2.27', '76602d35fc96f546b5b9dcaf09158651')
version('2.26.3', '4ec14e85b8f3560b58628512c7b49e17')
+ version('2.26.2', '8a5908c35dac9406c9220b8098c70c1c')
+ version('2.26.1', 'cc13df9d6ad19bca9a8e55a9e7d0341e')
+ version('2.26', '2af91f02ad26d5bf0954146c56a8cdfa')
version('2.25', '46cd48fa3f3c4ce0197017b3158a2b43')
version('2.24.1', '6635ece6d1f08215b02f5d0b3c1e971b')
version('2.24', '57ce33539c187f2e5ec68f0367c76db4')
version('2.23.1', '6593b47ae1e7a838e632652f0426fe72')
- # TODO : shmem variant missing
- variant('download', default=False,
- description='Downloads and builds various dependencies')
variant('scorep', default=False, description='Activates SCOREP support')
- variant('openmp', default=True, description='Use OpenMP threads')
- variant('mpi', default=True,
- description='Specify use of TAU MPI wrapper library')
- variant('phase', default=True, description='Generate phase based profiles')
- variant('comm', default=True,
- description=' Generate profiles with MPI communicator info')
-
- # TODO : Try to build direct OTF2 support? Some parts of the OTF support
- # TODO : library in TAU are non-conformant,
- # TODO : and fail at compile-time. Further, SCOREP is compiled with OTF2
- # support.
- depends_on('pdt') # Required for TAU instrumentation
+ variant('openmp', default=False, description='Use OpenMP threads')
+ variant('pthreads', default=True, description='Use POSIX threads')
+ variant('mpi', default=False, description='Specify use of TAU MPI wrapper library')
+ variant('phase', default=False, description='Generate phase based profiles')
+ variant('papi', default=True, description='Activates Performance API')
+ variant('binutils', default=True, description='Activates support of BFD GNU Binutils')
+ variant('libunwind', default=True, description='Activates support of libunwind')
+ variant('otf2', default=True, description='Activates support of Open Trace Format (OTF)')
+ variant('pdt', default=True, description='Use PDT for source code instrumentation')
+ variant('comm', default=False, description=' Generate profiles with MPI communicator info')
+ variant('python', default=False, description='Activates Python support')
+ variant('likwid', default=False, description='Activates LIKWID support')
+ variant('ompt', default=False, description='Activates OMPT instrumentation')
+ variant('opari', default=False, description='Activates Opari2 instrumentation')
+ variant('shmem', default=False, description='Activates SHMEM support')
+ variant('gasnet', default=False, description='Activates GASNET support')
+ variant('cuda', default=False, description='Activates CUDA support')
+
+ # Support cross compiling.
+ # This is a _reasonable_ subset of the full set of TAU
+ # architectures supported:
+ variant('craycnl', default=False, description='Build for Cray compute nodes')
+ variant('bgq', default=False, description='Build for IBM BlueGene/Q compute nodes')
+ variant('ppc64le', default=False, description='Build for IBM Power LE nodes')
+
+ depends_on('pdt', when='+pdt') # Required for TAU instrumentation
depends_on('scorep', when='+scorep')
- depends_on('binutils', when='~download')
+ depends_on('otf2@2.1:', when='+otf2')
+ depends_on('likwid', when='+likwid')
+ depends_on('papi', when='+papi')
+ # TAU requires the ELF header support, libiberty and demangle.
+ depends_on('binutils+libiberty+headers~nls', when='+binutils')
+ depends_on('python@2.7:', when='+python')
+ depends_on('libunwind', when='+libunwind')
depends_on('mpi', when='+mpi')
+ depends_on('cuda', when='+cuda')
+ depends_on('gasnet', when='+gasnet')
+
+ filter_compiler_wrappers('tau_cc.sh', 'Makefile.tau', relative_root='bin')
def set_compiler_options(self):
- useropt = ["-O2", self.rpath_args]
+ useropt = ["-O2 -g", self.rpath_args]
##########
# Selecting a compiler with TAU configure is quite tricky:
@@ -65,10 +96,13 @@ class Tau(Package):
# PATH
compiler_path = os.path.dirname(self.compiler.cc)
os.environ['PATH'] = ':'.join([compiler_path, os.environ['PATH']])
- compiler_options = ['-c++=%s' % self.compiler.cxx_names[0],
- '-cc=%s' % self.compiler.cc_names[0]]
+
+ compiler_options = ['-c++=%s' % self.compiler.cxx,
+ '-cc=%s' % self.compiler.cc]
+
if self.compiler.fc:
compiler_options.append('-fortran=%s' % self.compiler.fc_names[0])
+
##########
# Construct the string of custom compiler flags and append it to
@@ -88,31 +122,82 @@ class Tau(Package):
# written script (nothing related to autotools). As such it has
# a few #peculiarities# that make this build quite hackish.
options = ["-prefix=%s" % prefix,
- "-iowrapper",
- "-pdt=%s" % spec['pdt'].prefix]
- # If download is active, download and build suggested dependencies
- if '+download' in spec:
- options.extend(['-bfd=download',
- '-unwind=download',
- '-asmdex=download'])
- else:
- options.extend(["-bfd=%s" % spec['binutils'].prefix])
- # TODO : unwind and asmdex are still missing
+ "-iowrapper"]
+
+ if '+pdt' in spec:
+ options.append("-pdt=%s" % spec['pdt'].prefix)
if '+scorep' in spec:
options.append("-scorep=%s" % spec['scorep'].prefix)
+ if '+pthreads' in spec:
+ options.append('-pthread')
+
+ if '+likwid' in spec:
+ options.append("-likwid=%s" % spec['likwid'].prefix)
+
+ if '+papi' in spec:
+ options.append("-papi=%s" % spec['papi'].prefix)
+
if '+openmp' in spec:
options.append('-openmp')
+ if '+opari' in spec:
+ options.append('-opari')
+
+ if '+binutils' in spec:
+ options.append("-bfd=%s" % spec['binutils'].prefix)
+
+ if '+libunwind' in spec:
+ options.append("-unwind=%s" % spec['libunwind'].prefix)
+
+ if '+otf2' in spec:
+ options.append("-otf=%s" % spec['otf2'].prefix)
+
if '+mpi' in spec:
options.append('-mpi')
+ if '+comm' in spec:
+ options.append('-PROFILECOMMUNICATORS')
+
+ if '+shmem' in spec:
+ options.append('-shmem')
+
+ if '+gasnet' in spec:
+ options.append('-gasnet=%s' % spec['gasnet'].prefix)
+
+ if '+cuda' in spec:
+ options.append("-cuda=%s" % spec['cuda'].prefix)
if '+phase' in spec:
options.append('-PROFILEPHASE')
- if '+comm' in spec:
- options.append('-PROFILECOMMUNICATORS')
+ if '+python' in spec:
+ options.append('-python')
+ # find Python.h (i.e. include/python2.7/Python.h)
+ include_path = spec['python'].prefix.include
+ found = False
+ for root, dirs, files in os.walk(spec['python'].prefix.include):
+ for filename in fnmatch.filter(files, 'Python.h'):
+ include_path = root
+ break
+ found = True
+ if found:
+ break
+ options.append("-pythoninc=%s" % include_path)
+ # find libpython*.* (i.e. lib/python2.7/libpython2.7.so)
+ lib_path = spec['python'].prefix.lib
+ found = False
+ file_to_find = 'libpython*.so'
+ if (platform.system() == "Darwin"):
+ file_to_find = 'libpython*.dylib'
+ for root, dirs, files in os.walk(spec['python'].prefix.lib):
+ for filename in fnmatch.filter(files, file_to_find):
+ lib_path = root
+ break
+ found = True
+ if found:
+ break
+ options.append("-pythonlib=%s" % lib_path)
compiler_specific_options = self.set_compiler_options()
options.extend(compiler_specific_options)
@@ -126,7 +211,7 @@ class Tau(Package):
def link_tau_arch_dirs(self):
for subdir in os.listdir(self.prefix):
for d in ('bin', 'lib'):
- src = join_path(self.prefix, subdir, d)
+ src = join_path(self.prefix, subdir, d)
dest = join_path(self.prefix, d)
if os.path.isdir(src) and not os.path.exists(dest):
os.symlink(join_path(subdir, d), dest)