From 9f7db44574093aa9490ffe1a4ff959213b096008 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 2 Apr 2016 12:58:37 -0400 Subject: Removed useless url in qt --- var/spack/repos/builtin/packages/qt/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index ab09469042..8cb88e6c85 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -4,7 +4,6 @@ import os class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" homepage = 'http://qt.io' - url = 'http://download.qt.io/archive/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.gz' version('5.5.1', '59f0216819152b77536cf660b015d784') version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') -- cgit v1.2.3-60-g2f50 From e0b9f79b9bc20c4e5178ee6dba6b327057cb3c4e Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 4 Apr 2016 10:33:03 -0700 Subject: Add changes that remove unsupported libraries from the boost build libraries list based on the boost version numbers. Libraries that are removed include: log - for versions of boost 1.53.0 and older - :atomic - for versions of boost 1.52.0 and older - :locale for versions of boost 1.49.0 and older - :chrono - for versions of boost 1.48.0 and older - and :random - for versions of boost 1.44.0 and older. --- var/spack/repos/builtin/packages/boost/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index f889da21f2..12bc9508c3 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -199,6 +199,18 @@ class Boost(Package): install_tree(src, dst) return + # Remove libraries that the release version does not support + if not spec.satisfies('@1.54.0:'): + withLibs.remove('log') + if not spec.satisfies('@1.53.0:'): + withLibs.remove('atomic') + if not spec.satisfies('@1.48.0:'): + withLibs.remove('locale') + if not spec.satisfies('@1.47.0:'): + withLibs.remove('chrono') + if not spec.satisfies('@1.43.0:'): + withLibs.remove('random') + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' -- cgit v1.2.3-60-g2f50 From 6ebed7a2a6488a857fc6878c2d39d26ce9bc72f5 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 4 Apr 2016 11:23:51 -0700 Subject: Add release 9.1.0 recognition to the Dyninst API package file. --- var/spack/repos/builtin/packages/dyninst/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 0111dcbe08..b28e897a0f 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -31,6 +31,8 @@ class Dyninst(Package): url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" list_url = "http://www.dyninst.org/downloads/dyninst-8.x" + version('9.1.0', '5c64b77521457199db44bec82e4988ac', + url="http://www.paradyn.org/release9.1.0/DyninstAPI-9.1.0.tgz") version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7', url="http://www.paradyn.org/release8.2/DyninstAPI-8.2.1.tgz") version('8.1.2', 'bf03b33375afa66fe0efa46ce3f4b17a', -- cgit v1.2.3-60-g2f50 From 7bc28cc334ea8b64ad4722dda2997871c27dc01a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 14:33:48 -0400 Subject: Clean up cc script --- lib/spack/env/cc | 65 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 2eb6f46afe..6445edf839 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -84,13 +84,12 @@ done # ld link # ccld compile & link # vcheck version check -# -# Depending on the mode, we may or may not add extra rpaths. -# This variable controls whether they are added. -add_rpaths=true command=$(basename "$0") case "$command" in + cpp) + mode=cpp + ;; cc|c89|c99|gcc|clang|icc|pgcc|xlc) command="$SPACK_CC" language="C" @@ -107,22 +106,8 @@ case "$command" in command="$SPACK_F77" language="Fortran 77" ;; - cpp) - mode=cpp - ;; ld) mode=ld - - # Darwin's linker has a -r argument that merges object files - # together. It doesn't work with -rpath. - if [[ $OSTYPE = darwin* ]]; then - for arg in "$@"; do - if [ "$arg" = -r ]; then - add_rpaths=false - break - fi - done - fi ;; *) die "Unkown compiler: $command" @@ -130,11 +115,11 @@ case "$command" in esac # If any of the arguments below is present then the mode is vcheck. In -# vcheck mode nothing is added in terms of extra search paths or -# libraries -if [ -z "$mode" ]; then +# vcheck mode, nothing is added in terms of extra search paths or +# libraries. +if [[ -z $mode ]]; then for arg in "$@"; do - if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then + if [[ $arg = -v || $arg = -V || $arg = --version || $arg = -dumpversion ]]; then mode=vcheck break fi @@ -142,16 +127,16 @@ if [ -z "$mode" ]; then fi # Finish setting up the mode. -if [ -z "$mode" ]; then +if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do - if [ "$arg" = -E ]; then + if [[ $arg = -E ]]; then mode=cpp break - elif [ "$arg" = -S ]; then + elif [[ $arg = -S ]]; then mode=as break - elif [ "$arg" = -c ]; then + elif [[ $arg = -c ]]; then mode=cc break fi @@ -159,7 +144,7 @@ if [ -z "$mode" ]; then fi # Dump the version and exit if we're in testing mode. -if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then +if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then echo "$mode" exit fi @@ -170,10 +155,23 @@ if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi -if [ "$mode" == vcheck ] ; then +if [[ $mode == vcheck ]]; then exec ${command} "$@" fi +# Darwin's linker has a -r argument that merges object files together. +# It doesn't work with -rpath. +# This variable controls whether they are added. +add_rpaths=true +if [[ mode = ld && $OSTYPE = darwin* ]]; then + for arg in "$@"; do + if [[ $arg = -r ]]; then + add_rpaths=false + break + fi + done +fi + # Save original command for debug logging input_command="$@" args=("$@") @@ -234,11 +232,14 @@ IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" spack_env_dirs+=("" ".") PATH="" for dir in "${env_path[@]}"; do - remove="" - for rm_dir in "${spack_env_dirs[@]}"; do - if [[ $dir = $rm_dir ]]; then remove=True; fi + addpath=true + for env_dir in "${spack_env_dirs[@]}"; do + if [[ $dir = $env_dir ]]; then + addpath=false + break + fi done - if [[ -z $remove ]]; then + if $addpath; then PATH="${PATH:+$PATH:}$dir" fi done -- cgit v1.2.3-60-g2f50 From 83d6e04d39ce81376c96cf6b4aa3261ff9e6fbc9 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 15:38:21 -0400 Subject: Convert `=` to `==` in tests; untabify --- lib/spack/env/cc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 6445edf839..b845de8a2b 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -119,7 +119,7 @@ esac # libraries. if [[ -z $mode ]]; then for arg in "$@"; do - if [[ $arg = -v || $arg = -V || $arg = --version || $arg = -dumpversion ]]; then + if [[ $arg == -v || $arg == -V || $arg == --version || $arg == -dumpversion ]]; then mode=vcheck break fi @@ -130,13 +130,13 @@ fi if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do - if [[ $arg = -E ]]; then + if [[ $arg == -E ]]; then mode=cpp break - elif [[ $arg = -S ]]; then + elif [[ $arg == -S ]]; then mode=as break - elif [[ $arg = -c ]]; then + elif [[ $arg == -c ]]; then mode=cc break fi @@ -144,7 +144,7 @@ if [[ -z $mode ]]; then fi # Dump the version and exit if we're in testing mode. -if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then +if [[ $SPACK_TEST_COMMAND == dump-mode ]]; then echo "$mode" exit fi @@ -163,12 +163,12 @@ fi # It doesn't work with -rpath. # This variable controls whether they are added. add_rpaths=true -if [[ mode = ld && $OSTYPE = darwin* ]]; then +if [[ mode == ld && $OSTYPE == darwin* ]]; then for arg in "$@"; do - if [[ $arg = -r ]]; then + if [[ $arg == -r ]]; then add_rpaths=false break - fi + fi done fi @@ -181,17 +181,17 @@ IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do # Prepend include directories if [[ -d $dep/include ]]; then - if [[ $mode = cpp || $mode = cc || $mode = as || $mode = ccld ]]; then + if [[ $mode == cpp || $mode == cc || $mode == as || $mode == ccld ]]; then args=("-I$dep/include" "${args[@]}") fi fi # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then - if [[ $mode = ccld ]]; then + if [[ $mode == ccld ]]; then $add_rpaths && args=("-Wl,-rpath,$dep/lib" "${args[@]}") args=("-L$dep/lib" "${args[@]}") - elif [[ $mode = ld ]]; then + elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}") args=("-L$dep/lib" "${args[@]}") fi @@ -199,10 +199,10 @@ for dep in "${deps[@]}"; do # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then - if [[ $mode = ccld ]]; then + if [[ $mode == ccld ]]; then $add_rpaths && args=("-Wl,-rpath,$dep/lib64" "${args[@]}") args=("-L$dep/lib64" "${args[@]}") - elif [[ $mode = ld ]]; then + elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}") args=("-L$dep/lib64" "${args[@]}") fi @@ -210,9 +210,9 @@ for dep in "${deps[@]}"; do done # Include all -L's and prefix/whatever dirs in rpath -if [[ $mode = ccld ]]; then +if [[ $mode == ccld ]]; then $add_rpaths && args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") -elif [[ $mode = ld ]]; then +elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -234,7 +234,7 @@ PATH="" for dir in "${env_path[@]}"; do addpath=true for env_dir in "${spack_env_dirs[@]}"; do - if [[ $dir = $env_dir ]]; then + if [[ $dir == $env_dir ]]; then addpath=false break fi @@ -248,7 +248,7 @@ export PATH full_command=("$command" "${args[@]}") # In test command mode, write out full command for Spack tests. -if [[ $SPACK_TEST_COMMAND = dump-args ]]; then +if [[ $SPACK_TEST_COMMAND == dump-args ]]; then echo "${full_command[@]}" exit elif [[ -n $SPACK_TEST_COMMAND ]]; then @@ -258,7 +258,7 @@ fi # # Write the input and output commands to debug logs if it's asked for. # -if [[ $SPACK_DEBUG = TRUE ]]; then +if [[ $SPACK_DEBUG == TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" echo "[$mode] $command $input_command" >> $input_log -- cgit v1.2.3-60-g2f50 From 0ff059e388b856d7eed86d27a665a48b65bfa65f Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 16:00:09 -0400 Subject: Clean up comments and output messages --- lib/spack/env/cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b845de8a2b..aa1e0dbe29 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -39,7 +39,7 @@ # # This is the list of environment variables that need to be set before -# the script runs. They are set by routines in spack.build_environment +# the script runs. They are set by routines in spack.build_environment # as part of spack.package.Package.do_install(). parameters=" SPACK_PREFIX @@ -50,7 +50,7 @@ SPACK_SHORT_SPEC" # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC -# Debug flag is optional; set to true for debug logging: +# Debug flag is optional; set to "TRUE" for debug logging: # SPACK_DEBUG # Test command is used to unit test the compiler script. # SPACK_TEST_COMMAND @@ -66,11 +66,10 @@ function die { for param in $parameters; do if [[ -z ${!param} ]]; then - die "Spack compiler must be run from spack! Input $param was missing!" + die "Spack compiler must be run from Apack! Input '$param' is missing." fi done -# # Figure out the type of compiler, the language, and the mode so that # the compiler script knows what to do. # @@ -78,12 +77,12 @@ done # 'command' is set based on the input command to $SPACK_[CC|CXX|F77|F90] # # 'mode' is set to one of: +# vcheck version check # cpp preprocess # cc compile # as assemble # ld link # ccld compile & link -# vcheck version check command=$(basename "$0") case "$command" in @@ -114,8 +113,8 @@ case "$command" in ;; esac -# If any of the arguments below is present then the mode is vcheck. In -# vcheck mode, nothing is added in terms of extra search paths or +# If any of the arguments below are present, then the mode is vcheck. +# In vcheck mode, nothing is added in terms of extra search paths or # libraries. if [[ -z $mode ]]; then for arg in "$@"; do -- cgit v1.2.3-60-g2f50 From 4ce03b75bc628bd80a9798300043f3ec0a2ed7fa Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Apr 2016 07:42:23 -0400 Subject: Correct typo --- lib/spack/env/cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index aa1e0dbe29..18fd8f7bdb 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -66,7 +66,7 @@ function die { for param in $parameters; do if [[ -z ${!param} ]]; then - die "Spack compiler must be run from Apack! Input '$param' is missing." + die "Spack compiler must be run from Spack! Input '$param' is missing." fi done -- cgit v1.2.3-60-g2f50 From 21ad5162c41b75aa11a5622a58a022a3107e6990 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 5 Apr 2016 11:53:37 -0600 Subject: + Global requires ncurses. --- var/spack/repos/builtin/packages/global/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index e8f06516d9..aac1cede30 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -11,6 +11,7 @@ class Global(Package): version('6.5', 'dfec818b4f53d91721e247cf7b218078') depends_on('exuberant-ctags') + depends_on('ncurses') def install(self, spec, prefix): config_args = ['--prefix={0}'.format(prefix)] -- cgit v1.2.3-60-g2f50 From 9b3c7b8afa40bd30e8bd54be12f5377ccd448c47 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 6 Apr 2016 10:55:59 +0200 Subject: openblas: provide basename of compilers to avoid issues with detection of Fortran --- var/spack/repos/builtin/packages/openblas/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 4ec829a85b..9f13d0690b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -19,8 +19,11 @@ class Openblas(Package): def install(self, spec, prefix): - make_defs = ['CC=%s' % spack_cc, - 'FC=%s' % spack_fc] + # Openblas is picky about compilers. Configure fails with + # FC=/abs/path/to/f77, whereas FC=f77 works fine. + # To circumvent this, provide basename only: + make_defs = ['CC=%s' % os.path.basename(spack_cc), + 'FC=%s' % os.path.basename(spack_f77)] make_targets = ['libs', 'netlib'] @@ -67,4 +70,3 @@ class Openblas(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) self.spec.lapack_shared_lib = self.spec.blas_shared_lib - -- cgit v1.2.3-60-g2f50 From 71e9f1ab8d652e96ed0178a9aaf813a7f89aed35 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 6 Apr 2016 09:52:09 -0600 Subject: + I am resubmitting this proposed change because it was accidentally overwritten. These modifications were accepted as PR#741 but somehow I clobbered them when PR#742 was merged. There was some unintentional overlap in my local repository that I didn't straighten out before pushing. --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 05436332ac..f70e634347 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,15 +34,17 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) - + if self.spec.satisfies('@3.6.0:'): + filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) def install_one(self, spec, prefix, shared): cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), - '-DCBLAS=ON', # always build CBLAS '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] + if spec.satisfies('@3.6.0:'): + cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS + if '+external-blas' in spec: # TODO : the mechanism to specify the library should be more general, # TODO : but this allows to have an hook to an external blas @@ -80,6 +82,3 @@ class NetlibLapack(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) - - - -- cgit v1.2.3-60-g2f50 From 73b6214a13339f11dbc33b0e068c13499f139b6f Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 22 Mar 2016 15:23:46 +0100 Subject: module files : proper cleanup on uninstall fixes #216 Conflicts: lib/spack/spack/test/database.py --- lib/spack/spack/cmd/module.py | 10 ++-------- lib/spack/spack/modules.py | 6 +++++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index 315d9fc926..a67f5c0c13 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -22,21 +22,16 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import sys import os import shutil -import argparse +import sys import llnl.util.tty as tty -from llnl.util.lang import partition_list -from llnl.util.filesystem import mkdirp - import spack.cmd +from llnl.util.filesystem import mkdirp from spack.modules import module_types from spack.util.string import * -from spack.spec import Spec - description ="Manipulate modules and dotkits." @@ -98,7 +93,6 @@ def module_refresh(): cls(spec).write() - def module(parser, args): if args.module_command == 'refresh': module_refresh() diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d797af287d..61624fbd70 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -211,7 +211,11 @@ class EnvModule(object): def remove(self): mod_file = self.file_name if os.path.exists(mod_file): - shutil.rmtree(mod_file, ignore_errors=True) + try: + os.remove(mod_file) # Remove the module file + os.removedirs(os.path.dirname(mod_file)) # Remove all the empty directories from the leaf up + except OSError: + pass # removedirs throws OSError on first non-empty directory found class Dotkit(EnvModule): -- cgit v1.2.3-60-g2f50 From 400166398239be0880c025672dd3e5eb6c8bac7f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 6 Apr 2016 22:19:07 +0200 Subject: leftover from cherry-pick --- lib/spack/spack/test/mock_database.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/mock_database.py b/lib/spack/spack/test/mock_database.py index 6fd05439bf..82ba59fc48 100644 --- a/lib/spack/spack/test/mock_database.py +++ b/lib/spack/spack/test/mock_database.py @@ -17,7 +17,7 @@ class MockDatabase(MockPackagesTest): def _mock_remove(self, spec): specs = spack.installed_db.query(spec) - assert(len(specs) == 1) + assert len(specs) == 1 spec = specs[0] spec.package.do_uninstall(spec) @@ -71,6 +71,8 @@ class MockDatabase(MockPackagesTest): self._mock_install('mpileaks ^zmpi') def tearDown(self): + for spec in spack.installed_db.query(): + spec.package.do_uninstall(spec) super(MockDatabase, self).tearDown() shutil.rmtree(self.install_path) spack.install_path = self.spack_install_path -- cgit v1.2.3-60-g2f50 From 380a2b23e66fe0acfd16f9e72499c7bd42597eaf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 6 Apr 2016 15:57:03 -0500 Subject: Add bash package --- var/spack/repos/builtin/packages/bash/package.py | 20 ++++++++++++++++++++ var/spack/repos/builtin/packages/ncurses/package.py | 7 +++---- var/spack/repos/builtin/packages/readline/package.py | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/bash/package.py diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py new file mode 100644 index 0000000000..9c9fbeedcf --- /dev/null +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Bash(Package): + """The GNU Project's Bourne Again SHell.""" + + homepage = "https://www.gnu.org/software/bash/" + url = "ftp://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz" + + version('4.3', '81348932d5da294953e15d4814c74dd1') + + depends_on('readline') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--with-curses', + '--with-installed-readline=%s' % spec['readline'].prefix) + + make() + make("tests") + make("install") diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 8dc808caac..219fbce226 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -8,11 +8,10 @@ class Ncurses(Package): """ homepage = "http://invisible-island.net/ncurses/ncurses.html" + url = "http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz" - version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1', - url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz') - version('6.0', 'ee13d052e1ead260d7c28071f46eefb1', - url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz') + version('6.0', 'ee13d052e1ead260d7c28071f46eefb1') + version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1') patch('patch_gcc_5.txt', when='%gcc@5.0:') diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index 1b870e0e7f..0c429ea756 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -2,12 +2,12 @@ from spack import * class Readline(Package): """The GNU Readline library provides a set of functions for use by - applications that allow users to edit command li nes as they + applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like - history expansion on previous commands. """ + history expansion on previous commands.""" homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz" -- cgit v1.2.3-60-g2f50 From c113d390a7a6fbd171aae54aa1f081f8b0790eab Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 6 Apr 2016 23:51:47 +0200 Subject: mvapich2 : MPI compiler wrapper will use spack compilers during the installation phase mpich : fixed wrong function signature --- var/spack/repos/builtin/packages/mpich/package.py | 12 ++++++------ var/spack/repos/builtin/packages/mvapich2/package.py | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 2d7955e08d..b317ec6651 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -47,12 +47,12 @@ class Mpich(Package): provides('mpi@:3.0', when='@3:') provides('mpi@:1.3', when='@1:') - def setup_dependent_environment(self, env, dependent_spec): - env.set('MPICH_CC', spack_cc) - env.set('MPICH_CXX', spack_cxx) - env.set('MPICH_F77', spack_f77) - env.set('MPICH_F90', spack_f90) - env.set('MPICH_FC', spack_fc) + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.set('MPICH_CC', spack_cc) + spack_env.set('MPICH_CXX', spack_cxx) + spack_env.set('MPICH_F77', spack_f77) + spack_env.set('MPICH_F90', spack_fc) + spack_env.set('MPICH_FC', spack_fc) def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index e4e95f92af..3e60b517db 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -140,6 +140,13 @@ class Mvapich2(Package): configure_args.extend(network_options) + def setup_dependent_environment(self, spack_env, run_env, extension_spec): + spack_env.set('MPICH_CC', spack_cc) + spack_env.set('MPICH_CXX', spack_cxx) + spack_env.set('MPICH_F77', spack_f77) + spack_env.set('MPICH_F90', spack_fc) + spack_env.set('MPICH_FC', spack_fc) + def install(self, spec, prefix): # we'll set different configure flags depending on our environment configure_args = [ -- cgit v1.2.3-60-g2f50 From ddaba07d8297544f2587f0c31fcbd2dafa824eb3 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 5 Apr 2016 19:00:28 -0700 Subject: metis 4.0.3 Add version 4.0.3 to metis package. Attempted to implement reasonable versions of all variants declared for metis@5.1.0; some of these do not have analogues in metis@4.0.3, and errors are raised accordingly. Also updated dependencies of packages with depends_on('metis') to depends_on('metis@5:') to ensure that these packages still build. --- var/spack/repos/builtin/packages/dealii/package.py | 2 +- var/spack/repos/builtin/packages/eigen/package.py | 2 +- var/spack/repos/builtin/packages/metis/package.py | 83 ++++++++++++++++++++-- var/spack/repos/builtin/packages/mumps/package.py | 2 +- .../repos/builtin/packages/parmetis/package.py | 2 +- var/spack/repos/builtin/packages/petsc/package.py | 2 +- .../repos/builtin/packages/superlu-dist/package.py | 2 +- .../repos/builtin/packages/trilinos/package.py | 2 +- 8 files changed, 86 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 1f763ad358..b251d50ca1 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -40,7 +40,7 @@ class Dealii(Package): depends_on ("arpack-ng+mpi", when='+arpack+mpi') depends_on ("doxygen", when='+doc') depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? - depends_on ("metis", when='+metis') + depends_on ("metis@5:", when='+metis') depends_on ("netcdf+mpi", when="+netcdf+mpi") depends_on ("netcdf-cxx", when='+netcdf+mpi') depends_on ("oce", when='+oce') diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index 8d6e672f86..1501989812 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -45,7 +45,7 @@ class Eigen(Package): # TODO : dependency on googlehash, superlu, adolc missing - depends_on('metis', when='+metis') + depends_on('metis@5:', when='+metis') depends_on('scotch', when='+scotch') depends_on('fftw', when='+fftw') depends_on('suite-sparse', when='+suitesparse') diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index d3bab554fe..e348eca4ba 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -24,7 +24,7 @@ ############################################################################## from spack import * -import glob,sys +import glob, sys, os class Metis(Package): """ @@ -37,6 +37,8 @@ class Metis(Package): url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" version('5.1.0', '5465e67079419a69e0116de24fce58fe') + version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55', + url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') @@ -45,12 +47,85 @@ class Metis(Package): variant('idx64', default=False, description='Use int64_t as default index type') variant('double', default=False, description='Use double precision floating point types') - depends_on('cmake @2.8:') # build-time dependency - + depends_on('cmake @2.8:', when='@5:') # build-time dependency depends_on('gdb', when='+gdb') - patch('install_gklib_defs_rename.patch') + patch('install_gklib_defs_rename.patch', when='@5:') + + + @when('@4:4.0.3') + def install(self, spec, prefix): + if '+gdb' in spec: + raise InstallError('gdb support not implemented in METIS 4!') + if '+idx64' in spec: + raise InstallError('idx64 option not implemented in METIS 4!') + if '+double' in spec: + raise InstallError('double option not implemented for METIS 4!') + + options = ['COPTIONS=-fPIC'] + if '+debug' in spec: + options.append('OPTFLAGS=-g -O0') + make(*options) + + mkdir(prefix.bin) + for x in ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh', + 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk'): + install(x, prefix.bin) + + mkdir(prefix.lib) + install('libmetis.a', prefix.lib) + + mkdir(prefix.include) + for h in glob.glob(join_path('Lib', '*.h')): + install(h, prefix.include) + + mkdir(prefix.share) + for f in (join_path(*p) + for p in (('Programs', 'io.c'), + ('Test','mtest.c'), + ('Graphs','4elt.graph'), + ('Graphs', 'metis.mesh'), + ('Graphs', 'test.mgraph'))): + install(f, prefix.share) + + if '+shared' in spec: + if sys.platform == 'darwin': + lib_dsuffix = 'dylib' + load_flag = '-Wl,-all_load' + no_load_flag = '' + else: + lib_dsuffix = 'so' + load_flag = '-Wl,-whole-archive' + no_load_flag = '-Wl,-no-whole-archive' + + os.system(spack_cc + ' -fPIC -shared ' + load_flag + + ' libmetis.a ' + no_load_flag + ' -o libmetis.' + + lib_dsuffix) + install('libmetis.' + lib_dsuffix, prefix.lib) + + # Set up and run tests on installation + symlink(join_path(prefix.share, 'io.c'), 'io.c') + symlink(join_path(prefix.share, 'mtest.c'), 'mtest.c') + os.system(spack_cc + ' -I%s' % prefix.include + ' -c io.c') + os.system(spack_cc + ' -I%s' % prefix.include + + ' -L%s' % prefix.lib + ' -lmetis mtest.c io.o -o mtest') + _4eltgraph = join_path(prefix.share, '4elt.graph') + test_mgraph = join_path(prefix.share, 'test.mgraph') + metis_mesh = join_path(prefix.share, 'metis.mesh') + kmetis = join_path(prefix.bin, 'kmetis') + os.system('./mtest ' + _4eltgraph) + os.system(kmetis + ' ' + _4eltgraph + ' 40') + os.system(join_path(prefix.bin, 'onmetis') + ' ' + _4eltgraph) + os.system(join_path(prefix.bin, 'pmetis') + ' ' + test_mgraph + ' 2') + os.system(kmetis + ' ' + test_mgraph + ' 2') + os.system(kmetis + ' ' + test_mgraph + ' 5') + os.system(join_path(prefix.bin, 'partnmesh') + metis_mesh + ' 10') + os.system(join_path(prefix.bin, 'partdmesh') + metis_mesh + ' 10') + os.system(join_path(prefix.bin, 'mesh2dual') + metis_mesh) + + + @when('@5:') def install(self, spec, prefix): options = [] diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 025d86ebdc..58f790ec32 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -23,7 +23,7 @@ class Mumps(Package): depends_on('scotch + esmumps', when='~ptscotch+scotch') depends_on('scotch + esmumps + mpi', when='+ptscotch') - depends_on('metis', when='+metis') + depends_on('metis@5:', when='+metis') depends_on('parmetis', when="+parmetis") depends_on('blas') depends_on('lapack') diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index ff4370aa4b..b49f8dae00 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -44,7 +44,7 @@ class Parmetis(Package): depends_on('mpi') patch('enable_external_metis.patch') - depends_on('metis') + depends_on('metis@5:') # bug fixes from PETSc developers # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 5c1fc6cc92..1161dd7d67 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -40,7 +40,7 @@ class Petsc(Package): # Other dependencies depends_on('boost', when='+boost') - depends_on('metis', when='+metis') + depends_on('metis@5:', when='+metis') depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index ddcb7f9225..5cf5e129b4 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -15,7 +15,7 @@ class SuperluDist(Package): depends_on ('blas') depends_on ('lapack') depends_on ('parmetis') - depends_on ('metis') + depends_on ('metis@5:') def install(self, spec, prefix): makefile_inc = [] diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 6223848c68..0f72055fa7 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -42,7 +42,7 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') - depends_on('metis',when='+metis') + depends_on('metis@5:',when='+metis') depends_on('suite-sparse',when='+suite-sparse') # MPI related dependencies -- cgit v1.2.3-60-g2f50 From bbd328d307b6b6a1350114a68a1ce294347a0176 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Wed, 6 Apr 2016 16:58:48 -0700 Subject: metis 5: fix download url Spack picks up the wrong download for metis 5.1.0 from parsing the url field for metis 4.0.3. Add an explicit url field to fix this bug. --- var/spack/repos/builtin/packages/metis/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index e348eca4ba..41e3ebb429 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -36,7 +36,8 @@ class Metis(Package): homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" - version('5.1.0', '5465e67079419a69e0116de24fce58fe') + version('5.1.0', '5465e67079419a69e0116de24fce58fe', + url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz') version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55', url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz') -- cgit v1.2.3-60-g2f50