re-merging develop
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Imagemagick(Package):
|
||||
"""ImageMagick is a image processing library"""
|
||||
homepage = "http://www.imagemagic.org"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# -------------------------------------------------------------------------
|
||||
# ImageMagick does not keep around anything but *-10 versions, so
|
||||
# this URL may change. If you want the bleeding edge, you can
|
||||
# uncomment it and see if it works but you may need to try to
|
||||
@@ -17,14 +18,16 @@ class Imagemagick(Package):
|
||||
# version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b',
|
||||
# url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# -------------------------------------------------------------------------
|
||||
# *-10 versions are archived, so these versions should fetch reliably.
|
||||
# -------------------------------------------------------------------------
|
||||
version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c',
|
||||
url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download")
|
||||
version(
|
||||
'6.8.9-10',
|
||||
'aa050bf9785e571c956c111377bbf57c',
|
||||
url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download")
|
||||
|
||||
depends_on('libtool')
|
||||
depends_on('jpeg')
|
||||
depends_on('libtool')
|
||||
depends_on('libpng')
|
||||
depends_on('freetype')
|
||||
depends_on('fontconfig')
|
||||
@@ -32,6 +35,5 @@ class Imagemagick(Package):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
15
var/spack/repos/builtin/packages/LuaJIT/package.py
Normal file
15
var/spack/repos/builtin/packages/LuaJIT/package.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
from spack import *
|
||||
|
||||
class Luajit(Package):
|
||||
"""Flast flexible JITed lua"""
|
||||
homepage = "http://www.luajit.org"
|
||||
url = "http://luajit.org/download/LuaJIT-2.0.4.tar.gz"
|
||||
|
||||
version('2.0.4', 'dd9c38307f2223a504cbfb96e477eca0')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Linking with the C++ compiler is a dirty hack to deal with the fact
|
||||
# that unwinding symbols are not included by libc, this is necessary
|
||||
# on some platforms for the final link stage to work
|
||||
make("install", "PREFIX=" + prefix, "TARGET_LD=" + os.environ['CXX'])
|
@@ -1,19 +1,18 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Mitos(Package):
|
||||
"""Mitos is a library and a tool for collecting sampled memory
|
||||
performance data to view with MemAxes"""
|
||||
|
||||
homepage = "https://github.com/llnl/Mitos"
|
||||
url = "https://github.com/llnl/Mitos"
|
||||
url = "https://github.com/llnl/Mitos"
|
||||
|
||||
version('0.9.2',
|
||||
git='https://github.com/llnl/Mitos.git',
|
||||
commit='8cb143a2e8c00353ff531a781a9ca0992b0aaa3d')
|
||||
|
||||
version('0.9.1',
|
||||
git='https://github.com/llnl/Mitos.git',
|
||||
tag='v0.9.1')
|
||||
version('0.9.1', git='https://github.com/llnl/Mitos.git', tag='v0.9.1')
|
||||
|
||||
depends_on('dyninst@8.2.1:')
|
||||
depends_on('hwloc')
|
||||
|
@@ -1,4 +1,14 @@
|
||||
import functools
|
||||
import glob
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
from contextlib import closing
|
||||
|
||||
import spack
|
||||
from llnl.util.lang import match_predicate
|
||||
from spack import *
|
||||
from spack.util.environment import *
|
||||
|
||||
|
||||
class R(Package):
|
||||
@@ -9,6 +19,8 @@ class R(Package):
|
||||
"""
|
||||
homepage = "https://www.r-project.org"
|
||||
url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz"
|
||||
|
||||
extendable = True
|
||||
|
||||
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
|
||||
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
|
||||
@@ -38,12 +50,57 @@ class R(Package):
|
||||
depends_on('tk')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
rlibdir = join_path(prefix, 'rlib')
|
||||
options = ['--prefix=%s' % prefix,
|
||||
'--libdir=%s' % rlibdir,
|
||||
'--enable-R-shlib',
|
||||
'--enable-BLAS-shlib']
|
||||
'--enable-BLAS-shlib',
|
||||
'--enable-R-framework=no']
|
||||
if '+external-lapack' in spec:
|
||||
options.extend(['--with-blas', '--with-lapack'])
|
||||
|
||||
configure(*options)
|
||||
make()
|
||||
make('install')
|
||||
|
||||
# ========================================================================
|
||||
# Set up environment to make install easy for R extensions.
|
||||
# ========================================================================
|
||||
|
||||
@property
|
||||
def r_lib_dir(self):
|
||||
return os.path.join('rlib', 'R', 'library')
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
# Set R_LIBS to include the library dir for the
|
||||
# extension and any other R extensions it depends on.
|
||||
r_libs_path = []
|
||||
for d in extension_spec.traverse():
|
||||
if d.package.extends(self.spec):
|
||||
r_libs_path.append(os.path.join(d.prefix, self.r_lib_dir))
|
||||
|
||||
r_libs_path = ':'.join(r_libs_path)
|
||||
spack_env.set('R_LIBS', r_libs_path)
|
||||
|
||||
# For run time environment set only the path for extension_spec and prepend it to R_LIBS
|
||||
if extension_spec.package.extends(self.spec):
|
||||
run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir))
|
||||
|
||||
|
||||
def setup_dependent_package(self, module, ext_spec):
|
||||
"""
|
||||
Called before R modules' install() methods.
|
||||
|
||||
In most cases, extensions will only need to have one line::
|
||||
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
||||
"""
|
||||
# R extension builds can have a global R executable function
|
||||
module.R = Executable(join_path(self.spec.prefix.bin, 'R'))
|
||||
|
||||
# Add variable for library directry
|
||||
module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir)
|
||||
|
||||
# Make the site packages directory for extensions, if it does not exist already.
|
||||
if ext_spec.package.is_extension:
|
||||
mkdirp(module.r_lib_dir)
|
||||
|
47
var/spack/repos/builtin/packages/antlr/package.py
Normal file
47
var/spack/repos/builtin/packages/antlr/package.py
Normal file
@@ -0,0 +1,47 @@
|
||||
from spack import *
|
||||
|
||||
class Antlr(Package):
|
||||
|
||||
homepage = "http://www.antlr.org"
|
||||
url = "https://github.com/antlr/antlr/tarball/v2.7.7"
|
||||
|
||||
# NOTE: This requires that a system Java be available.
|
||||
# Spack does not yet know how to install Java compilers
|
||||
|
||||
# Notes from http://nco.sourceforge.net/#bld
|
||||
# The first steps to build (i.e., compile, for the most part) NCO from
|
||||
# source code are to install the pre-requisites: ANTLR version 2.7.7
|
||||
# (like this one not version 3.x or 4.x!) (required for ncap2)... ANTLR
|
||||
# binaries from major distributions are pre-built with the source patch
|
||||
# necessary to allow NCO to link to ANTLR... The ANTLR source file
|
||||
# CharScanner.hpp must include this line: #include <cstring> or else
|
||||
# ncap2 will not compile (this tarball is already patched).
|
||||
version('2.7.7', '914865e853fe8e1e61a9f23d045cb4ab',
|
||||
# Patched version as described above
|
||||
url='http://dust.ess.uci.edu/tmp/antlr-2.7.7.tar.gz')
|
||||
# Unpatched version
|
||||
# url='http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz')
|
||||
|
||||
variant('cxx', default=False, description='Enable ANTLR for C++')
|
||||
variant('java', default=False, description='Enable ANTLR for Java')
|
||||
variant('python', default=False, description='Enable ANTLR for Python')
|
||||
variant('csharp', default=False, description='Enable ANTLR for Csharp')
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Check for future enabling of variants
|
||||
for v in ('+java', '+python', '+csharp'):
|
||||
if v in spec:
|
||||
raise Error('Illegal variant %s; for now, Spack only knows how to build antlr or antlr+cxx')
|
||||
|
||||
config_args = [
|
||||
'--prefix=%s' % prefix,
|
||||
'--%s-cxx' % ('enable' if '+cxx' in spec else 'disable'),
|
||||
'--%s-java' % ('enable' if '+java' in spec else 'disable'),
|
||||
'--%s-python' % ('enable' if '+python' in spec else 'disable'),
|
||||
'--%s-csharp' % ('enable' if '+csharp' in spec else 'disable')]
|
||||
|
||||
# which('autoreconf')('-iv')
|
||||
configure(*config_args)
|
||||
make()
|
||||
make("install")
|
@@ -1,8 +1,11 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Astyle(Package):
|
||||
"""A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code."""
|
||||
"""
|
||||
A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI,
|
||||
Objective-C, C#, and Java Source Code.
|
||||
"""
|
||||
homepage = "http://astyle.sourceforge.net/"
|
||||
url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz"
|
||||
|
||||
@@ -11,8 +14,15 @@ class Astyle(Package):
|
||||
def install(self, spec, prefix):
|
||||
|
||||
with working_dir('src'):
|
||||
# we need to edit the makefile in place to set compiler:
|
||||
make_file = join_path(self.stage.source_path,
|
||||
'build', 'gcc', 'Makefile')
|
||||
filter_file(r'^CXX\s*=.*', 'CXX=%s'.format(spack_cxx), make_file)
|
||||
|
||||
make('-f',
|
||||
join_path(self.stage.source_path,'build','clang','Makefile'),
|
||||
parallel=False)
|
||||
make_file,
|
||||
parallel=False)
|
||||
|
||||
mkdirp(self.prefix.bin)
|
||||
install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin)
|
||||
install(join_path(self.stage.source_path, 'src', 'bin', 'astyle'),
|
||||
self.prefix.bin)
|
||||
|
@@ -29,6 +29,7 @@ def install(self, spec, prefix):
|
||||
configure_args = [
|
||||
'--prefix=%s' % prefix,
|
||||
'--disable-dependency-tracking',
|
||||
'--disable-werror',
|
||||
'--enable-interwork',
|
||||
'--enable-multilib',
|
||||
'--enable-shared',
|
||||
|
@@ -10,6 +10,8 @@ class Bison(Package):
|
||||
|
||||
version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8')
|
||||
|
||||
depends_on("m4")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# Copyright (c) 2015 Krell Institute. All Rights Reserved.
|
||||
# Copyright (c) 2015-2016 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
|
||||
@@ -24,43 +24,83 @@ class CbtfArgonavis(Package):
|
||||
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
|
||||
|
||||
# Mirror access template example
|
||||
#url = "file:/g/g24/jeg/cbtf-argonavis-1.5.tar.gz"
|
||||
#version('1.5', '1f7f6512f55409ed2135cfceabe26b82')
|
||||
#url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz"
|
||||
#version('1.6', '0fafa0008478405c2c2319450f174ed4')
|
||||
|
||||
version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-argonavis/cbtf-argonavis')
|
||||
version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
|
||||
|
||||
depends_on("cmake@3.0.2:")
|
||||
depends_on("cmake@3.0.2")
|
||||
depends_on("boost@1.50.0:")
|
||||
depends_on("papi")
|
||||
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
|
||||
depends_on("cbtf")
|
||||
depends_on("cbtf-krell")
|
||||
depends_on("cuda")
|
||||
depends_on("cuda@6.0.37")
|
||||
#depends_on("cuda")
|
||||
|
||||
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)
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
# Look for package installation information in the cbtf and cbtf-krell prefixes
|
||||
cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix)
|
||||
|
||||
# FIXME, hard coded for testing purposes, we will alter when the external package feature is available
|
||||
cuda_prefix_path = "/usr/local/cudatoolkit-6.0"
|
||||
cupti_prefix_path = "/usr/local/cudatoolkit-6.0/extras/CUPTI"
|
||||
|
||||
|
||||
with working_dir('CUDA'):
|
||||
with working_dir('build', create=True):
|
||||
cmake('..',
|
||||
'-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
'-DCUDA_INSTALL_PATH=%s' % cuda_prefix_path,
|
||||
'-DCUDA_ROOT=%s' % cuda_prefix_path,
|
||||
'-DCUPTI_ROOT=%s' % cupti_prefix_path,
|
||||
'-DCUDA_DIR=%s' % cuda_prefix_path,
|
||||
'-DPAPI_ROOT=%s' % spec['papi'].prefix,
|
||||
'-DCBTF_PREFIX=%s' % spec['cbtf'].prefix,
|
||||
*std_cmake_args)
|
||||
make("clean")
|
||||
make()
|
||||
make("install")
|
||||
|
||||
cmakeOptions = []
|
||||
cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
'-DCUDA_DIR=%s' % spec['cuda'].prefix,
|
||||
'-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix,
|
||||
'-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix,
|
||||
'-DCUPTI_DIR=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'),
|
||||
'-DCUPTI_ROOT=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'),
|
||||
'-DPAPI_ROOT=%s' % spec['papi'].prefix,
|
||||
'-DCBTF_DIR=%s' % spec['cbtf'].prefix,
|
||||
'-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
|
||||
'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
'-DBoost_DIR=%s' % spec['boost'].prefix,
|
||||
'-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib,
|
||||
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
'-DBoost_NO_SYSTEM_PATHS=ON'
|
||||
])
|
||||
|
||||
# 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")
|
||||
|
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# Copyright (c) 2015 Krell Institute. All Rights Reserved.
|
||||
# Copyright (c) 2015-2016 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
|
||||
@@ -26,21 +26,30 @@ class CbtfKrell(Package):
|
||||
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
|
||||
|
||||
# optional mirror access template
|
||||
#url = "file:/g/g24/jeg/cbtf-krell-1.5.tar.gz"
|
||||
#version('1.5', 'b13f6df6a93c44149d977773dd776d2f')
|
||||
#url = "file:/home/jeg/cbtf-krell-1.6.tar.gz"
|
||||
#version('1.6', 'edeb61cd488f16e7b124f77db9ce762d')
|
||||
|
||||
version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-krell/cbtf-krell')
|
||||
version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-krell.git')
|
||||
|
||||
# MPI variants
|
||||
variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.")
|
||||
variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.")
|
||||
variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.")
|
||||
variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.")
|
||||
variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.")
|
||||
variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.")
|
||||
|
||||
# Dependencies for cbtf-krell
|
||||
depends_on("cmake@3.0.2")
|
||||
|
||||
# For binutils service
|
||||
depends_on("binutils@2.24+krellpatch")
|
||||
|
||||
# collectionTool
|
||||
depends_on("boost@1.50.0")
|
||||
depends_on("dyninst@8.2.1")
|
||||
depends_on("mrnet@4.1.0:+lwthreads")
|
||||
depends_on("boost@1.50.0:")
|
||||
depends_on("dyninst@8.2.1:")
|
||||
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
|
||||
|
||||
depends_on("xerces-c@3.1.1:")
|
||||
depends_on("cbtf")
|
||||
|
||||
@@ -51,66 +60,207 @@ class CbtfKrell(Package):
|
||||
|
||||
# MPI Installations
|
||||
# These have not worked either for build or execution, commenting out for now
|
||||
#depends_on("openmpi")
|
||||
#depends_on("mvapich2@2.0")
|
||||
#depends_on("mpich")
|
||||
depends_on("openmpi", when='+openmpi')
|
||||
depends_on("mpich", when='+mpich')
|
||||
depends_on("mpich2", when='+mpich2')
|
||||
depends_on("mvapich2", when='+mvapich2')
|
||||
depends_on("mvapich", when='+mvapich')
|
||||
depends_on("mpt", when='+mpt')
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
def set_mpi_cmakeOptions(self, spec, cmakeOptions):
|
||||
# Appends to cmakeOptions the options that will enable the appropriate MPI implementations
|
||||
|
||||
MPIOptions = []
|
||||
|
||||
# openmpi
|
||||
if '+openmpi' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix
|
||||
])
|
||||
# mpich
|
||||
if '+mpich' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMPICH_DIR=%s' % spec['mpich'].prefix
|
||||
])
|
||||
# mpich2
|
||||
if '+mpich2' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMPICH2_DIR=%s' % spec['mpich2'].prefix
|
||||
])
|
||||
# mvapich
|
||||
if '+mvapich' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMVAPICH_DIR=%s' % spec['mvapich'].prefix
|
||||
])
|
||||
# mvapich2
|
||||
if '+mvapich2' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix
|
||||
])
|
||||
# mpt
|
||||
if '+mpt' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMPT_DIR=%s' % spec['mpt'].prefix
|
||||
])
|
||||
|
||||
cmakeOptions.extend(MPIOptions)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
# 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)
|
||||
|
||||
# FIXME - hard code path until external package support is available
|
||||
# Need to change this path and/or add additional paths for MPI experiment support on different platforms
|
||||
#openmpi_prefix_path = "/opt/openmpi-1.8.2"
|
||||
#mvapich_prefix_path = "/usr/local/tools/mvapich-gnu"
|
||||
|
||||
# Other possibilities, they will need a -DMVAPICH_DIR=, etc clause in the cmake command to be recognized
|
||||
# mvapich_prefix_path = "<mvapich install path>"
|
||||
# mvapich2_prefix_path = "<mvapich2 install path>"
|
||||
# mpich2_prefix_path = "<mpich2 install path>"
|
||||
# mpich_prefix_path = "<mpich install path>"
|
||||
# mpt_prefix_path = "<mpt install path>"
|
||||
|
||||
# Add in paths for cuda if requested via the cuda variant
|
||||
# FIXME - hard code path until external package support is available
|
||||
#if '+cuda' in spec:
|
||||
# cuda_prefix_path = "/usr/local/cuda-6.0"
|
||||
# cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI"
|
||||
#else:
|
||||
# cuda_prefix_path = ""
|
||||
# cupti_prefix_path = ""
|
||||
|
||||
#'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix,
|
||||
#'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix,
|
||||
#'-DMPICH_DIR=%s' % spec['mpich'].prefix,
|
||||
#'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
#'-DOPENMPI_DIR=%s' % openmpi_prefix_path,
|
||||
#'-DMVAPICH_DIR=%s' % mvapich_prefix_path,
|
||||
#'-DLIB_SUFFIX=64',
|
||||
#'-DCUDA_DIR=%s' % cuda_prefix_path,
|
||||
#'-DCUPTI_DIR=%s' % cupti_prefix_path,
|
||||
#cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['dyninst'].prefix)
|
||||
#'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path
|
||||
|
||||
# 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,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
*std_cmake_args)
|
||||
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, 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
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# Copyright (c) 2015 Krell Institute. All Rights Reserved.
|
||||
# Copyright (c) 2015-2016 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
|
||||
@@ -29,32 +29,65 @@ class CbtfLanl(Package):
|
||||
|
||||
version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl')
|
||||
|
||||
|
||||
depends_on("cmake@3.0.2")
|
||||
# Dependencies for cbtf-krell
|
||||
depends_on("boost@1.50")
|
||||
depends_on("mrnet@4.1.0:+lwthreads")
|
||||
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
|
||||
depends_on("xerces-c@3.1.1:")
|
||||
depends_on("cbtf")
|
||||
depends_on("cbtf-krell")
|
||||
|
||||
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)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
# 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['cbtf-krell'].prefix)
|
||||
|
||||
with working_dir('build', create=True):
|
||||
cmake('..',
|
||||
'-DCBTF_DIR=%s' % spec['cbtf'].prefix,
|
||||
'-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
|
||||
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
'-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake'),
|
||||
*std_cmake_args)
|
||||
cmakeOptions = []
|
||||
cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCBTF_DIR=%s' % spec['cbtf'].prefix,
|
||||
'-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
|
||||
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
'-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake')
|
||||
])
|
||||
|
||||
make("clean")
|
||||
make()
|
||||
make("install")
|
||||
# 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")
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# Copyright (c) 2015 Krell Institute. All Rights Reserved.
|
||||
# Copyright (c) 2015-2016 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
|
||||
@@ -25,21 +25,44 @@ class Cbtf(Package):
|
||||
homepage = "http://sourceforge.net/p/cbtf/wiki/Home"
|
||||
|
||||
# Mirror access template example
|
||||
#url = "file:/g/g24/jeg/cbtf-1.5.tar.gz"
|
||||
#version('1.6', '1ca88a8834759c4c74452cb97fe7b70a')
|
||||
#url = "file:/home/jeg/cbtf-1.6.tar.gz"
|
||||
#version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987')
|
||||
|
||||
# Use when the git repository is available
|
||||
version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf')
|
||||
version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf.git')
|
||||
|
||||
depends_on("cmake")
|
||||
#depends_on("boost@1.42.0:")
|
||||
depends_on("boost@1.50.0")
|
||||
depends_on("mrnet@4.1.0+lwthreads")
|
||||
variant('runtime', default=False, description="build only the runtime libraries and collectors.")
|
||||
|
||||
depends_on("cmake@3.0.2")
|
||||
depends_on("boost@1.50.0:")
|
||||
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
|
||||
depends_on("xerces-c@3.1.1:")
|
||||
depends_on("libxml2")
|
||||
# Work around for spack libxml2 package bug, take off python when fixed
|
||||
depends_on("libxml2+python")
|
||||
|
||||
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)
|
||||
BuildTypeOptions.extend([
|
||||
'-DCMAKE_BUILD_TYPE=None',
|
||||
'-DCMAKE_CXX_FLAGS=%s' % compile_flags,
|
||||
'-DCMAKE_C_FLAGS=%s' % compile_flags
|
||||
])
|
||||
|
||||
cmakeOptions.extend(BuildTypeOptions)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('build', create=True):
|
||||
|
||||
@@ -48,14 +71,45 @@ def install(self, spec, prefix):
|
||||
# or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT.
|
||||
# Defaults to OFF.
|
||||
|
||||
cmake('..',
|
||||
'--debug-output',
|
||||
'-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
|
||||
'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
'-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake'),
|
||||
*std_cmake_args)
|
||||
if '+runtime' in spec:
|
||||
# Install message tag include file for use in Intel MIC cbtf-krell build
|
||||
# FIXME
|
||||
cmakeOptions = []
|
||||
cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
|
||||
'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
'-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake')
|
||||
])
|
||||
|
||||
# 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)
|
||||
|
||||
else:
|
||||
cmakeOptions = []
|
||||
cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
'-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
|
||||
'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
'-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
'-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake')
|
||||
])
|
||||
|
||||
# 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()
|
||||
|
@@ -13,6 +13,7 @@ class Cryptopp(Package):
|
||||
|
||||
version('5.6.3', '3c5b70e2ec98b7a24988734446242d07')
|
||||
version('5.6.2', '7ed022585698df48e65ce9218f6c6a67')
|
||||
version('5.6.1', '96cbeba0907562b077e26bcffb483828')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make()
|
||||
|
@@ -42,7 +42,7 @@ class Fftw(Package):
|
||||
variant('float', default=True, description='Produces a single precision version of the library')
|
||||
variant('long_double', default=True, description='Produces a long double precision version of the library')
|
||||
variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)')
|
||||
|
||||
variant('openmp', default=False, description="Enable OpenMP support.")
|
||||
variant('mpi', default=False, description='Activate MPI support')
|
||||
|
||||
depends_on('mpi', when='+mpi')
|
||||
@@ -52,8 +52,15 @@ class Fftw(Package):
|
||||
def install(self, spec, prefix):
|
||||
options = ['--prefix=%s' % prefix,
|
||||
'--enable-shared',
|
||||
'--enable-threads',
|
||||
'--enable-openmp']
|
||||
'--enable-threads']
|
||||
# Add support for OpenMP
|
||||
if '+openmp' in spec:
|
||||
# Note: Apple's Clang does not support OpenMP.
|
||||
if spec.satisfies('%clang'):
|
||||
ver = str(self.compiler.version)
|
||||
if ver.endswith('-apple'):
|
||||
raise InstallError("Apple's clang does not support OpenMP")
|
||||
options.append('--enable-openmp')
|
||||
if not self.compiler.f77 or not self.compiler.fc:
|
||||
options.append("--disable-fortran")
|
||||
if '+mpi' in spec:
|
||||
|
@@ -34,6 +34,7 @@ class Gdb(Package):
|
||||
homepage = "https://www.gnu.org/software/gdb"
|
||||
url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz"
|
||||
|
||||
version('7.11', 'f585059252836a981ea5db9a5f8ce97f')
|
||||
version('7.10.1', 'b93a2721393e5fa226375b42d567d90b')
|
||||
version('7.10', 'fa6827ad0fd2be1daa418abb11a54d86')
|
||||
version('7.9.1', 'f3b97de919a9dba84490b2e076ec4cb0')
|
||||
|
@@ -1,4 +1,5 @@
|
||||
from spack import *
|
||||
import sys
|
||||
|
||||
class Glib(Package):
|
||||
"""The GLib package contains a low-level libraries useful for
|
||||
@@ -12,6 +13,8 @@ class Glib(Package):
|
||||
|
||||
depends_on("libffi")
|
||||
depends_on("zlib")
|
||||
depends_on("pkg-config")
|
||||
depends_on('gettext', sys.platform=='darwin')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
@@ -63,6 +63,11 @@ def install(self, spec, prefix):
|
||||
build_directory = join_path(self.stage.path, 'spack-build')
|
||||
source_directory = self.stage.source_path
|
||||
|
||||
options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
|
||||
|
||||
# Prevent GMsh from using its own strange directory structure on OSX
|
||||
options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF')
|
||||
|
||||
if '+shared' in spec:
|
||||
options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON',
|
||||
'-DENABLE_BUILD_DYNAMIC:BOOL=ON']) # Builds dynamic executable and installs shared library
|
||||
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
|
||||
from spack import *
|
||||
import shutil
|
||||
|
||||
|
||||
class Hdf5(Package):
|
||||
@@ -114,14 +115,16 @@ def install(self, spec, prefix):
|
||||
# this is not actually a problem.
|
||||
extra_args.extend([
|
||||
"--enable-parallel",
|
||||
"CC=%s" % spec['mpi'].prefix.bin + "/mpicc",
|
||||
"CC=%s" % join_path(spec['mpi'].prefix.bin, "mpicc"),
|
||||
])
|
||||
|
||||
if '+cxx' in spec:
|
||||
extra_args.append("CXX=%s" % spec['mpi'].prefix.bin + "/mpic++")
|
||||
extra_args.append("CXX=%s" % join_path(spec['mpi'].prefix.bin,
|
||||
"mpic++"))
|
||||
|
||||
if '+fortran' in spec:
|
||||
extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort")
|
||||
extra_args.append("FC=%s" % join_path(spec['mpi'].prefix.bin,
|
||||
"mpifort"))
|
||||
|
||||
if '+szip' in spec:
|
||||
extra_args.append("--with-szlib=%s" % spec['szip'].prefix)
|
||||
@@ -138,6 +141,58 @@ def install(self, spec, prefix):
|
||||
*extra_args)
|
||||
make()
|
||||
make("install")
|
||||
self.check_install(spec)
|
||||
|
||||
def check_install(self, spec):
|
||||
"Build and run a small program to test the installed HDF5 library"
|
||||
print "Checking HDF5 installation..."
|
||||
checkdir = "spack-check"
|
||||
with working_dir(checkdir, create=True):
|
||||
source = r"""
|
||||
#include <hdf5.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv) {
|
||||
unsigned majnum, minnum, relnum;
|
||||
herr_t herr = H5get_libversion(&majnum, &minnum, &relnum);
|
||||
assert(!herr);
|
||||
printf("HDF5 version %d.%d.%d %u.%u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR,
|
||||
H5_VERS_RELEASE, majnum, minnum, relnum);
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
expected = """\
|
||||
HDF5 version {version} {version}
|
||||
""".format(version=str(spec.version))
|
||||
with open("check.c", 'w') as f:
|
||||
f.write(source)
|
||||
if '+mpi' in spec:
|
||||
cc = which(join_path(spec['mpi'].prefix.bin, "mpicc"))
|
||||
else:
|
||||
cc = which('cc')
|
||||
# TODO: Automate these path and library settings
|
||||
cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c")
|
||||
cc('-o', "check", "check.o",
|
||||
"-L%s" % join_path(spec.prefix, "lib"), "-lhdf5",
|
||||
"-lz")
|
||||
try:
|
||||
check = Executable('./check')
|
||||
output = check(return_output=True)
|
||||
except:
|
||||
output = ""
|
||||
success = output == expected
|
||||
if not success:
|
||||
print "Produced output does not match expected output."
|
||||
print "Expected output:"
|
||||
print '-'*80
|
||||
print expected
|
||||
print '-'*80
|
||||
print "Produced output:"
|
||||
print '-'*80
|
||||
print output
|
||||
print '-'*80
|
||||
raise RuntimeError("HDF5 install check failed")
|
||||
shutil.rmtree(checkdir)
|
||||
|
||||
def url_for_version(self, version):
|
||||
v = str(version)
|
||||
|
@@ -17,6 +17,7 @@ class Hwloc(Package):
|
||||
list_url = "http://www.open-mpi.org/software/hwloc/"
|
||||
list_depth = 3
|
||||
|
||||
version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f')
|
||||
version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23')
|
||||
version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc')
|
||||
version('1.9', '1f9f9155682fe8946a97c08896109508')
|
||||
|
@@ -1,14 +1,19 @@
|
||||
from spack import *
|
||||
|
||||
class Jpeg(Package):
|
||||
"""jpeg library"""
|
||||
homepage = "http://www.ijg.org"
|
||||
url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz"
|
||||
"""libjpeg is a widely used free library with functions for handling the
|
||||
JPEG image data format. It implements a JPEG codec (encoding and decoding)
|
||||
alongside various utilities for handling JPEG data."""
|
||||
|
||||
homepage = "http://www.ijg.org"
|
||||
url = "http://www.ijg.org/files/jpegsrc.v9b.tar.gz"
|
||||
|
||||
version('9b', '6a9996ce116ec5c52b4870dbcd6d3ddb')
|
||||
version('9a', '3353992aecaee1805ef4109aadd433e7')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
||||
make()
|
||||
make("test")
|
||||
make("install")
|
||||
|
32
var/spack/repos/builtin/packages/kripke/package.py
Normal file
32
var/spack/repos/builtin/packages/kripke/package.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from spack import *
|
||||
|
||||
class Kripke(Package):
|
||||
"""Kripke is a simple, scalable, 3D Sn deterministic particle
|
||||
transport proxy/mini app.
|
||||
"""
|
||||
homepage = "https://codesign.llnl.gov/kripke.php"
|
||||
url = "https://codesign.llnl.gov/downloads/kripke-openmp-1.1.tar.gz"
|
||||
|
||||
version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf')
|
||||
|
||||
variant('mpi', default=True, description='Build with MPI.')
|
||||
variant('openmp', default=True, description='Build with OpenMP enabled.')
|
||||
|
||||
depends_on('mpi', when="+mpi")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('build', create=True):
|
||||
def enabled(variant):
|
||||
return (1 if variant in spec else 0)
|
||||
|
||||
cmake('-DCMAKE_INSTALL_PREFIX:PATH=.',
|
||||
'-DENABLE_OPENMP=%d' % enabled('+openmp'),
|
||||
'-DENABLE_MPI=%d' % enabled('+mpi'),
|
||||
'..',
|
||||
*std_cmake_args)
|
||||
make()
|
||||
|
||||
# Kripke does not provide install target, so we have to copy
|
||||
# things into place.
|
||||
mkdirp(prefix.bin)
|
||||
install('kripke', prefix.bin)
|
17
var/spack/repos/builtin/packages/libtermkey/package.py
Normal file
17
var/spack/repos/builtin/packages/libtermkey/package.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from spack import *
|
||||
|
||||
class Libtermkey(Package):
|
||||
"""Easy keyboard entry processing for terminal programs"""
|
||||
homepage = "http://www.leonerd.org.uk/code/libtermkey/"
|
||||
url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz"
|
||||
|
||||
version('0.18' , '3be2e3e5a851a49cc5e8567ac108b520')
|
||||
version('0.17' , '20edb99e0d95ec1690fe90e6a555ae6d')
|
||||
version('0.16' , '7a24b675aaeb142d30db28e7554987d4')
|
||||
version('0.15b', '27689756e6c86c56ae454f2ac259bc3d')
|
||||
version('0.14' , 'e08ce30f440f9715c459060e0e048978')
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make()
|
||||
make("install", "PREFIX=" + prefix)
|
21
var/spack/repos/builtin/packages/libuv/package.py
Normal file
21
var/spack/repos/builtin/packages/libuv/package.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from spack import *
|
||||
|
||||
class Libuv(Package):
|
||||
"""Multi-platform library with a focus on asynchronous IO"""
|
||||
homepage = "http://libuv.org"
|
||||
url = "https://github.com/libuv/libuv/archive/v1.9.0.tar.gz"
|
||||
|
||||
version('1.9.0', '14737f9c76123a19a290dabb7d1cd04c')
|
||||
|
||||
depends_on('automake')
|
||||
depends_on('autoconf')
|
||||
depends_on('libtool')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
bash = which("bash")
|
||||
bash('autogen.sh')
|
||||
configure('--prefix=%s' % prefix)
|
||||
|
||||
make()
|
||||
make("check")
|
||||
make("install")
|
12
var/spack/repos/builtin/packages/libvterm/package.py
Normal file
12
var/spack/repos/builtin/packages/libvterm/package.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from spack import *
|
||||
|
||||
class Libvterm(Package):
|
||||
"""An abstract library implementation of a terminal emulator"""
|
||||
homepage = "http://www.leonerd.org.uk/code/libvterm/"
|
||||
url = "http://www.leonerd.org.uk/code/libvterm/libvterm-0+bzr681.tar.gz"
|
||||
|
||||
version('681', '7a4325a7350b7092245c04e8ee185ac3')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make()
|
||||
make("install", "PREFIX=" + prefix)
|
@@ -13,6 +13,7 @@ class Libxcb(Package):
|
||||
version('1.11.1', '118623c15a96b08622603a71d8789bf3')
|
||||
depends_on("python")
|
||||
depends_on("xcb-proto")
|
||||
depends_on("pkg-config")
|
||||
|
||||
# depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev
|
||||
# depends_on('xau') # Ubuntu: apt-get install libxau-dev
|
||||
|
@@ -43,6 +43,8 @@ class Mpich(Package):
|
||||
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
|
||||
|
||||
variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
|
||||
variant('pmi', default=True, description='Build with PMI support')
|
||||
variant('hydra', default=True, description='Build the hydra process manager')
|
||||
|
||||
provides('mpi@:3.0', when='@3:')
|
||||
provides('mpi@:1.3', when='@1:')
|
||||
@@ -62,6 +64,8 @@ def setup_dependent_package(self, module, dep_spec):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
config_args = ["--prefix=" + prefix,
|
||||
"--with-pmi=" + ("yes" if '+pmi' in spec else 'no'),
|
||||
"--with-pm=" + ('hydra' if '+hydra' in spec else 'no'),
|
||||
"--enable-shared"]
|
||||
|
||||
# Variants
|
||||
|
14
var/spack/repos/builtin/packages/msgpack-c/package.py
Normal file
14
var/spack/repos/builtin/packages/msgpack-c/package.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from spack import *
|
||||
|
||||
class MsgpackC(Package):
|
||||
"""A small, fast binary interchange format convertible to/from JSON"""
|
||||
homepage = "http://www.msgpack.org"
|
||||
url = "https://github.com/msgpack/msgpack-c/archive/cpp-1.4.1.tar.gz"
|
||||
|
||||
version('1.4.1', 'e2fd3a7419b9bc49e5017fdbefab87e0')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
cmake('.', *std_cmake_args)
|
||||
|
||||
make()
|
||||
make("install")
|
23
var/spack/repos/builtin/packages/nccmp/package.py
Normal file
23
var/spack/repos/builtin/packages/nccmp/package.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from spack import *
|
||||
|
||||
class Nccmp(Package):
|
||||
"""Compare NetCDF Files"""
|
||||
homepage = "http://nccmp.sourceforge.net/"
|
||||
url = "http://downloads.sourceforge.net/project/nccmp/nccmp-1.8.2.0.tar.gz"
|
||||
|
||||
version('1.8.2.0', '81e6286d4413825aec4327e61a28a580')
|
||||
|
||||
depends_on('netcdf')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Configure says: F90 and F90FLAGS are replaced by FC and
|
||||
# FCFLAGS respectively in this configure, please unset
|
||||
# F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure
|
||||
# again.
|
||||
env.pop('F90', None)
|
||||
env.pop('F90FLAGS', None)
|
||||
|
||||
configure('--prefix=%s' % prefix)
|
||||
make()
|
||||
make("check")
|
||||
make("install")
|
30
var/spack/repos/builtin/packages/nco/package.py
Normal file
30
var/spack/repos/builtin/packages/nco/package.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
class Nco(Package):
|
||||
"""The NCO toolkit manipulates and analyzes data stored in
|
||||
netCDF-accessible formats"""
|
||||
|
||||
homepage = "https://sourceforge.net/projects/nco"
|
||||
url = "https://github.com/nco/nco/archive/4.5.5.tar.gz"
|
||||
|
||||
version('4.5.5', '9f1f1cb149ad6407c5a03c20122223ce')
|
||||
|
||||
# See "Compilation Requirements" at:
|
||||
# http://nco.sourceforge.net/#bld
|
||||
|
||||
depends_on('netcdf')
|
||||
depends_on('antlr@2.7.7+cxx') # (required for ncap2)
|
||||
depends_on('gsl') # (desirable for ncap2)
|
||||
depends_on('udunits2') # (allows dimensional unit transformations)
|
||||
# depends_on('opendap') # (enables network transparency),
|
||||
|
||||
def install(self, spec, prefix):
|
||||
opts = [
|
||||
'--prefix=%s' % prefix,
|
||||
'--disable-openmp', # TODO: Make this a variant
|
||||
'--disable-dap', # TODO: Make this a variant
|
||||
'--disable-esmf']
|
||||
configure(*opts)
|
||||
make()
|
||||
make("install")
|
@@ -1,20 +1,21 @@
|
||||
from spack import *
|
||||
import sys
|
||||
from spack.package_test import *
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
class Openblas(Package):
|
||||
"""OpenBLAS: An optimized BLAS library"""
|
||||
homepage = "http://www.openblas.net"
|
||||
url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
|
||||
|
||||
version('0.2.18', '805e7f660877d588ea7e3792cda2ee65')
|
||||
version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1')
|
||||
version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc')
|
||||
version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9')
|
||||
|
||||
variant('shared', default=True, description="Build shared libraries as well as static libs.")
|
||||
variant('openmp', default=True, description="Enable OpenMP support.")
|
||||
variant('fpic', default=True, description="Build position independent code")
|
||||
variant('shared', default=True, description="Build shared libraries as well as static libs.") # NOQA: ignore=E501
|
||||
variant('openmp', default=False, description="Enable OpenMP support.")
|
||||
variant('fpic', default=True, description="Build position independent code") # NOQA: ignore=E501
|
||||
|
||||
# virtual dependency
|
||||
provides('blas')
|
||||
@@ -45,8 +46,13 @@ def install(self, spec, prefix):
|
||||
make_defs += ['BUILD_LAPACK_DEPRECATED=1']
|
||||
|
||||
# Add support for OpenMP
|
||||
# Note: Make sure your compiler supports OpenMP
|
||||
if '+openmp' in spec:
|
||||
# Openblas (as of 0.2.18) hardcoded that OpenMP cannot
|
||||
# be used with any (!) compiler named clang, bummer.
|
||||
if spec.satisfies('%clang'):
|
||||
raise InstallError('OpenBLAS does not support ',
|
||||
'OpenMP with clang!')
|
||||
|
||||
make_defs += ['USE_OPENMP=1']
|
||||
|
||||
make_args = make_defs + make_targets
|
||||
@@ -62,84 +68,49 @@ def install(self, spec, prefix):
|
||||
symlink('libopenblas.a', 'blas.a')
|
||||
symlink('libopenblas.a', 'libblas.a')
|
||||
if '+shared' in spec:
|
||||
symlink('libopenblas.%s' % dso_suffix, 'libblas.%s' % dso_suffix)
|
||||
symlink('libopenblas.%s' % dso_suffix,
|
||||
'libblas.%s' % dso_suffix)
|
||||
|
||||
# Lapack virtual package should provide liblapack.a
|
||||
with working_dir(prefix.lib):
|
||||
symlink('libopenblas.a', 'liblapack.a')
|
||||
if '+shared' in spec:
|
||||
symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix)
|
||||
symlink('libopenblas.%s' % dso_suffix,
|
||||
'liblapack.%s' % dso_suffix)
|
||||
|
||||
# Openblas may pass its own test but still fail to compile Lapack
|
||||
# symbols. To make sure we get working Blas and Lapack, do a small test.
|
||||
# symbols. To make sure we get working Blas and Lapack, do a small
|
||||
# test.
|
||||
self.check_install(spec)
|
||||
|
||||
|
||||
def setup_dependent_package(self, module, dspec):
|
||||
# This is WIP for a prototype interface for virtual packages.
|
||||
# We can update this as more builds start depending on BLAS/LAPACK.
|
||||
libdir = find_library_path('libopenblas.a', self.prefix.lib64, self.prefix.lib)
|
||||
libdir = find_library_path('libopenblas.a',
|
||||
self.prefix.lib64,
|
||||
self.prefix.lib)
|
||||
|
||||
self.spec.blas_static_lib = join_path(libdir, 'libopenblas.a')
|
||||
self.spec.lapack_static_lib = self.spec.blas_static_lib
|
||||
|
||||
if '+shared' in self.spec:
|
||||
self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix)
|
||||
self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' %
|
||||
dso_suffix)
|
||||
self.spec.lapack_shared_lib = self.spec.blas_shared_lib
|
||||
|
||||
def check_install(self, spec):
|
||||
"Build and run a small program to test that we have Lapack symbols"
|
||||
print "Checking Openblas installation..."
|
||||
checkdir = "spack-check"
|
||||
with working_dir(checkdir, create=True):
|
||||
source = r"""
|
||||
#include <cblas.h>
|
||||
#include <stdio.h>
|
||||
int main(void) {
|
||||
int i=0;
|
||||
double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
|
||||
double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
|
||||
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
|
||||
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
|
||||
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
|
||||
for (i = 0; i < 9; i++)
|
||||
printf("%f\n", C[i]);
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
expected = """\
|
||||
11.000000
|
||||
-9.000000
|
||||
5.000000
|
||||
-9.000000
|
||||
21.000000
|
||||
-1.000000
|
||||
5.000000
|
||||
-1.000000
|
||||
3.000000
|
||||
"""
|
||||
with open("check.c", 'w') as f:
|
||||
f.write(source)
|
||||
cc = which('cc')
|
||||
# TODO: Automate these path and library settings
|
||||
cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c")
|
||||
cc('-o', "check", "check.o",
|
||||
"-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", "-lpthread")
|
||||
try:
|
||||
check = Executable('./check')
|
||||
output = check(return_output=True)
|
||||
except:
|
||||
output = ""
|
||||
success = output == expected
|
||||
if not success:
|
||||
print "Produced output does not match expected output."
|
||||
print "Expected output:"
|
||||
print '-'*80
|
||||
print expected
|
||||
print '-'*80
|
||||
print "Produced output:"
|
||||
print '-'*80
|
||||
print output
|
||||
print '-'*80
|
||||
raise RuntimeError("Openblas install check failed")
|
||||
shutil.rmtree(checkdir)
|
||||
source_file = join_path(os.path.dirname(self.module.__file__),
|
||||
'test_cblas_dgemm.c')
|
||||
blessed_file = join_path(os.path.dirname(self.module.__file__),
|
||||
'test_cblas_dgemm.output')
|
||||
|
||||
include_flags = ["-I%s" % join_path(spec.prefix, "include")]
|
||||
link_flags = ["-L%s" % join_path(spec.prefix, "lib"),
|
||||
"-llapack",
|
||||
"-lblas",
|
||||
"-lpthread"]
|
||||
if '+openmp' in spec:
|
||||
link_flags.extend([self.compiler.openmp_flag])
|
||||
|
||||
output = compile_c_and_execute(source_file, include_flags, link_flags)
|
||||
compare_output_file(output, blessed_file)
|
||||
|
@@ -1,13 +1,49 @@
|
||||
#include <cblas.h>
|
||||
#include <stdio.h>
|
||||
int main(void) {
|
||||
int i=0;
|
||||
double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
|
||||
double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
|
||||
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
|
||||
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
|
||||
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
|
||||
for (i = 0; i < 9; i++)
|
||||
printf("%f\n", C[i]);
|
||||
return 0;
|
||||
|
||||
double m[] = {
|
||||
3, 1, 3,
|
||||
1, 5, 9,
|
||||
2, 6, 5
|
||||
};
|
||||
|
||||
double x[] = {
|
||||
-1, 3, -3
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void dgesv_(int *n, int *nrhs, double *a, int *lda,
|
||||
int *ipivot, double *b, int *ldb, int *info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
int i;
|
||||
// blas:
|
||||
double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
|
||||
double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
|
||||
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
|
||||
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
|
||||
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
|
||||
for (i = 0; i < 9; i++)
|
||||
printf("%f\n", C[i]);
|
||||
|
||||
// lapack:
|
||||
int ipiv[3];
|
||||
int j;
|
||||
int info;
|
||||
int n = 1;
|
||||
int nrhs = 1;
|
||||
int lda = 3;
|
||||
int ldb = 3;
|
||||
dgesv_(&n,&nrhs, &m[0], &lda, ipiv, &x[0], &ldb, &info);
|
||||
for (i=0; i<3; ++i)
|
||||
printf("%5.1f\n", x[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -7,3 +7,6 @@
|
||||
5.000000
|
||||
-1.000000
|
||||
3.000000
|
||||
-0.3
|
||||
3.0
|
||||
-3.0
|
||||
|
@@ -1,6 +1,8 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Openmpi(Package):
|
||||
"""Open MPI is a project combining technologies and resources from
|
||||
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI)
|
||||
@@ -26,16 +28,26 @@ class Openmpi(Package):
|
||||
patch('configure.patch', when="@1.10.0:1.10.1")
|
||||
|
||||
variant('psm', default=False, description='Build support for the PSM library.')
|
||||
variant('psm2', default=False, description='Build support for the Intel PSM2 library.')
|
||||
variant('pmi', default=False, description='Build support for PMI-based launchers')
|
||||
variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
|
||||
variant('mxm', default=False, description='Build Mellanox Messaging support')
|
||||
|
||||
# TODO : variant support for other schedulers is missing
|
||||
variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support')
|
||||
|
||||
# TODO : variant support for alps, loadleveler is missing
|
||||
variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support')
|
||||
variant('slurm', default=False, description='Build SLURM scheduler component')
|
||||
|
||||
variant('sqlite3', default=False, description='Build sqlite3 support')
|
||||
|
||||
# TODO : support for CUDA is missing
|
||||
|
||||
provides('mpi@:2.2', when='@1.6.5')
|
||||
provides('mpi@:3.0', when='@1.7.5:')
|
||||
|
||||
depends_on('hwloc')
|
||||
|
||||
depends_on('sqlite', when='+sqlite3')
|
||||
|
||||
def url_for_version(self, version):
|
||||
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
|
||||
@@ -53,27 +65,35 @@ def setup_dependent_package(self, module, dep_spec):
|
||||
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
|
||||
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
|
||||
|
||||
@property
|
||||
def verbs(self):
|
||||
# Up through version 1.6, this option was previously named --with-openib
|
||||
if self.spec.satisfies('@:1.6'):
|
||||
return 'openib'
|
||||
# In version 1.7, it was renamed to be --with-verbs
|
||||
elif self.spec.satisfies('@1.7:'):
|
||||
return 'verbs'
|
||||
|
||||
def install(self, spec, prefix):
|
||||
config_args = ["--prefix=%s" % prefix,
|
||||
"--with-hwloc=%s" % spec['hwloc'].prefix,
|
||||
"--enable-shared",
|
||||
"--enable-static"]
|
||||
|
||||
# Variants
|
||||
if '+tm' in spec:
|
||||
config_args.append("--with-tm") # necessary for Torque support
|
||||
|
||||
if '+psm' in spec:
|
||||
config_args.append("--with-psm")
|
||||
|
||||
if '+verbs' in spec:
|
||||
# Up through version 1.6, this option was previously named --with-openib
|
||||
if spec.satisfies('@:1.6'):
|
||||
config_args.append("--with-openib")
|
||||
# In version 1.7, it was renamed to be --with-verbs
|
||||
elif spec.satisfies('@1.7:'):
|
||||
config_args.append("--with-verbs")
|
||||
# Variant based arguments
|
||||
config_args.extend([
|
||||
# Schedulers
|
||||
'--with-tm' if '+tm' in spec else '--without-tm',
|
||||
'--with-slurm' if '+slurm' in spec else '--without-slurm',
|
||||
# Fabrics
|
||||
'--with-psm' if '+psm' in spec else '--without-psm',
|
||||
'--with-psm2' if '+psm2' in spec else '--without-psm2',
|
||||
('--with-%s' % self.verbs) if '+verbs' in spec else ('--without-%s' % self.verbs),
|
||||
'--with-mxm' if '+mxm' in spec else '--without-mxm',
|
||||
# Other options
|
||||
'--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple',
|
||||
'--with-pmi' if '+pmi' in spec else '--without-pmi',
|
||||
'--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3'
|
||||
])
|
||||
|
||||
# TODO: use variants for this, e.g. +lanl, +llnl, etc.
|
||||
# use this for LANL builds, but for LLNL builds, we need:
|
||||
@@ -81,9 +101,6 @@ def install(self, spec, prefix):
|
||||
if self.version == ver("1.6.5") and '+lanl' in spec:
|
||||
config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
|
||||
|
||||
# TODO: Spack should make it so that you can't actually find
|
||||
# these compilers if they're "disabled" for the current
|
||||
# compiler configuration.
|
||||
if not self.compiler.f77 and not self.compiler.fc:
|
||||
config_args.append("--enable-mpi-fortran=no")
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# Copyright (c) 2015 Krell Institute. All Rights Reserved.
|
||||
# Copyright (c) 2015-2016 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
|
||||
@@ -28,20 +28,15 @@ class Openspeedshop(Package):
|
||||
as open source code primarily under LGPL.
|
||||
"""
|
||||
|
||||
|
||||
homepage = "http://www.openspeedshop.org"
|
||||
url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.2/openspeedshop-2.2.tar.gz/download"
|
||||
url = "https://github.com/OpenSpeedShop"
|
||||
version('2.2', '16cb051179c2038de4e8a845edf1d573')
|
||||
# Use when the git repository is available
|
||||
version('2.2', branch='master', git='https://github.com/OpenSpeedShop/openspeedshop.git')
|
||||
|
||||
#homepage = "http://www.openspeedshop.org"
|
||||
#url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download"
|
||||
#version('2.1', 'bdaa57c1a0db9d0c3e0303fd8496c507')
|
||||
|
||||
# optional mirror template
|
||||
#url = "file:/g/g24/jeg/openspeedshop-2.1.tar.gz"
|
||||
#version('2.1', '64ee17166519838c7b94a1adc138e94f')
|
||||
|
||||
|
||||
# Optional mirror template
|
||||
#url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz"
|
||||
#version('2.2', '643337740dc6c2faca60f42d3620b0e1')
|
||||
|
||||
parallel = False
|
||||
|
||||
@@ -51,11 +46,17 @@ class Openspeedshop(Package):
|
||||
variant('frontend', default=False, description="build only the front-end tool using the runtime_dir to point to the target build.")
|
||||
variant('cuda', default=False, description="build with cuda packages included.")
|
||||
variant('ptgf', default=False, description="build with the PTGF based gui package enabled.")
|
||||
variant('intelmic', default=False, description="build for the Intel MIC platform.")
|
||||
variant('cray', default=False, description="build for Cray platforms.")
|
||||
variant('bluegene', default=False, description="build for Cray platforms.")
|
||||
variant('rtfe', default=False, description="build for generic cluster platforms that have different processors on the fe and be nodes.")
|
||||
|
||||
# MPI variants
|
||||
variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.")
|
||||
variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.")
|
||||
variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.")
|
||||
variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.")
|
||||
variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.")
|
||||
variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.")
|
||||
|
||||
depends_on("cmake@3.0.2")
|
||||
# Dependencies for openspeedshop that are common to all the variants of the OpenSpeedShop build
|
||||
depends_on("bison")
|
||||
depends_on("flex")
|
||||
@@ -63,8 +64,8 @@ class Openspeedshop(Package):
|
||||
depends_on("libelf")
|
||||
depends_on("libdwarf")
|
||||
depends_on("sqlite")
|
||||
depends_on("boost@1.50.0")
|
||||
depends_on("dyninst@8.2.1")
|
||||
depends_on("boost@1.50.0:")
|
||||
depends_on("dyninst@9.1.0")
|
||||
depends_on("python")
|
||||
depends_on("qt@3.3.8b+krellpatch")
|
||||
|
||||
@@ -72,15 +73,78 @@ class Openspeedshop(Package):
|
||||
depends_on("libunwind", when='+offline')
|
||||
depends_on("papi", when='+offline')
|
||||
depends_on("libmonitor+krellpatch", when='+offline')
|
||||
#depends_on("openmpi+krelloptions", when='+offline')
|
||||
#depends_on("openmpi", when='+offline')
|
||||
#depends_on("mpich", when='+offline')
|
||||
depends_on("openmpi", when='+offline+openmpi')
|
||||
depends_on("mpich", when='+offline+mpich')
|
||||
depends_on("mpich2", when='+offline+mpich2')
|
||||
depends_on("mvapich2", when='+offline+mvapich2')
|
||||
depends_on("mvapich", when='+offline+mvapich')
|
||||
depends_on("mpt", when='+offline+mpt')
|
||||
|
||||
# Dependencies only for the openspeedshop cbtf package.
|
||||
depends_on("cbtf", when='+cbtf')
|
||||
depends_on("cbtf-krell", when='+cbtf')
|
||||
depends_on("cbtf-argonavis", when='+cbtf')
|
||||
depends_on("mrnet@4.1.0:+lwthreads", when='+cbtf')
|
||||
depends_on("cbtf-argonavis", when='+cbtf+cuda')
|
||||
depends_on("mrnet@5.0.1:+lwthreads+krellpatch", when='+cbtf')
|
||||
|
||||
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)
|
||||
BuildTypeOptions.extend([
|
||||
'-DCMAKE_BUILD_TYPE=None',
|
||||
'-DCMAKE_CXX_FLAGS=%s' % compile_flags,
|
||||
'-DCMAKE_C_FLAGS=%s' % compile_flags
|
||||
])
|
||||
|
||||
cmakeOptions.extend(BuildTypeOptions)
|
||||
|
||||
def set_mpi_cmakeOptions(self, spec, cmakeOptions):
|
||||
# Appends to cmakeOptions the options that will enable the appropriate MPI implementations
|
||||
|
||||
MPIOptions = []
|
||||
|
||||
# openmpi
|
||||
if '+openmpi' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix
|
||||
])
|
||||
# mpich
|
||||
if '+mpich' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMPICH_DIR=%s' % spec['mpich'].prefix
|
||||
])
|
||||
# mpich2
|
||||
if '+mpich2' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMPICH2_DIR=%s' % spec['mpich2'].prefix
|
||||
])
|
||||
# mvapich
|
||||
if '+mvapich' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMVAPICH_DIR=%s' % spec['mvapich'].prefix
|
||||
])
|
||||
# mvapich2
|
||||
if '+mvapich2' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix
|
||||
])
|
||||
# mpt
|
||||
if '+mpt' in spec:
|
||||
MPIOptions.extend([
|
||||
'-DMPT_DIR=%s' % spec['mpt'].prefix
|
||||
])
|
||||
|
||||
cmakeOptions.extend(MPIOptions)
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
@@ -100,51 +164,118 @@ def install(self, spec, prefix):
|
||||
instrumentor_setting = "offline"
|
||||
if '+runtime' in spec:
|
||||
with working_dir('build_runtime', create=True):
|
||||
cmake('..',
|
||||
'-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
'-DINSTRUMENTOR=%s' % instrumentor_setting,
|
||||
'-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
|
||||
'-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
|
||||
'-DPAPI_DIR=%s' % spec['papi'].prefix,
|
||||
*std_cmake_args)
|
||||
|
||||
cmakeOptions = []
|
||||
cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
'-DINSTRUMENTOR=%s' % instrumentor_setting,
|
||||
'-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
|
||||
'-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
|
||||
'-DPAPI_DIR=%s' % spec['papi'].prefix
|
||||
])
|
||||
|
||||
# Add any MPI implementations coming from variant settings
|
||||
self.set_mpi_cmakeOptions(spec, cmakeOptions)
|
||||
cmakeOptions.extend(std_cmake_args)
|
||||
|
||||
# Adjust the build options to the favored ones for this build
|
||||
self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
|
||||
|
||||
cmake('..', *cmakeOptions)
|
||||
|
||||
make("clean")
|
||||
make()
|
||||
make("install")
|
||||
else:
|
||||
cmake_prefix_path = join_path(spec['dyninst'].prefix)
|
||||
with working_dir('build', create=True):
|
||||
|
||||
#python_vers=join_path(spec['python'].version[:2])
|
||||
#'-DOPENMPI_DIR=%s' % openmpi_prefix_path,
|
||||
#'-DMVAPICH_DIR=%s' % mvapich_prefix_path,
|
||||
#'-DMPICH_DIR=%s' % spec['mpich'].prefix,
|
||||
#'-DMPICH2_DIR=%s' % spec['mpich2'].prefix,
|
||||
#'-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
#'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
#'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix,
|
||||
|
||||
python_vers='%d.%d' % spec['python'].version[:2]
|
||||
cmake('..',
|
||||
'-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
'-DINSTRUMENTOR=%s' % instrumentor_setting,
|
||||
'-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
|
||||
'-DLIBELF_DIR=%s' % spec['libelf'].prefix,
|
||||
'-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
|
||||
'-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
|
||||
'-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
|
||||
'-DPAPI_DIR=%s' % spec['papi'].prefix,
|
||||
'-DSQLITE3_DIR=%s' % spec['sqlite'].prefix,
|
||||
'-DQTLIB_DIR=%s' % spec['qt'].prefix,
|
||||
'-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'),
|
||||
'-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers,
|
||||
'-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so',
|
||||
'-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
'-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
|
||||
*std_cmake_args)
|
||||
|
||||
cmakeOptions = []
|
||||
cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
'-DINSTRUMENTOR=%s' % instrumentor_setting,
|
||||
'-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
|
||||
'-DLIBELF_DIR=%s' % spec['libelf'].prefix,
|
||||
'-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
|
||||
'-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
|
||||
'-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
|
||||
'-DPAPI_DIR=%s' % spec['papi'].prefix,
|
||||
'-DSQLITE3_DIR=%s' % spec['sqlite'].prefix,
|
||||
'-DQTLIB_DIR=%s' % spec['qt'].prefix,
|
||||
'-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'),
|
||||
'-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers,
|
||||
'-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so',
|
||||
'-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
'-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
'-DDYNINST_DIR=%s' % spec['dyninst'].prefix
|
||||
])
|
||||
|
||||
# Add any MPI implementations coming from variant settings
|
||||
self.set_mpi_cmakeOptions(spec, cmakeOptions)
|
||||
cmakeOptions.extend(std_cmake_args)
|
||||
|
||||
# Adjust the build options to the favored ones for this build
|
||||
self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
|
||||
|
||||
cmake('..', *cmakeOptions)
|
||||
|
||||
make("clean")
|
||||
make()
|
||||
make("install")
|
||||
|
||||
elif '+cbtf' in spec:
|
||||
instrumentor_setting = "cbtf"
|
||||
resolve_symbols = "symtabapi"
|
||||
cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + ':' + join_path(spec['dyninst'].prefix)
|
||||
#runtime_platform_cray = "cray"
|
||||
#if '+cray' in spec:
|
||||
# if '+runtime' in spec:
|
||||
# #-DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_INSTALL_DIR} \
|
||||
# with working_dir('build_cbtf_cray_runtime', create=True):
|
||||
# python_vers='%d.%d' % spec['python'].version[:2]
|
||||
# cmake('..',
|
||||
# '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
|
||||
# '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
|
||||
# '-DRUNTIME_PLATFORM=%s' % runtime_platform_cray,
|
||||
# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
|
||||
# '-DRESOLVE_SYMBOLS=%s' % resolve_symbols,
|
||||
# '-DINSTRUMENTOR=%s' % instrumentor_setting,
|
||||
# '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
|
||||
# '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
|
||||
# '-DCBTF_KRELL_CN_RUNTIME_DIR=%s' % spec['cbtf-krell'].prefix,
|
||||
# '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
|
||||
# '-DLIBELF_DIR=%s' % spec['libelf'].prefix,
|
||||
# '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
|
||||
# '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
|
||||
# '-DPAPI_DIR=%s' % spec['papi'].prefix,
|
||||
# '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
|
||||
# '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
|
||||
# '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
|
||||
# '-DBoost_NO_SYSTEM_PATHS=TRUE',
|
||||
# '-DBOOST_ROOT=%s' % spec['boost'].prefix,
|
||||
# *std_cmake_args)
|
||||
|
||||
# make("clean")
|
||||
# make()
|
||||
# make("install")
|
||||
|
||||
|
||||
#elif '+mic' in spec:
|
||||
# comment out else and shift over the default case below until arch detection is in
|
||||
#else:
|
||||
|
||||
if '+runtime' in spec:
|
||||
with working_dir('build_cbtf_runtime', create=True):
|
||||
python_vers='%d.%d' % spec['python'].version[:2]
|
||||
@@ -203,14 +334,63 @@ def install(self, spec, prefix):
|
||||
# tbd
|
||||
|
||||
|
||||
#if '+intelmic' in spec:
|
||||
# with working_dir('build_intelmic_compute', create=True):
|
||||
# tbd
|
||||
# with working_dir('build_intelmic_frontend', create=True):
|
||||
# tbd
|
||||
|
||||
#if '+cray' in spec:
|
||||
# with working_dir('build_cray_compute', create=True):
|
||||
# tbd
|
||||
# with working_dir('build_cray_frontend', create=True):
|
||||
# tbd
|
||||
#if '+cbtf' in spec:
|
||||
# if cray build type detected:
|
||||
# if '+runtime' in spec:
|
||||
# with working_dir('build_cray_cbtf_compute', create=True):
|
||||
# tbd
|
||||
# else:
|
||||
# with working_dir('build_cray_cbtf_frontend', create=True):
|
||||
# tbd
|
||||
# with working_dir('build_cray_osscbtf_frontend', create=True):
|
||||
# tbd
|
||||
# fi
|
||||
# elif '+intelmic' in spec:
|
||||
# if '+runtime' in spec:
|
||||
# with working_dir('build_intelmic_cbtf_compute', create=True):
|
||||
# tbd
|
||||
# else:
|
||||
# with working_dir('build_intelmic_cbtf_frontend', create=True):
|
||||
# tbd
|
||||
# with working_dir('build_intelmic_osscbtf_frontend', create=True):
|
||||
# fi
|
||||
# else
|
||||
# with working_dir('build_cluster_cbtf', create=True):
|
||||
# tbd
|
||||
# with working_dir('build_cluster osscbtf', create=True):
|
||||
# tbd
|
||||
# fi
|
||||
#elif '+offline' in spec:
|
||||
# if cray build type detected:
|
||||
# if '+runtime' in spec:
|
||||
# with working_dir('build_cray_ossoff_compute', create=True):
|
||||
# tbd
|
||||
# else:
|
||||
# with working_dir('build_cray_ossoff_frontend', create=True):
|
||||
# tbd
|
||||
# fi
|
||||
# elif '+intelmic' in spec:
|
||||
# if '+runtime' in spec:
|
||||
# with working_dir('build_intelmic_ossoff_compute', create=True):
|
||||
# tbd
|
||||
# else:
|
||||
# with working_dir('build_intelmic_ossoff_frontend', create=True):
|
||||
# tbd
|
||||
# fi
|
||||
# elif bgq build type detected:
|
||||
# if '+runtime' in spec:
|
||||
# with working_dir('build_bgq_ossoff_compute', create=True):
|
||||
# tbd
|
||||
# else:
|
||||
# with working_dir('build_bgq_ossoff_frontend', create=True):
|
||||
# tbd
|
||||
# fi
|
||||
# else
|
||||
# with working_dir('build_cluster ossoff', create=True):
|
||||
# tbd
|
||||
# fi
|
||||
#fi
|
||||
|
||||
|
||||
|
||||
|
@@ -11,11 +11,25 @@ class ParallelNetcdf(Package):
|
||||
version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0')
|
||||
version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34')
|
||||
|
||||
variant('cxx', default=True, description='Build the C++ Interface')
|
||||
variant('fortran', default=True, description='Build the Fortran Interface')
|
||||
variant('fpic', default=True, description='Produce position-independent code (for use with shared libraries)')
|
||||
|
||||
depends_on("m4")
|
||||
depends_on("mpi")
|
||||
|
||||
# See: https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix,
|
||||
"--with-mpi=%s" % spec['mpi'].prefix)
|
||||
args = list()
|
||||
if '+fpic' in spec:
|
||||
args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC'])
|
||||
if '~cxx' in spec:
|
||||
args.append('--disable-cxx')
|
||||
if '~fortran' in spec:
|
||||
args.append('--disable-fortran')
|
||||
|
||||
args.extend(["--prefix=%s" % prefix,
|
||||
"--with-mpi=%s" % spec['mpi'].prefix])
|
||||
configure(*args)
|
||||
make()
|
||||
make("install")
|
||||
|
14
var/spack/repos/builtin/packages/py-argcomplete/package.py
Normal file
14
var/spack/repos/builtin/packages/py-argcomplete/package.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from spack import *
|
||||
|
||||
class PyArgcomplete(Package):
|
||||
"""Bash tab completion for argparse."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/argcomplete"
|
||||
url = "https://pypi.python.org/packages/source/a/argcomplete/argcomplete-1.1.1.tar.gz"
|
||||
|
||||
version('1.1.1', '89a3839096c9f991ad33828e72d21abf')
|
||||
|
||||
extends('python')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
22
var/spack/repos/builtin/packages/py-astroid/package.py
Normal file
22
var/spack/repos/builtin/packages/py-astroid/package.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyAstroid(Package):
|
||||
homepage = "https://www.astroid.org/"
|
||||
url = "https://github.com/PyCQA/astroid/archive/astroid-1.4.5.tar.gz"
|
||||
|
||||
version('1.4.5', '7adfc55809908297ef430efe4ea20ac3')
|
||||
version('1.4.4', '8ae6f63f6a2b260bb7f647dafccbc796')
|
||||
version('1.4.3', '4647159de7d4d0c4b1de23ecbfb8e246')
|
||||
version('1.4.2', '677f7965840f375af51b0e86403bee6a')
|
||||
version('1.4.1', 'ed70bfed5e4b25be4292e7fe72da2c02')
|
||||
|
||||
extends('python')
|
||||
depends_on('py-logilab-common')
|
||||
depends_on('py-setuptools')
|
||||
depends_on('py-six')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
|
18
var/spack/repos/builtin/packages/py-genshi/package.py
Normal file
18
var/spack/repos/builtin/packages/py-genshi/package.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from spack import version, extends, depends_on
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyGenshi(Package):
|
||||
"""Python toolkit for generation of output for the web"""
|
||||
homepage = "https://genshi.edgewall.org/"
|
||||
url = "http://ftp.edgewall.com/pub/genshi/Genshi-0.7.tar.gz"
|
||||
|
||||
version('0.7', '54e64dd69da3ec961f86e686e0848a82')
|
||||
version('0.6.1', '372c368c8931110b0a521fa6091742d7')
|
||||
version('0.6', '604e8b23b4697655d36a69c2d8ef7187')
|
||||
|
||||
extends("python")
|
||||
depends_on("py-setuptools")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
27
var/spack/repos/builtin/packages/py-jinja2/package.py
Normal file
27
var/spack/repos/builtin/packages/py-jinja2/package.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyJinja2(Package):
|
||||
"""
|
||||
Jinja2 is a template engine written in pure Python. It provides
|
||||
a Django inspired non-XML syntax but supports inline expressions
|
||||
and an optional sandboxed environment.
|
||||
"""
|
||||
|
||||
homepage = "http://jinja.pocoo.org/"
|
||||
url = "https://github.com/pallets/jinja/archive/2.8.tar.gz"
|
||||
|
||||
version('2.8', '4114200650d7630594e3bc70af23f59e')
|
||||
version('2.7.3', '55b87bdc8e585b8b5b86734eefce2621')
|
||||
version('2.7.2', '8e8f226809ae6363009b9296e30adf30')
|
||||
version('2.7.1', '69b6675553c81b1087f95cae7f2179bb')
|
||||
version('2.7', 'ec70433f325051dcedacbb2465028a35')
|
||||
|
||||
extends("python")
|
||||
depends_on("py-setuptools")
|
||||
depends_on("py-markupsafe")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
|
@@ -0,0 +1,18 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyLogilabCommon(Package):
|
||||
"""Common modules used by Logilab projects"""
|
||||
homepage = "https://www.logilab.org/project/logilab-common"
|
||||
url = "https://pypi.python.org/packages/a7/31/1650d23e44794d46935d82b86e73454cc83b814cbe1365260ccce8a2f4c6/logilab-common-1.2.0.tar.gz"
|
||||
|
||||
version('1.2.0', 'f7b51351b7bfe052746fa04c03253c0b')
|
||||
|
||||
extends("python")
|
||||
depends_on("py-setuptools")
|
||||
depends_on("py-six")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
|
27
var/spack/repos/builtin/packages/py-markupsafe/package.py
Normal file
27
var/spack/repos/builtin/packages/py-markupsafe/package.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyMarkupsafe(Package):
|
||||
"""
|
||||
MarkupSafe is a library for Python that implements a unicode
|
||||
string that is aware of HTML escaping rules and can be used
|
||||
to implement automatic string escaping. It is used by Jinja 2,
|
||||
the Mako templating engine, the Pylons web framework and many more.
|
||||
"""
|
||||
|
||||
homepage = "http://www.pocoo.org/projects/markupsafe/"
|
||||
url = "https://github.com/pallets/markupsafe/archive/0.23.tar.gz"
|
||||
|
||||
version('0.23', '1a0dadc95169832367c9dcf142155cde')
|
||||
version('0.22', '7a2ac7427b58def567628d06dc328396')
|
||||
version('0.21', 'aebcd93ee05269773c8b80bb6c86fc2f')
|
||||
version('0.20', '0c1fef97c8fd6a986d708f08d7f84a02')
|
||||
version('0.19', '64b05361adb92c11839fc470e308c593')
|
||||
|
||||
extends("python")
|
||||
depends_on("py-setuptools")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
|
22
var/spack/repos/builtin/packages/py-mistune/package.py
Normal file
22
var/spack/repos/builtin/packages/py-mistune/package.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyMistune(Package):
|
||||
"""
|
||||
Python markdown parser
|
||||
"""
|
||||
homepage = "http://mistune.readthedocs.org/en/latest/"
|
||||
url = "https://github.com/lepture/mistune/archive/v0.7.1.tar.gz"
|
||||
|
||||
version('0.7.1', '0d9c29700c670790c5b2471070d32ec2')
|
||||
version('0.7', '77750ae8b8d0d584894224a7e0c0523a')
|
||||
version('0.6', 'd4f3d4f28a69e715f82b591d5dacf9a6')
|
||||
version('0.5.1', '1c6cfce28a4aa90cf125217cd6c6fe6c')
|
||||
version('0.5', '997736554f1f95eea78c66ae339b5722')
|
||||
|
||||
extends('python')
|
||||
depends_on('py-setuptools')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
20
var/spack/repos/builtin/packages/py-prettytable/package.py
Normal file
20
var/spack/repos/builtin/packages/py-prettytable/package.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyPrettytable(Package):
|
||||
"""
|
||||
PrettyTable is a simple Python library designed to make
|
||||
it quick and easy to represent tabular data in visually
|
||||
appealing ASCII tables
|
||||
"""
|
||||
homepage = "https://code.google.com/archive/p/prettytable/"
|
||||
url = "https://pypi.python.org/packages/e0/a1/36203205f77ccf98f3c6cf17cf068c972e6458d7e58509ca66da949ca347/prettytable-0.7.2.tar.gz"
|
||||
|
||||
version('0.7.2', 'a6b80afeef286ce66733d54a0296b13b')
|
||||
|
||||
extends("python")
|
||||
depends_on("py-setuptools")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
22
var/spack/repos/builtin/packages/py-py2neo/package.py
Normal file
22
var/spack/repos/builtin/packages/py-py2neo/package.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyPy2neo(Package):
|
||||
"""FIXME: put a proper description of your package here."""
|
||||
# FIXME: add a proper url for your package's homepage here.
|
||||
homepage = "http://www.example.com"
|
||||
url = "https://github.com/nigelsmall/py2neo/archive/py2neo-2.0.8.tar.gz"
|
||||
|
||||
version('2.0.8', 'e3ec5172a9e006515ef4155688a05a55')
|
||||
version('2.0.7', '4cfbc5b7dfd7757f3d2e324805faa639')
|
||||
version('2.0.6', '53e4cdb1a95fbae501c66e541d5f4929')
|
||||
version('2.0.5', '143b1f9c0aa22faf170c1b9f84c7343b')
|
||||
version('2.0.4', 'b3f7efd3344dc3f66db4eda11e5899f7')
|
||||
|
||||
depends_on("py-setuptools")
|
||||
extends("python")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
|
16
var/spack/repos/builtin/packages/py-storm/package.py
Normal file
16
var/spack/repos/builtin/packages/py-storm/package.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from spack import depends_on, extends, version
|
||||
from spack import Package
|
||||
|
||||
|
||||
class PyStorm(Package):
|
||||
"""Storm is an object-relational mapper (ORM) for Python"""
|
||||
homepage = "https://storm.canonical.com/"
|
||||
url = "https://launchpad.net/storm/trunk/0.20/+download/storm-0.20.tar.gz"
|
||||
|
||||
version('0.20', '8628503141f0f06c0749d607ac09b9c7')
|
||||
|
||||
extends('python')
|
||||
depends_on('py-setuptools')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
14
var/spack/repos/builtin/packages/r-BiocGenerics/package.py
Normal file
14
var/spack/repos/builtin/packages/r-BiocGenerics/package.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from spack import *
|
||||
|
||||
class RBiocgenerics(Package):
|
||||
"""S4 generic functions needed by many Bioconductor packages."""
|
||||
|
||||
homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html'
|
||||
url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz"
|
||||
|
||||
version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False)
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
18
var/spack/repos/builtin/packages/r-abind/package.py
Normal file
18
var/spack/repos/builtin/packages/r-abind/package.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from spack import *
|
||||
|
||||
class RAbind(Package):
|
||||
"""Combine multidimensional arrays into a single array. This is a
|
||||
generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and
|
||||
higher-dimensional arrays. Also provides functions 'adrop', 'asub', and
|
||||
'afill' for manipulating, extracting and replacing data in arrays."""
|
||||
|
||||
homepage = "https://cran.r-project.org/"
|
||||
url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz"
|
||||
|
||||
version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False)
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
22
var/spack/repos/builtin/packages/r-filehash/package.py
Normal file
22
var/spack/repos/builtin/packages/r-filehash/package.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from spack import *
|
||||
|
||||
class RFilehash(Package):
|
||||
"""Implements a simple key-value style database where character string keys
|
||||
are associated with data values that are stored on the disk. A simple
|
||||
interface is provided for inserting, retrieving, and deleting data from the
|
||||
database. Utilities are provided that allow 'filehash' databases to be
|
||||
treated much like environments and lists are already used in R. These
|
||||
utilities are provided to encourage interactive and exploratory analysis on
|
||||
large datasets. Three different file formats for representing the database
|
||||
are currently available and new formats can easily be incorporated by third
|
||||
parties for use in the 'filehash' framework."""
|
||||
|
||||
homepage = 'https://cran.r-project.org/'
|
||||
url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz"
|
||||
|
||||
version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False)
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
19
var/spack/repos/builtin/packages/r-magic/package.py
Normal file
19
var/spack/repos/builtin/packages/r-magic/package.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from spack import *
|
||||
|
||||
class RMagic(Package):
|
||||
"""A collection of efficient, vectorized algorithms for the creation and
|
||||
investigation of magic squares and hypercubes, including a variety of
|
||||
functions for the manipulation and analysis of arbitrarily dimensioned
|
||||
arrays."""
|
||||
|
||||
homepage = "https://cran.r-project.org/"
|
||||
url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz"
|
||||
|
||||
version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False)
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-abind')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
5
var/spack/repos/builtin/packages/scotch/Makefile.esmumps
Normal file
5
var/spack/repos/builtin/packages/scotch/Makefile.esmumps
Normal file
@@ -0,0 +1,5 @@
|
||||
esmumps : scotch
|
||||
(cd esmumps ; $(MAKE) scotch && $(MAKE) install)
|
||||
|
||||
ptesmumps : ptscotch
|
||||
(cd esmumps ; $(MAKE) ptscotch && $(MAKE) ptinstall)
|
@@ -1,88 +1,125 @@
|
||||
from spack import *
|
||||
import os
|
||||
import os, re
|
||||
|
||||
class Scotch(Package):
|
||||
"""Scotch is a software package for graph and mesh/hypergraph
|
||||
partitioning, graph clustering, and sparse matrix ordering."""
|
||||
|
||||
homepage = "http://www.labri.fr/perso/pelegrin/scotch/"
|
||||
url = "http://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz"
|
||||
url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz"
|
||||
base_url = "http://gforge.inria.fr/frs/download.php/latestfile/298"
|
||||
list_url = "http://gforge.inria.fr/frs/?group_id=248"
|
||||
|
||||
version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc')
|
||||
version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e')
|
||||
version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753')
|
||||
|
||||
variant('mpi', default=False, description='Activate the compilation of PT-Scotch')
|
||||
variant('compression', default=True, description='Activate the posibility to use compressed files')
|
||||
variant('esmumps', default=False, description='Activate the compilation of the lib esmumps needed by mumps')
|
||||
variant('shared', default=True, description='Build shared libraries')
|
||||
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('zlib', when='+compression')
|
||||
depends_on('flex')
|
||||
depends_on('bison')
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('zlib', when='+compression')
|
||||
|
||||
def compiler_specifics(self, makefile_inc, defines):
|
||||
if self.compiler.name == 'gcc':
|
||||
defines.append('-Drestrict=__restrict')
|
||||
elif self.compiler.name == 'intel':
|
||||
defines.append('-restrict')
|
||||
# NOTE: Versions of Scotch up to version 6.0.0 don't include support for
|
||||
# building with 'esmumps' in their default packages. In order to enable
|
||||
# support for this feature, we must grab the 'esmumps' enabled archives
|
||||
# from the Scotch hosting site. These alternative archives include a strict
|
||||
# superset of the behavior in their default counterparts, so we choose to
|
||||
# always grab these versions for older Scotch versions for simplicity.
|
||||
@when('@:6.0.0')
|
||||
def url_for_version(self, version):
|
||||
return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version)
|
||||
|
||||
makefile_inc.append('CCS = $(CC)')
|
||||
|
||||
if '+mpi' in self.spec:
|
||||
makefile_inc.extend([
|
||||
'CCP = %s' % os.path.join(self.spec['mpi'].prefix.bin, 'mpicc'),
|
||||
'CCD = $(CCP)'
|
||||
])
|
||||
else:
|
||||
makefile_inc.extend([
|
||||
'CCP = mpicc', # It is set but not used
|
||||
'CCD = $(CCS)'
|
||||
])
|
||||
|
||||
|
||||
|
||||
def library_build_type(self, makefile_inc, defines):
|
||||
makefile_inc.extend([
|
||||
'LIB = .a',
|
||||
'CLIBFLAGS = ',
|
||||
'RANLIB = ranlib',
|
||||
'AR = ar',
|
||||
'ARFLAGS = -ruv '
|
||||
])
|
||||
|
||||
@when('+shared')
|
||||
def library_build_type(self, makefile_inc, defines):
|
||||
makefile_inc.extend([
|
||||
'LIB = .so',
|
||||
'CLIBFLAGS = -shared -fPIC',
|
||||
'RANLIB = echo',
|
||||
'AR = $(CC)',
|
||||
'ARFLAGS = -shared $(LDFLAGS) -o'
|
||||
])
|
||||
|
||||
def extra_features(self, makefile_inc, defines):
|
||||
ldflags = []
|
||||
|
||||
if '+compression' in self.spec:
|
||||
defines.append('-DCOMMON_FILE_COMPRESS_GZ')
|
||||
ldflags.append('-L%s -lz' % (self.spec['zlib'].prefix.lib))
|
||||
|
||||
defines.append('-DCOMMON_PTHREAD')
|
||||
ldflags.append('-lm -lrt -pthread')
|
||||
|
||||
makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags))
|
||||
@when('@6.0.1:')
|
||||
def url_for_version(self, version):
|
||||
return super(Scotch, self).url_for_version(version)
|
||||
|
||||
# NOTE: Several of the 'esmumps' enabled Scotch releases up to version 6.0.0
|
||||
# have broken build scripts that don't properly build 'esmumps' as a separate
|
||||
# target, so we need a patch procedure to remove 'esmumps' from existing targets
|
||||
# and to add it as a standalone target.
|
||||
@when('@:6.0.0')
|
||||
def patch(self):
|
||||
makefile_path = os.path.join('src', 'Makefile')
|
||||
with open(makefile_path, 'r') as makefile:
|
||||
esmumps_enabled = any(re.search(r'^esmumps(\s*):(.*)$', line) for line in makefile.readlines())
|
||||
|
||||
if not esmumps_enabled:
|
||||
mff = FileFilter(makefile_path)
|
||||
mff.filter(r'^.*((esmumps)|(ptesmumps)).*(install).*$', '')
|
||||
|
||||
makefile_esmumps_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Makefile.esmumps')
|
||||
with open(makefile_path, 'a') as makefile:
|
||||
makefile.write('\ninclude %s\n' % makefile_esmumps_path)
|
||||
|
||||
@when('@6.0.1:')
|
||||
def patch(self):
|
||||
pass
|
||||
|
||||
# NOTE: Configuration of Scotch is achieved by writing a 'Makefile.inc' file
|
||||
# that contains all of the configuration variables and their desired values
|
||||
# for the installation. This function writes this file based on the given
|
||||
# installation variants.
|
||||
def configure(self):
|
||||
makefile_inc = []
|
||||
defines = [
|
||||
cflags = [
|
||||
'-O3',
|
||||
'-DCOMMON_RANDOM_FIXED_SEED',
|
||||
'-DSCOTCH_DETERMINISTIC',
|
||||
'-DSCOTCH_RENAME',
|
||||
'-DIDXSIZE64' ]
|
||||
'-DIDXSIZE64'
|
||||
]
|
||||
|
||||
self.library_build_type(makefile_inc, defines)
|
||||
self.compiler_specifics(makefile_inc, defines)
|
||||
self.extra_features(makefile_inc, defines)
|
||||
## Library Build Type ##
|
||||
|
||||
if '+shared' in self.spec:
|
||||
makefile_inc.extend([
|
||||
'LIB = .so',
|
||||
'CLIBFLAGS = -shared -fPIC',
|
||||
'RANLIB = echo',
|
||||
'AR = $(CC)',
|
||||
'ARFLAGS = -shared $(LDFLAGS) -o'
|
||||
])
|
||||
cflags.append('-fPIC')
|
||||
else:
|
||||
makefile_inc.extend([
|
||||
'LIB = .a',
|
||||
'CLIBFLAGS = ',
|
||||
'RANLIB = ranlib',
|
||||
'AR = ar',
|
||||
'ARFLAGS = -ruv '
|
||||
])
|
||||
|
||||
## Compiler-Specific Options ##
|
||||
|
||||
if self.compiler.name == 'gcc':
|
||||
cflags.append('-Drestrict=__restrict')
|
||||
elif self.compiler.name == 'intel':
|
||||
cflags.append('-restrict')
|
||||
|
||||
makefile_inc.append('CCS = $(CC)')
|
||||
makefile_inc.append('CCP = %s' %
|
||||
(self.spec['mpi'].mpicc if '+mpi' in self.spec else 'mpicc'))
|
||||
makefile_inc.append('CCD = $(CCS)')
|
||||
|
||||
## Extra Features ##
|
||||
|
||||
ldflags = []
|
||||
|
||||
if '+compression' in self.spec:
|
||||
cflags.append('-DCOMMON_FILE_COMPRESS_GZ')
|
||||
ldflags.append('-L%s -lz' % (self.spec['zlib'].prefix.lib))
|
||||
|
||||
cflags.append('-DCOMMON_PTHREAD')
|
||||
ldflags.append('-lm -lrt -pthread')
|
||||
|
||||
makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags))
|
||||
|
||||
## General Features ##
|
||||
|
||||
makefile_inc.extend([
|
||||
'EXE =',
|
||||
@@ -93,18 +130,19 @@ def patch(self):
|
||||
'MKDIR = mkdir',
|
||||
'MV = mv',
|
||||
'CP = cp',
|
||||
'CFLAGS = -O3 %s' % (' '.join(defines)),
|
||||
'CFLAGS = %s' % ' '.join(cflags),
|
||||
'LEX = %s -Pscotchyy -olex.yy.c' % os.path.join(self.spec['flex'].prefix.bin , 'flex'),
|
||||
'YACC = %s -pscotchyy -y -b y' % os.path.join(self.spec['bison'].prefix.bin, 'bison'),
|
||||
'prefix = %s' % self.prefix,
|
||||
''
|
||||
'prefix = %s' % self.prefix
|
||||
])
|
||||
|
||||
with working_dir('src'):
|
||||
with open('Makefile.inc', 'w') as fh:
|
||||
fh.write('\n'.join(makefile_inc))
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
self.configure()
|
||||
|
||||
targets = ['scotch']
|
||||
if '+mpi' in self.spec:
|
||||
targets.append('ptscotch')
|
||||
@@ -115,12 +153,10 @@ def install(self, spec, prefix):
|
||||
targets.append('ptesmumps')
|
||||
|
||||
with working_dir('src'):
|
||||
for app in targets:
|
||||
make(app, parallel=(not app=='ptesmumps'))
|
||||
for target in targets:
|
||||
make(target, parallel=(target!='ptesmumps'))
|
||||
|
||||
|
||||
install_tree('bin', prefix.bin)
|
||||
install_tree('lib', prefix.lib)
|
||||
install_tree('include', prefix.include)
|
||||
install_tree('man/man1', prefix.share_man1)
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Silo(Package):
|
||||
"""Silo is a library for reading and writing a wide variety of scientific
|
||||
data to binary, disk files."""
|
||||
@@ -12,6 +13,7 @@ class Silo(Package):
|
||||
version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9')
|
||||
|
||||
variant('fortran', default=True, description='Enable Fortran support')
|
||||
variant('shared', default=True, description='Build shared libraries')
|
||||
variant('silex', default=False, description='Builds Silex, a GUI for viewing Silo files')
|
||||
|
||||
depends_on('hdf5')
|
||||
@@ -21,6 +23,7 @@ def install(self, spec, prefix):
|
||||
config_args = [
|
||||
'--enable-fortran' if '+fortran' in spec else '--disable-fortran',
|
||||
'--enable-silex' if '+silex' in spec else '--disable-silex',
|
||||
'--enable-shared' if '+shared' in spec else '--disable-shared',
|
||||
]
|
||||
|
||||
if '+silex' in spec:
|
||||
@@ -30,6 +33,7 @@ def install(self, spec, prefix):
|
||||
'--prefix=%s' % prefix,
|
||||
'--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include, spec['hdf5'].prefix.lib),
|
||||
'--with-zlib=%s,%s' % (spec['zlib'].prefix.include, spec['zlib'].prefix.lib),
|
||||
'--enable-install-lite-headers',
|
||||
*config_args)
|
||||
|
||||
make()
|
||||
|
@@ -9,6 +9,7 @@ class TheSilverSearcher(Package):
|
||||
|
||||
depends_on('pcre')
|
||||
depends_on('xz')
|
||||
depends_on('pkg-config')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
12
var/spack/repos/builtin/packages/unibilium/package.py
Normal file
12
var/spack/repos/builtin/packages/unibilium/package.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from spack import *
|
||||
|
||||
class Unibilium(Package):
|
||||
"""A terminfo parsing library"""
|
||||
homepage = "https://github.com/mauke/unibilium"
|
||||
url = "https://github.com/mauke/unibilium/archive/v1.2.0.tar.gz"
|
||||
|
||||
version('1.2.0', '9b1c97839a880a373da6c097443b43c4')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make("PREFIX="+prefix)
|
||||
make("install", "PREFIX="+prefix)
|
31
var/spack/repos/builtin/packages/visit/package.py
Normal file
31
var/spack/repos/builtin/packages/visit/package.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Visit(Package):
|
||||
"""VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool."""
|
||||
homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/"
|
||||
url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz"
|
||||
|
||||
version('2.10.1', '3cbca162fdb0249f17c4456605c4211e')
|
||||
version('2.10.2', '253de0837a9d69fb689befc98ea4d068')
|
||||
|
||||
depends_on("vtk@6.1.0~opengl2")
|
||||
depends_on("qt@4.8.6")
|
||||
depends_on("python")
|
||||
depends_on("silo+shared")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('spack-build', create=True):
|
||||
|
||||
feature_args = std_cmake_args[:]
|
||||
feature_args.extend(["-DVTK_MAJOR_VERSION=6",
|
||||
"-DVTK_MINOR_VERSION=1",
|
||||
"-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin,
|
||||
"-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin,
|
||||
"-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix,
|
||||
"-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix])
|
||||
|
||||
cmake('../src', *feature_args)
|
||||
|
||||
make()
|
||||
make("install")
|
@@ -1,19 +1,3 @@
|
||||
# FIXME:
|
||||
# This is a template package file for Spack. We've conveniently
|
||||
# put "FIXME" labels next to all the things you'll want to change.
|
||||
#
|
||||
# Once you've edited all the FIXME's, delete this whole message,
|
||||
# save this file, and test out your package like this:
|
||||
#
|
||||
# spack install xerces-c
|
||||
#
|
||||
# You can always get back here to change things with:
|
||||
#
|
||||
# spack edit xerces-c
|
||||
#
|
||||
# See the spack documentation for more information on building
|
||||
# packages.
|
||||
#
|
||||
from spack import *
|
||||
|
||||
class XercesC(Package):
|
||||
|
Reference in New Issue
Block a user