From 5d618886570e98e6745593701246b877998a5367 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 23 Nov 2015 16:51:16 -0500 Subject: Correct Spack cc script --- lib/spack/env/cc | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 75a63f6fac..f3fadfcf45 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -126,6 +126,11 @@ if [ -z "$mode" ]; then elif [ "$arg" = -c ]; then mode=cc break + elif [ "$arg" = -S ]; then + mode=as + echo "spac cc mode as" "$@" + exit 1 + break fi done fi @@ -155,6 +160,7 @@ libraries=() libs=() rpaths=() other_args=() +all_args=("$@") while [ -n "$1" ]; do case "$1" in @@ -178,6 +184,8 @@ while [ -n "$1" ]; do if [ -z "$arg" ]; then shift; arg="$1"; fi if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") + elif [[ "$arg" = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") elif [[ "$arg" = -rpath ]]; then shift; arg="$1" if [[ "$arg" != -Wl,* ]]; then @@ -193,6 +201,8 @@ while [ -n "$1" ]; do if [ -z "$arg" ]; then shift; arg="$1"; fi if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") + elif [[ "$arg" = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") elif [[ "$arg" = -rpath ]]; then shift; arg="$1" if [[ "$arg" != -Xlinker,* ]]; then @@ -247,25 +257,46 @@ IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do if [ -d "$dep/include" ]; then includes+=("$dep/include") + all_args=("-I$dep/include" ${all_args[@]}) fi if [ -d "$dep/lib" ]; then libraries+=("$dep/lib") rpaths+=("$dep/lib") + if [ "$mode" = ccld ]; then + all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) + elif [ "$mode" = ld ]; then + all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) + fi fi if [ -d "$dep/lib64" ]; then libraries+=("$dep/lib64") rpaths+=("$dep/lib64") + if [ "$mode" = ccld ]; then + all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) + elif [ "$mode" = ld ]; then + all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) + fi fi done # Include all -L's and prefix/whatever dirs in rpath for dir in "${libraries[@]}"; do [[ dir = $SPACK_INSTALL* ]] && rpaths+=("$dir") + if [ "$mode" = ccld ]; then + [[ dir = $SPACK_INSTALL* ]] && all_args=("-Wl,-rpath,$dir" ${all_args[@]}) + elif [ "$mode" = ld ]; then + [[ dir = $SPACK_INSTALL* ]] && all_args=("-rpath" "$dir" ${all_args[@]}) + fi done rpaths+=("$SPACK_PREFIX/lib") rpaths+=("$SPACK_PREFIX/lib64") +if [ "$mode" = ccld ]; then + all_args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${all_args[@]}) +elif [ "$mode" = ld ]; then + all_args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${all_args[@]}) +fi # Put the arguments together args=() @@ -317,7 +348,8 @@ done export PATH full_command=("$command") -full_command+=("${args[@]}") +# full_command+=("${args[@]}") +full_command+=("${all_args[@]}") # # Write the input and output commands to debug logs if it's asked for. -- cgit v1.2.3-60-g2f50 From ba22fc8b78841728500966d471db7b5bfd26cf56 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 21 Dec 2015 10:21:33 -0500 Subject: Simplify Spack cc script --- lib/spack/env/cc | 283 +++++++++++++++++++++++++------------------------------ 1 file changed, 130 insertions(+), 153 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index f3fadfcf45..053295f42d 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -65,7 +65,7 @@ function die { } for param in $parameters; do - if [ -z "${!param}" ]; then + if [[ -z ${!param} ]]; then die "Spack compiler must be run from spack! Input $param was missing!" fi done @@ -114,114 +114,118 @@ case "$command" in esac # Finish setting up the mode. -if [ -z "$mode" ]; then +if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do - if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then - mode=vcheck - break - elif [ "$arg" = -E ]; then - mode=cpp - break - elif [ "$arg" = -c ]; then - mode=cc - break - elif [ "$arg" = -S ]; then - mode=as - echo "spac cc mode as" "$@" - exit 1 - break - fi + case "$arg" in + -v|-V|--version|-dumpversion) + mode=vcheck + break + ;; + -E) + mode=cpp + break + ;; + -c) + mode=cc + break + ;; + -S) + mode=as + break + ;; + esac done fi # Dump the version and exist if we're in testing mode. -if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then +if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then echo "$mode" exit fi # Check that at least one of the real commands was actually selected, # otherwise we don't know what to execute. -if [ -z "$command" ]; then +if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi # Save original command for debug logging input_command="$@" +args=("$@") -# -# Now do real parsing of the command line args, trying hard to keep -# non-rpath linker arguments in the proper order w.r.t. other command -# line arguments. This is important for things like groups. -# -includes=() -libraries=() -libs=() -rpaths=() -other_args=() -all_args=("$@") +# Dump parsed values for unit testing if asked for +if [[ -n $SPACK_TEST_COMMAND ]]; then -while [ -n "$1" ]; do - case "$1" in - -I*) - arg="${1#-I}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - includes+=("$arg") - ;; - -L*) - arg="${1#-L}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libraries+=("$arg") - ;; - -l*) - arg="${1#-l}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libs+=("$arg") - ;; - -Wl,*) - arg="${1#-Wl,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ "$arg" = -rpath ]]; then - shift; arg="$1" - if [[ "$arg" != -Wl,* ]]; then - die "-Wl,-rpath was not followed by -Wl,*" + # + # Now do real parsing of the command line args, trying hard to keep + # non-rpath linker arguments in the proper order w.r.t. other command line + # arguments. This is important for things like groups. + # + includes=() + libraries=() + libs=() + rpaths=() + other_args=() + + while [[ -n $1 ]]; do + case "$1" in + -I*) + arg="${1#-I}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + includes+=("$arg") + ;; + -L*) + arg="${1#-L}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + libraries+=("$arg") + ;; + -l*) + arg="${1#-l}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + libs+=("$arg") + ;; + -Wl,*) + arg="${1#-Wl,}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + if [[ $arg = -rpath=* ]]; then + rpaths+=("${arg#-rpath=}") + elif [[ $arg = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") + elif [[ $arg = -rpath ]]; then + shift; arg="$1" + if [[ $arg != -Wl,* ]]; then + die "-Wl,-rpath was not followed by -Wl,*" + fi + rpaths+=("${arg#-Wl,}") + else + other_args+=("-Wl,$arg") fi - rpaths+=("${arg#-Wl,}") - else - other_args+=("-Wl,$arg") - fi - ;; - -Xlinker,*) - arg="${1#-Xlinker,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ "$arg" = -rpath ]]; then - shift; arg="$1" - if [[ "$arg" != -Xlinker,* ]]; then - die "-Xlinker,-rpath was not followed by -Xlinker,*" + ;; + -Xlinker,*) + arg="${1#-Xlinker,}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + if [[ $arg = -rpath=* ]]; then + rpaths+=("${arg#-rpath=}") + elif [[ $arg = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") + elif [[ $arg = -rpath ]]; then + shift; arg="$1" + if [[ $arg != -Xlinker,* ]]; then + die "-Xlinker,-rpath was not followed by -Xlinker,*" + fi + rpaths+=("${arg#-Xlinker,}") + else + other_args+=("-Xlinker,$arg") fi - rpaths+=("${arg#-Xlinker,}") - else - other_args+=("-Xlinker,$arg") - fi - ;; - *) - other_args+=("$1") - ;; - esac - shift -done + ;; + *) + other_args+=("$1") + ;; + esac + shift + done -# Dump parsed values for unit testing if asked for -if [ -n "$SPACK_TEST_COMMAND" ]; then IFS=$'\n' case "$SPACK_TEST_COMMAND" in dump-includes) echo "${includes[*]}";; @@ -246,8 +250,8 @@ if [ -n "$SPACK_TEST_COMMAND" ]; then echo "${other_args[*]}" ;; *) - echo "ERROR: Unknown test command" - exit 1 ;; + die "ERROR: Unknown test command" + ;; esac exit fi @@ -255,66 +259,44 @@ fi # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do - if [ -d "$dep/include" ]; then - includes+=("$dep/include") - all_args=("-I$dep/include" ${all_args[@]}) + if [[ -d $dep/include ]]; then + args=("-I$dep/include" "${args[@]}") fi - if [ -d "$dep/lib" ]; then - libraries+=("$dep/lib") - rpaths+=("$dep/lib") - if [ "$mode" = ccld ]; then - all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) - elif [ "$mode" = ld ]; then - all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) - fi + if [[ -d $dep/lib ]]; then + # libraries+=("$dep/lib") + if [[ $mode = ccld ]]; then + args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + elif [[ $mode = ld ]]; then + args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + fi fi - if [ -d "$dep/lib64" ]; then - libraries+=("$dep/lib64") - rpaths+=("$dep/lib64") - if [ "$mode" = ccld ]; then - all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) - elif [ "$mode" = ld ]; then - all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) - fi + if [[ -d $dep/lib64 ]]; then + # libraries+=("$dep/lib64") + if [[ $mode = ccld ]]; then + args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + elif [[ $mode = ld ]]; then + args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + fi fi done # Include all -L's and prefix/whatever dirs in rpath -for dir in "${libraries[@]}"; do - [[ dir = $SPACK_INSTALL* ]] && rpaths+=("$dir") - if [ "$mode" = ccld ]; then - [[ dir = $SPACK_INSTALL* ]] && all_args=("-Wl,-rpath,$dir" ${all_args[@]}) - elif [ "$mode" = ld ]; then - [[ dir = $SPACK_INSTALL* ]] && all_args=("-rpath" "$dir" ${all_args[@]}) - fi -done -rpaths+=("$SPACK_PREFIX/lib") -rpaths+=("$SPACK_PREFIX/lib64") -if [ "$mode" = ccld ]; then - all_args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${all_args[@]}) -elif [ "$mode" = ld ]; then - all_args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${all_args[@]}) -fi - -# Put the arguments together -args=() -for dir in "${includes[@]}"; do args+=("-I$dir"); done -args+=("${other_args[@]}") -for dir in "${libraries[@]}"; do args+=("-L$dir"); done -for lib in "${libs[@]}"; do args+=("-l$lib"); done - -if [ "$mode" = ccld ]; then - for dir in "${rpaths[@]}"; do - args+=("-Wl,-rpath") - args+=("-Wl,$dir"); - done -elif [ "$mode" = ld ]; then - for dir in "${rpaths[@]}"; do - args+=("-rpath") - args+=("$dir"); - done +if [[ $mode = ccld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-Wl,-rpath,$dir" "${args[@]}") + # fi + # done + args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${args[@]}) +elif [[ $mode = ld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-rpath" "$dir" "${args[@]}") + # fi + # done + args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${args[@]}) fi # @@ -330,34 +312,29 @@ unset DYLD_LIBRARY_PATH # IFS=':' read -ra env_path <<< "$PATH" IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" -spack_env_dirs+=(".") +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 + if [[ $dir = $rm_dir ]]; then remove=True; fi done - if [ -z "$remove" ]; then - if [ -z "$PATH" ]; then - PATH="$dir" - else - PATH="$PATH:$dir" - fi + if [[ -z $remove ]]; then + PATH="${PATH:+$PATH:}$dir" fi done export PATH full_command=("$command") -# full_command+=("${args[@]}") -full_command+=("${all_args[@]}") +full_command+=("${args[@]}") # # 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 "$input_command" >> $input_log + echo "$input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-60-g2f50 From 3427174eb065a6e74fc279076423c2c5c5e8e737 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 22 Dec 2015 15:49:14 -0500 Subject: Correct quoting --- lib/spack/env/cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 565f959ca4..4ac8f2e7f4 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -265,7 +265,7 @@ for dep in "${deps[@]}"; do if [[ -d $dep/lib ]]; then # libraries+=("$dep/lib") - if [[ $mode = ccld ]]; then + if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") @@ -289,14 +289,14 @@ if [[ $mode = ccld ]]; then # args=("-Wl,-rpath,$dir" "${args[@]}") # fi # done - args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${args[@]}) + args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then # for dir in "${libraries[@]}"; do # if [[ dir = $SPACK_INSTALL* ]]; then # args=("-rpath" "$dir" "${args[@]}") # fi # done - args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${args[@]}) + args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi # @@ -325,8 +325,7 @@ for dir in "${env_path[@]}"; do done export PATH -full_command=("$command") -full_command+=("${args[@]}") +full_command=("$command" "${args[@]}") # # Write the input and output commands to debug logs if it's asked for. -- cgit v1.2.3-60-g2f50 From 981cefe8d3f4f73461789713726a9658498a5f14 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 10:54:12 -0500 Subject: Make Boost build with MPI on OS X Boost does not build on OS X with either gold or binutils. The gold linker does not exist on Darwin, and binutils on Darwin provides an assembler that doesn't work for Boost. - Introduce a variant that specifies whether to build with binutils, defaulting to true for backward compatibility - Auto-detect whether we build on Darwin; in this case, set the gold and binutils variant defaults to false - Clean up configure flags for as and ld --- var/spack/packages/boost/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 3427b74ad6..894af9edd1 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -1,5 +1,8 @@ from spack import * +import os +import sys + class Boost(Package): """Boost provides free peer-reviewed portable C++ source libraries, emphasizing libraries that work well with the C++ @@ -127,6 +130,16 @@ class Boost(Package): '--layout=tagged']) def install(self, spec, prefix): + # On Darwin, Boost expects the Darwin libtool. However, one of the + # dependencies may have pulled in Spack's GNU libtool, and these two are + # not compatible. We thus create a symlink to Darwin's libtool and add + # it at the beginning of PATH. + if sys.platform == 'darwin': + newdir = os.path.abspath('darwin-libtool') + mkdirp(newdir) + force_symlink('/usr/bin/libtool', join_path(newdir, 'libtool')) + env['PATH'] = newdir + ':' + env['PATH'] + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' -- cgit v1.2.3-60-g2f50 From 77c17e1d92ac1c98a5c43247d6582876bc7d14d4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 12:51:43 -0500 Subject: Since my last patch didn't get traction, here is a new approach to building gcc on Darwin: - Add a variant specifying whether to build with binutils, defaulting to true - Auto-detect whether this is Darwin; if so, set binutils and gold defaults to false, as they don't work on Darwin - Disable Go, which doesn't build on Darwin - Clean up handling configure options --- var/spack/repos/builtin/packages/gcc/package.py | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 3e5895cfb8..eb2129c4da 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -26,6 +26,7 @@ from spack import * from contextlib import closing from glob import glob +import sys class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -49,13 +50,14 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('gold', default=True, description="Build the gold linker plugin for ld-based LTO") + variant('binutils', default=sys.platform != 'darwin', description="Build via binutils") + variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") depends_on("mpc") # when @4.5: - depends_on("binutils~libiberty", when='~gold') - depends_on("binutils~libiberty+gold", when='+gold') + depends_on("binutils~libiberty", when='+binutils ~gold') + depends_on("binutils~libiberty+gold", when='+binutils +gold') # Save these until we can do optional deps. depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) @@ -67,7 +69,7 @@ class Gcc(Package): filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) - if spec.satisfies("@4.7.1:"): + if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': enabled_languages.add('go') # Generic options to compile GCC @@ -79,17 +81,18 @@ class Gcc(Package): "--with-mpfr=%s" % spec['mpfr'].prefix, "--with-gmp=%s" % spec['gmp'].prefix, "--enable-lto", - "--with-gnu-ld", - "--with-gnu-as", "--with-quad"] # Binutils - static_bootstrap_flags = "-static-libstdc++ -static-libgcc" - binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-ld=%s/bin/ld" % spec['binutils'].prefix, - "--with-as=%s/bin/as" % spec['binutils'].prefix] - options.extend(binutils_options) + if spec.satisfies('+binutils'): + static_bootstrap_flags = "-static-libstdc++ -static-libgcc" + binutils_options = ["--with-sysroot=/", + "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-gnu-ld", + "--with-ld=%s/bin/ld" % spec['binutils'].prefix, + "--with-gnu-as", + "--with-as=%s/bin/as" % spec['binutils'].prefix] + options.extend(binutils_options) # Isl if spec.satisfies(Gcc.DEPENDS_ON_ISL_PREDICATE): isl_options = ["--with-isl=%s" % spec['isl'].prefix] -- cgit v1.2.3-60-g2f50 From ff81aff2540f9eadd8d0ce123ae3143ebcb68789 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 13:05:42 -0500 Subject: Remove source-code optimization and cleanup --- lib/spack/env/cc | 106 +++++++++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 62 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b83731404b..ac8f717cc7 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -65,7 +65,7 @@ function die { } for param in $parameters; do - if [[ -z ${!param} ]]; then + if [ -z "${!param}" ]; then die "Spack compiler must be run from spack! Input $param was missing!" fi done @@ -114,39 +114,31 @@ case "$command" in esac # Finish setting up the mode. -if [[ -z $mode ]]; then +if [ -z "$mode" ]; then mode=ccld for arg in "$@"; do - case "$arg" in - -v|-V|--version|-dumpversion) - mode=vcheck - break - ;; - -E) - mode=cpp - break - ;; - -c) - mode=cc - break - ;; - -S) - mode=as - break - ;; - esac + if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then + mode=vcheck + break + elif [ "$arg" = -E ]; then + mode=cpp + break + elif [ "$arg" = -c ]; then + mode=cc + break + fi done fi # Dump the version and exist if we're in testing mode. -if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then +if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then echo "$mode" exit fi # Check that at least one of the real commands was actually selected, # otherwise we don't know what to execute. -if [[ -z $command ]]; then +if [ -z "$command" ]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi @@ -159,8 +151,8 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then # # Now do real parsing of the command line args, trying hard to keep - # non-rpath linker arguments in the proper order w.r.t. other command line - # arguments. This is important for things like groups. + # non-rpath linker arguments in the proper order w.r.t. other command + # line arguments. This is important for things like groups. # includes=() libraries=() @@ -168,33 +160,31 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then rpaths=() other_args=() - while [[ -n $1 ]]; do + while [ -n "$1" ]; do case "$1" in -I*) arg="${1#-I}" - if [[ -z $arg ]]; then shift; arg="$1"; fi + if [ -z "$arg" ]; then shift; arg="$1"; fi includes+=("$arg") ;; -L*) arg="${1#-L}" - if [[ -z $arg ]]; then shift; arg="$1"; fi + if [ -z "$arg" ]; then shift; arg="$1"; fi libraries+=("$arg") ;; -l*) arg="${1#-l}" - if [[ -z $arg ]]; then shift; arg="$1"; fi + if [ -z "$arg" ]; then shift; arg="$1"; fi libs+=("$arg") ;; -Wl,*) arg="${1#-Wl,}" - if [[ -z $arg ]]; then shift; arg="$1"; fi - if [[ $arg = -rpath=* ]]; then + if [ -z "$arg" ]; then shift; arg="$1"; fi + if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ $arg = -rpath ]]; then + elif [[ "$arg" = -rpath ]]; then shift; arg="$1" - if [[ $arg != -Wl,* ]]; then + if [[ "$arg" != -Wl,* ]]; then die "-Wl,-rpath was not followed by -Wl,*" fi rpaths+=("${arg#-Wl,}") @@ -204,14 +194,12 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then ;; -Xlinker,*) arg="${1#-Xlinker,}" - if [[ -z $arg ]]; then shift; arg="$1"; fi - if [[ $arg = -rpath=* ]]; then + if [ -z "$arg" ]; then shift; arg="$1"; fi + if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ $arg = -rpath ]]; then + elif [[ "$arg" = -rpath ]]; then shift; arg="$1" - if [[ $arg != -Xlinker,* ]]; then + if [[ "$arg" != -Xlinker,* ]]; then die "-Xlinker,-rpath was not followed by -Xlinker,*" fi rpaths+=("${arg#-Xlinker,}") @@ -250,8 +238,8 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then echo "${other_args[*]}" ;; *) - die "ERROR: Unknown test command" - ;; + echo "ERROR: Unknown test command" + exit 1 ;; esac exit fi @@ -259,12 +247,11 @@ fi # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do - if [[ -d $dep/include ]]; then + if [ -d "$dep/include" ]; then args=("-I$dep/include" "${args[@]}") fi - if [[ -d $dep/lib ]]; then - # libraries+=("$dep/lib") + if [ -d "$dep/lib" ]; then if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then @@ -272,7 +259,7 @@ for dep in "${deps[@]}"; do fi fi - if [[ -d $dep/lib64 ]]; then + if [ -d "$dep/lib64" ]; then # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") @@ -284,18 +271,8 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-Wl,-rpath,$dir" "${args[@]}") - # fi - # done args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-rpath" "$dir" "${args[@]}") - # fi - # done args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -317,23 +294,28 @@ PATH="" for dir in "${env_path[@]}"; do remove="" for rm_dir in "${spack_env_dirs[@]}"; do - if [[ $dir = $rm_dir ]]; then remove=True; fi + if [ "$dir" = "$rm_dir" ]; then remove=True; fi done - if [[ -z $remove ]]; then - PATH="${PATH:+$PATH:}$dir" + if [ -z "$remove" ]; then + if [ -z "$PATH" ]; then + PATH="$dir" + else + PATH="$PATH:$dir" + fi fi done export PATH -full_command=("$command" "${args[@]}") +full_command=("$command") +full_command+=("${args[@]}") # # 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 "$input_command" >> $input_log + echo "$input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-60-g2f50 From 8e33cc1ae118b138aadc3c354b622c045dd81009 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 13:11:45 -0500 Subject: Properly wrap all long lines --- var/spack/repos/builtin/packages/gcc/package.py | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index eb2129c4da..8292670de0 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -50,8 +50,10 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('binutils', default=sys.platform != 'darwin', description="Build via binutils") - variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") + variant('binutils', default=sys.platform != 'darwin', + description="Build via binutils") + variant('gold', default=sys.platform != 'darwin', + description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") @@ -66,7 +68,8 @@ class Gcc(Package): def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. - filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) + filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', + string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': @@ -77,17 +80,19 @@ class Gcc(Package): "--libdir=%s/lib64" % prefix, "--disable-multilib", "--enable-languages=" + ','.join(enabled_languages), - "--with-mpc=%s" % spec['mpc'].prefix, - "--with-mpfr=%s" % spec['mpfr'].prefix, - "--with-gmp=%s" % spec['gmp'].prefix, + "--with-mpc=%s" % spec['mpc'].prefix, + "--with-mpfr=%s" % spec['mpfr'].prefix, + "--with-gmp=%s" % spec['gmp'].prefix, "--enable-lto", "--with-quad"] # Binutils if spec.satisfies('+binutils'): static_bootstrap_flags = "-static-libstdc++ -static-libgcc" binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-stage1-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), "--with-gnu-ld", "--with-ld=%s/bin/ld" % spec['binutils'].prefix, "--with-gnu-as", @@ -120,7 +125,8 @@ class Gcc(Package): """Generate a spec file so the linker adds a rpath to the libs the compiler used to build the executable.""" if not self.spec_dir: - tty.warn("Could not install specs for %s." % self.spec.format('$_$@')) + tty.warn("Could not install specs for %s." % + self.spec.format('$_$@')) return gcc = Executable(join_path(self.prefix.bin, 'gcc')) @@ -130,5 +136,6 @@ class Gcc(Package): for line in lines: out.write(line + "\n") if line.startswith("*link:"): - out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix)) + out.write("-rpath %s/lib:%s/lib64 \\\n" % + (self.prefix, self.prefix)) set_install_permissions(specs_file) -- cgit v1.2.3-60-g2f50 From 63ae40716908ee8c19d49de83accff482d921331 Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 3 Mar 2016 16:39:21 +0100 Subject: netlib-lapack : unified build with netlib-blas openssl : updated version py-numpy : updated dependencies --- .../repos/builtin/packages/netlib-blas/package.py | 46 ----------------- .../builtin/packages/netlib-lapack/package.py | 59 ++++++++-------------- .../repos/builtin/packages/openssl/package.py | 1 + .../repos/builtin/packages/py-numpy/package.py | 3 +- 4 files changed, 22 insertions(+), 87 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/netlib-blas/package.py diff --git a/var/spack/repos/builtin/packages/netlib-blas/package.py b/var/spack/repos/builtin/packages/netlib-blas/package.py deleted file mode 100644 index 85e97323d3..0000000000 --- a/var/spack/repos/builtin/packages/netlib-blas/package.py +++ /dev/null @@ -1,46 +0,0 @@ -from spack import * -import os - - -class NetlibBlas(Package): - """Netlib reference BLAS""" - homepage = "http://www.netlib.org/lapack/" - url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" - - version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') - - variant('fpic', default=False, description="Build with -fpic compiler option") - - # virtual dependency - provides('blas') - - # Doesn't always build correctly in parallel - parallel = False - - def patch(self): - os.symlink('make.inc.example', 'make.inc') - - mf = FileFilter('make.inc') - mf.filter('^FORTRAN.*', 'FORTRAN = f90') - mf.filter('^LOADER.*', 'LOADER = f90') - mf.filter('^CC =.*', 'CC = cc') - - if '+fpic' in self.spec: - mf.filter('^OPTS.*=.*', 'OPTS = -O2 -frecursive -fpic') - mf.filter('^CFLAGS =.*', 'CFLAGS = -O3 -fpic') - - - def install(self, spec, prefix): - make('blaslib') - - # Tests that blas builds correctly - make('blas_testing') - - # No install provided - mkdirp(prefix.lib) - install('librefblas.a', prefix.lib) - - # Blas virtual package should provide blas.a and libblas.a - with working_dir(prefix.lib): - symlink('librefblas.a', 'blas.a') - symlink('librefblas.a', 'libblas.a') diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index fb6b99e27c..1bb77919d5 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -1,16 +1,15 @@ from spack import * + class NetlibLapack(Package): """ - LAPACK version 3.X is a comprehensive FORTRAN library that does - linear algebra operations including matrix inversions, least - squared solutions to linear sets of equations, eigenvector - analysis, singular value decomposition, etc. It is a very - comprehensive and reputable package that has found extensive - use in the scientific community. + LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix + inversions, least squared solutions to linear sets of equations, eigenvector analysis, singular value + decomposition, etc. It is a very comprehensive and reputable package that has found extensive use in the + scientific community. """ homepage = "http://www.netlib.org/lapack/" - url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') @@ -18,42 +17,24 @@ class NetlibLapack(Package): version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') - variant('shared', default=False, description="Build shared library version") + variant('debug', default=False, description='Activates the Debug build type') + variant('shared', default=True, description="Build shared library version") + + variant('lapacke', default=True, description='Activates the build of the LAPACKE C interface') # virtual dependency + provides('blas') provides('lapack') - # blas is a virtual dependency. - depends_on('blas') - depends_on('cmake') - # Doesn't always build correctly in parallel - parallel = False - - @when('^netlib-blas') - def get_blas_libs(self): - blas = self.spec['netlib-blas'] - return [join_path(blas.prefix.lib, 'blas.a')] - - - @when('^atlas') - def get_blas_libs(self): - blas = self.spec['atlas'] - return [join_path(blas.prefix.lib, l) - for l in ('libf77blas.a', 'libatlas.a')] - - def install(self, spec, prefix): - blas_libs = ";".join(self.get_blas_libs()) - cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] - - if '+shared' in spec: - cmake_args.append('-DBUILD_SHARED_LIBS=ON') - - cmake_args += std_cmake_args - - cmake(*cmake_args) - make() - make("install") - + cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), + '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), + '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] + cmake_args.extend(std_cmake_args) + + with working_dir('spack-build', create=True): + cmake('..', *cmake_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index c73102f05d..70afaf4038 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -17,6 +17,7 @@ class Openssl(Package): version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') + version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa') depends_on("zlib") parallel = False diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 0354811186..0844ff5caa 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -12,8 +12,7 @@ class PyNumpy(Package): extends('python') depends_on('py-nose') - depends_on('netlib-blas+fpic', when='+blas') - depends_on('netlib-lapack+shared', when='+blas') + depends_on('lapack+shared', when='+blas') def install(self, spec, prefix): if '+blas' in spec: -- cgit v1.2.3-60-g2f50 From 310099d88838c8e08d15fb34028263c9294b62e9 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 4 Mar 2016 09:31:03 +0100 Subject: atlas : provides blas and lapack --- var/spack/repos/builtin/packages/atlas/package.py | 58 +++++++++++------------ 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index fc683363a7..f9b50417b0 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -1,31 +1,34 @@ from spack import * from spack.util.executable import Executable -import os +import os.path class Atlas(Package): """ - Automatically Tuned Linear Algebra Software, generic shared - ATLAS is an approach for the automatic generation and optimization of - numerical software. Currently ATLAS supplies optimized versions for the - complete set of linear algebra kernels known as the Basic Linear Algebra - Subroutines (BLAS), and a subset of the linear algebra routines in the - LAPACK library. + Automatically Tuned Linear Algebra Software, generic shared ATLAS is an approach for the automatic generation and + optimization of numerical software. Currently ATLAS supplies optimized versions for the complete set of linear + algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines + in the LAPACK library. """ homepage = "http://math-atlas.sourceforge.net/" - version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', - url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da', - url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2') + url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2', preferred=True) + resource(name='lapack', + url='http://www.netlib.org/lapack/lapack-3.5.0.tgz', + md5='b1d3e3e425b2e44a06760ff173104bdf', + destination='spack-resource-lapack', + when='@3:') - # TODO: make this provide BLAS once it works better. Create a way - # TODO: to mark "beta" packages and require explicit invocation. + version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', + url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') - # provides('blas') + variant('shared', default=True, description='Builds shared library') + provides('blas') + provides('lapack') def patch(self): - # Disable thraed check. LLNL's environment does not allow + # Disable thread check. LLNL's environment does not allow # disabling of CPU throttling in a way that ATLAS actually # understands. filter_file(r'^\s+if \(thrchk\) exit\(1\);', 'if (0) exit(1);', @@ -33,26 +36,21 @@ class Atlas(Package): # TODO: investigate a better way to add the check back in # TODO: using, say, MSRs. Or move this to a variant. - @when('@:3.10') def install(self, spec, prefix): - with working_dir('ATLAS-Build', create=True): - configure = Executable('../configure') - configure('--prefix=%s' % prefix, '-C', 'ic', 'cc', '-C', 'if', 'f77', "--dylibs") - make() - make('check') - make('ptcheck') - make('time') - make("install") + options = [] + if '+shared' in spec: + options.append('--shared') - def install(self, spec, prefix): - with working_dir('ATLAS-Build', create=True): - configure = Executable('../configure') - configure('--incdir=%s' % prefix.include, - '--libdir=%s' % prefix.lib, - '--cc=cc', - "--shared") + # Lapack resource + lapack_stage = self.stage[1] + lapack_tarfile = os.path.basename(lapack_stage.fetcher.url) + lapack_tarfile_path = join_path(lapack_stage.path, lapack_tarfile) + options.append('--with-netlib-lapack-tarfile=%s' % lapack_tarfile_path) + with working_dir('spack-build', create=True): + configure = Executable('../configure') + configure('--prefix=%s' % prefix, *options) make() make('check') make('ptcheck') -- cgit v1.2.3-60-g2f50 From a2af4940aaf169f3358f19986fc94a02222a8096 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 4 Mar 2016 09:59:16 +0100 Subject: atlas : disabling parallel builds --- var/spack/repos/builtin/packages/atlas/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index f9b50417b0..b5504122b7 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -27,6 +27,8 @@ class Atlas(Package): provides('blas') provides('lapack') + parallel = False + def patch(self): # Disable thread check. LLNL's environment does not allow # disabling of CPU throttling in a way that ATLAS actually -- cgit v1.2.3-60-g2f50 From 4f14db8af214b6648da04c5c5121757ea171f18c Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 10 Mar 2016 10:34:51 +0100 Subject: netlib-lapack : optional dependency on external blas --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 1bb77919d5..a208929d08 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -19,19 +19,29 @@ class NetlibLapack(Package): variant('debug', default=False, description='Activates the Debug build type') variant('shared', default=True, description="Build shared library version") + variant('external-blas', default=False, description='Build lapack with an external blas') variant('lapacke', default=True, description='Activates the build of the LAPACKE C interface') # virtual dependency - provides('blas') + provides('blas', when='~external-blas') provides('lapack') depends_on('cmake') + depends_on('blas', when='+external-blas') def install(self, spec, prefix): cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] + 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 + cmake_args.extend([ + '-DUSE_OPTIMIZED_BLAS:BOOL=ON', + '-DBLAS_LIBRARIES:PATH=%s' % join_path(spec['blas'].prefix.lib, 'libblas.a') + ]) + cmake_args.extend(std_cmake_args) with working_dir('spack-build', create=True): -- cgit v1.2.3-60-g2f50 From f07d4c94393f6541d1a6afd9118d3f9c84bd08fc Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 16 Mar 2016 18:55:14 -0600 Subject: + Provide ~perl and ~shared variants. --- var/spack/repos/builtin/packages/graphviz/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 7af7da1881..2a2102bfcb 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -7,6 +7,9 @@ class Graphviz(Package): version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') + variant('perl', default=True, description='Disable if you have problems with the optional script language bindings') + variant('shared', default=True, description='Building static is required on AIX') + parallel = False depends_on("swig") @@ -14,8 +17,12 @@ class Graphviz(Package): depends_on("ghostscript") def install(self, spec, prefix): - configure("--prefix=%s" %prefix) + options = ['--prefix=%s' % prefix] + if '~perl' in spec: + options.append('--disable-perl') + if '~shared' in spec: + options.append('--enable-shared=no') + configure(*options) make() make("install") - -- cgit v1.2.3-60-g2f50 From f3ea0420f80f418a0f3e628479c782f197e6a43e Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 17 Mar 2016 21:53:13 -0400 Subject: Import recent changes --- lib/spack/env/cc | 185 +++++++++++++++++++------------------------------------ 1 file changed, 65 insertions(+), 120 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index df6795c264..c6a09724e9 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -65,7 +65,7 @@ function die { } for param in $parameters; do - if [ -z "${!param}" ]; then + if [[ -z ${!param} ]]; then die "Spack compiler must be run from spack! Input $param was missing!" fi done @@ -78,10 +78,11 @@ done # 'command' is set based on the input command to $SPACK_[CC|CXX|F77|F90] # # 'mode' is set to one of: +# cpp preprocess # cc compile +# as assemble # ld link # ccld compile & link -# cpp preprocessor # vcheck version check # command=$(basename "$0") @@ -131,6 +132,9 @@ if [ -z "$mode" ]; then if [ "$arg" = -E ]; then mode=cpp break + elif [ "$arg" = -S ]; then + mode=as + break elif [ "$arg" = -c ]; then mode=cc break @@ -146,22 +150,25 @@ fi # Check that at least one of the real commands was actually selected, # otherwise we don't know what to execute. -if [ -z "$command" ]; then +if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi +if [ "$mode" == vcheck ] ; then + exec ${command} "$@" +fi + # Save original command for debug logging input_command="$@" args=("$@") -<<<<<<< HEAD # Dump parsed values for unit testing if asked for if [[ -n $SPACK_TEST_COMMAND ]]; then # # Now do real parsing of the command line args, trying hard to keep - # non-rpath linker arguments in the proper order w.r.t. other command - # line arguments. This is important for things like groups. + # non-rpath linker arguments in the proper order w.r.t. other command line + # arguments. This is important for things like groups. # includes=() libraries=() @@ -188,32 +195,44 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then ;; -Wl,*) arg="${1#-Wl,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath ]]; then + # TODO: Handle multiple -Wl, continuations of -Wl,-rpath + if [[ $arg == -rpath=* ]]; then + arg="${arg#-rpath=}" + for rpath in ${arg//,/ }; do + rpaths+=("$rpath") + done + elif [[ $arg == -rpath,* ]]; then + arg="${arg#-rpath,}" + for rpath in ${arg//,/ }; do + rpaths+=("$rpath") + done + elif [[ $arg == -rpath ]]; then shift; arg="$1" - if [[ "$arg" != -Wl,* ]]; then + if [[ $arg != '-Wl,'* ]]; then die "-Wl,-rpath was not followed by -Wl,*" fi - rpaths+=("${arg#-Wl,}") + arg="${arg#-Wl,}" + for rpath in ${arg//,/ }; do + rpaths+=("$rpath") + done else other_args+=("-Wl,$arg") fi ;; - -Xlinker,*) - arg="${1#-Xlinker,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then + -Xlinker) + shift; arg="$1"; + if [[ $arg = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath ]]; then + elif [[ $arg = -rpath ]]; then shift; arg="$1" - if [[ "$arg" != -Xlinker,* ]]; then - die "-Xlinker,-rpath was not followed by -Xlinker,*" + if [[ $arg != -Xlinker ]]; then + die "-Xlinker -rpath was not followed by -Xlinker " fi - rpaths+=("${arg#-Xlinker,}") + shift; arg="$1" + rpaths+=("$arg") else - other_args+=("-Xlinker,$arg") + other_args+=("-Xlinker") + other_args+=("$arg") fi ;; *) @@ -222,88 +241,6 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then esac shift done -======= -if [ "$mode" == vcheck ] ; then - exec ${command} "$@" -fi - -# -# Now do real parsing of the command line args, trying hard to keep -# non-rpath linker arguments in the proper order w.r.t. other command -# line arguments. This is important for things like groups. -# -includes=() -libraries=() -libs=() -rpaths=() -other_args=() - -while [ -n "$1" ]; do - case "$1" in - -I*) - arg="${1#-I}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - includes+=("$arg") - ;; - -L*) - arg="${1#-L}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libraries+=("$arg") - ;; - -l*) - arg="${1#-l}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libs+=("$arg") - ;; - -Wl,*) - arg="${1#-Wl,}" - # TODO: Handle multiple -Wl, continuations of -Wl,-rpath - if [[ $arg == -rpath=* ]]; then - arg="${arg#-rpath=}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath,* ]]; then - arg="${arg#-rpath,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath ]]; then - shift; arg="$1" - if [[ $arg != '-Wl,'* ]]; then - die "-Wl,-rpath was not followed by -Wl,*" - fi - arg="${arg#-Wl,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - else - other_args+=("-Wl,$arg") - fi - ;; - -Xlinker) - shift; arg="$1"; - if [[ $arg = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath ]]; then - shift; arg="$1" - if [[ $arg != -Xlinker ]]; then - die "-Xlinker -rpath was not followed by -Xlinker " - fi - shift; arg="$1" - rpaths+=("$arg") - else - other_args+=("-Xlinker") - other_args+=("$arg") - fi - ;; - *) - other_args+=("$1") - ;; - esac - shift -done ->>>>>>> develop IFS=$'\n' case "$SPACK_TEST_COMMAND" in @@ -329,8 +266,8 @@ done echo "${other_args[*]}" ;; *) - echo "ERROR: Unknown test command" - exit 1 ;; + die "ERROR: Unknown test command" + ;; esac exit fi @@ -338,11 +275,14 @@ fi # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do - if [ -d "$dep/include" ]; then - args=("-I$dep/include" "${args[@]}") + if [[ -d $dep/include ]]; then + if [[ $mode = cpp || $mode = cc || $mode = as || $mode = ccld ]]; then + args=("-I$dep/include" "${args[@]}") + fi fi - if [ -d "$dep/lib" ]; then + if [[ -d $dep/lib ]]; then + # libraries+=("$dep/lib") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then @@ -350,7 +290,7 @@ for dep in "${deps[@]}"; do fi fi - if [ -d "$dep/lib64" ]; then + if [[ -d $dep/lib64 ]]; then # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") @@ -362,8 +302,18 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-Wl,-rpath,$dir" "${args[@]}") + # fi + # done args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-rpath" "$dir" "${args[@]}") + # fi + # done args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -385,28 +335,23 @@ PATH="" for dir in "${env_path[@]}"; do remove="" for rm_dir in "${spack_env_dirs[@]}"; do - if [ "$dir" = "$rm_dir" ]; then remove=True; fi + if [[ $dir = $rm_dir ]]; then remove=True; fi done - if [ -z "$remove" ]; then - if [ -z "$PATH" ]; then - PATH="$dir" - else - PATH="$PATH:$dir" - fi + if [[ -z $remove ]]; then + PATH="${PATH:+$PATH:}$dir" fi done export PATH -full_command=("$command") -full_command+=("${args[@]}") +full_command=("$command" "${args[@]}") # # 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 "$input_command" >> $input_log + echo "$input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-60-g2f50 From d493658a583231eeb778613cf7b6c8c8641c63a0 Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Sun, 20 Mar 2016 15:18:36 -0700 Subject: cmake package: add variant for openssl support The openssl variant defaults to true to preserve spack's current CMake configuration, which is using OpenSSL. Signed-off-by: Cyrus Harrison --- var/spack/repos/builtin/packages/cmake/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index cc93c7067c..be930a90ab 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -38,6 +38,7 @@ class Cmake(Package): version('2.8.10.2', '097278785da7182ec0aea8769d06860c') variant('ncurses', default=True, description='Enables the build of the ncurses gui') + variant('openssl', default=True, description="Enables CMake's OpenSSL features") variant('qt', default=False, description='Enables the build of cmake-gui') variant('doc', default=False, description='Enables the generation of html and man page documentation') @@ -77,8 +78,9 @@ class Cmake(Package): options.append('--sphinx-html') options.append('--sphinx-man') - options.append('--') - options.append('-DCMAKE_USE_OPENSSL=ON') + if '+openssl' in spec: + options.append('--') + options.append('-DCMAKE_USE_OPENSSL=ON') configure(*options) make() -- cgit v1.2.3-60-g2f50 From bba66cbe2836e364b58a611a5a5f5ae0d9692df4 Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Sun, 20 Mar 2016 19:27:22 -0700 Subject: cmake: depend on openssl when openssl variant=true --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index be930a90ab..1f93d39769 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -43,6 +43,7 @@ class Cmake(Package): variant('doc', default=False, description='Enables the generation of html and man page documentation') depends_on('ncurses', when='+ncurses') + depends_on('openssl', when='+openssl') depends_on('qt', when='+qt') depends_on('python@2.7.11:', when='+doc') depends_on('py-sphinx', when='+doc') -- cgit v1.2.3-60-g2f50 From 4b46e21685b557188d8738bf11af2e0195c14046 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 21 Mar 2016 19:55:54 -0600 Subject: + Provide package numdiff. --- .../repos/builtin/packages/numdiff/package.py | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/numdiff/package.py diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py new file mode 100644 index 0000000000..a51f6206cf --- /dev/null +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Numdiff(Package): + """Numdiff is a little program that can be used to compare putatively + similar files line by line and field by field, ignoring small numeric + differences or/and different numeric formats.""" + + homepage = 'https://www.nongnu.org/numdiff' + url = 'http://nongnu.askapache.com/numdiff/numdiff-5.8.1.tar.gz' + + version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix] + configure(*options) + make() + make('install') -- cgit v1.2.3-60-g2f50 From 7ec450912dc71915205857da75bb418ffc3d0904 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 21 Mar 2016 21:14:03 -0600 Subject: + Provide subversion and required packages apr and apr-util. + Installation of subversion may need to be modified to include python and perl bindings. I have provided comments to this end, but the code is not active. --- .../packages/apr-util/apr-util.new/package.py | 44 ++++++++++++++++ .../repos/builtin/packages/apr/apr.new/package.py | 51 +++++++++++++++++++ .../packages/subversion/subversion.new/package.py | 59 ++++++++++++++++++++++ var/spack/repos/builtin/packages/swig/package.py | 5 +- 4 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py create mode 100644 var/spack/repos/builtin/packages/apr/apr.new/package.py create mode 100644 var/spack/repos/builtin/packages/subversion/subversion.new/package.py diff --git a/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py b/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py new file mode 100644 index 0000000000..8f19c84d22 --- /dev/null +++ b/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class AprUtil(Package): + """Apache Portable Runtime Utility""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz' + + version('1.5.4', '866825c04da827c6e5f53daff5569f42') + + depends_on('apr') + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/apr/apr.new/package.py b/var/spack/repos/builtin/packages/apr/apr.new/package.py new file mode 100644 index 0000000000..5cbbad350b --- /dev/null +++ b/var/spack/repos/builtin/packages/apr/apr.new/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Apr(Package): + """Apache portable runtime.""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz' + + version('1.5.2', '98492e965963f852ab29f9e61b2ad700') + + #variant('ncurses', default=True, description='Enables the build of the ncurses gui') + #variant('qt', default=False, description='Enables the build of cmake-gui') + #variant('doc', default=False, description='Enables the generation of html and man page documentation') + + #depends_on('ncurses', when='+ncurses') + #depends_on('qt', when='+qt') + #depends_on('python@2.7.11:', when='+doc') + #depends_on('py-sphinx', when='+doc') + + #def url_for_version(self, version): + # """Handle CMake's version-based custom URLs.""" + # return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version) + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix] + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/subversion/subversion.new/package.py b/var/spack/repos/builtin/packages/subversion/subversion.new/package.py new file mode 100644 index 0000000000..b1c3380238 --- /dev/null +++ b/var/spack/repos/builtin/packages/subversion/subversion.new/package.py @@ -0,0 +1,59 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +#import os + +class Subversion(Package): + """Apache Subversion - an open source version control system.""" + homepage = 'https://subversion.apache.org/' + url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' + + version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') + version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') + + depends_on('apr') + depends_on('apr-util') + depends_on('zlib') + depends_on('sqlite') + #depends_on('swig') + + def install(self, spec, prefix): + + # configure, build, install: + # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + options.append('--with-apr-util=%s' % spec['apr-util'].prefix) + options.append('--with-zlib=%s' % spec['zlib'].prefix) + options.append('--with-sqlite=%s' % spec['sqlite'].prefix) + #options.append('--with-swig=%s' % spec['swig'].prefix) + + configure(*options) + make() + make('install') + #make('swig-py') # python bindings + #make('install-swig-py') + #make('swig-pl') # perl bindings + #make('install-swig-pl') diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 8d46c4fe46..de6055e965 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -36,11 +36,14 @@ class Swig(Package): homepage = "http://www.swig.org" url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" - version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') + version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') depends_on('pcre') def install(self, spec, prefix): configure("--prefix=%s" % prefix) + make() make("install") -- cgit v1.2.3-60-g2f50 From 6eb97a30a36f0a0f072826d473a641dd143345ed Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 14:24:27 +0100 Subject: arpack: fix for +mpi variant --- var/spack/repos/builtin/packages/arpack-ng/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 614071cf53..dd86b17a53 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -50,7 +50,10 @@ class ArpackNg(Package): options = ['--prefix=%s' % prefix] if '+mpi' in spec: - options.append('--enable-mpi') + options.extend([ + '--enable-mpi', + 'F77=mpif77' #FIXME: avoid hardcoding MPI wrapper names + ]) if '~shared' in spec: options.append('--enable-shared=no') -- cgit v1.2.3-60-g2f50 From d25026b74936f9988cdaf701258c937b3965c106 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 16:26:16 +0100 Subject: add OCE package --- var/spack/repos/builtin/packages/oce/package.py | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 var/spack/repos/builtin/packages/oce/package.py diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py new file mode 100644 index 0000000000..06acb96736 --- /dev/null +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -0,0 +1,47 @@ +from spack import * +import platform + +class Oce(Package): + """ + Open CASCADE Community Edition: + patches/improvements/experiments contributed by users over the official Open CASCADE library. + """ + homepage = "https://github.com/tpaviot/oce" + url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz" + + version('0.17.1', '36c67b87093c675698b483454258af91') + version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d') + version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3') + version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca') + version('0.15' , '7ec541a1c350ca8a684f74980e48801c') + + depends_on('cmake@2.8:') + + def install(self, spec, prefix): + options = [] + options.extend(std_cmake_args) + options.extend([ + '-DOCE_INSTALL_PREFIX=%s' % prefix, + '-DOCE_BUILD_SHARED_LIB:BOOL=ON', + '-DOCE_BUILD_TYPE:STRING=Release', + '-DOCE_DATAEXCHANGE:BOOL=ON', + '-DOCE_DISABLE_X11:BOOL=ON', + '-DOCE_DRAW:BOOL=OFF', + '-DOCE_MODEL:BOOL=ON', + '-DOCE_MULTITHREAD_LIBRARY:STRING=NONE', # FIXME: add tbb + '-DOCE_OCAF:BOOL=ON', + '-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF', + '-DOCE_VISUALISATION:BOOL=OFF', + '-DOCE_WITH_FREEIMAGE:BOOL=OFF', + '-DOCE_WITH_GL2PS:BOOL=OFF', + '-DOCE_WITH_OPENCL:BOOL=OFF' + ]) + + if platform.system() == 'Darwin': + options.extend([ + '-DOCE_OSX_USE_COCOA:BOOL=ON', + ]) + + cmake('.', *options) + + make("install/strip") -- cgit v1.2.3-60-g2f50 From 1f8d79b69ab005a6a372ff34806525148c0ed854 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 22 Mar 2016 09:33:49 -0600 Subject: + Provide a ~perl variant to support building on systems w/o the perl-devel package installed. --- var/spack/repos/builtin/packages/graphviz/package.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 2a2102bfcb..84bd696af2 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -8,7 +8,6 @@ class Graphviz(Package): version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') variant('perl', default=True, description='Disable if you have problems with the optional script language bindings') - variant('shared', default=True, description='Building static is required on AIX') parallel = False @@ -20,8 +19,6 @@ class Graphviz(Package): options = ['--prefix=%s' % prefix] if '~perl' in spec: options.append('--disable-perl') - if '~shared' in spec: - options.append('--enable-shared=no') configure(*options) make() -- cgit v1.2.3-60-g2f50 From 7618dc504cb58e115a0a95b130bcfc485cd8341d Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 22 Mar 2016 19:17:39 +0100 Subject: temporary fix Hypre for OSX by building static lib by default --- var/spack/repos/builtin/packages/hypre/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 242ee100d7..8d93d48d1f 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -1,5 +1,5 @@ from spack import * -import os +import os, sys class Hypre(Package): """Hypre is a library of high performance preconditioners that @@ -12,7 +12,8 @@ class Hypre(Package): version('2.10.1', 'dc048c4cabb3cd549af72591474ad674') version('2.10.0b', '768be38793a35bb5d055905b271f5b8e') - variant('shared', default=True, description="Build shared library version (disables static library)") + # hypre does not know how to build shared libraries on Darwin + variant('shared', default=sys.platform!='darwin', description="Build shared library version (disables static library)") depends_on("mpi") depends_on("blas") -- cgit v1.2.3-60-g2f50 From e56f5c4d6b4626a428b3c209f00eff59cd37b22f Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Tue, 22 Mar 2016 16:59:40 +0100 Subject: add Intel TBB package --- var/spack/repos/builtin/packages/tbb/package.py | 79 +++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 var/spack/repos/builtin/packages/tbb/package.py diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py new file mode 100644 index 0000000000..56ffe4c27c --- /dev/null +++ b/var/spack/repos/builtin/packages/tbb/package.py @@ -0,0 +1,79 @@ +from spack import * +import os +import glob + +class Tbb(Package): + """Widely used C++ template library for task parallelism. + Intel Threading Building Blocks (Intel TBB) lets you easily write parallel + C++ programs that take full advantage of multicore performance, that are + portable and composable, and that have future-proof scalability. + """ + homepage = "http://www.threadingbuildingblocks.org/" + + # Only version-specific URL's work for TBB + version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz') + + def coerce_to_spack(self,tbb_build_subdir): + for compiler in ["icc","gcc","clang"]: + fs = glob.glob(join_path(tbb_build_subdir,"*.%s.inc" % compiler )) + for f in fs: + lines = open(f).readlines() + of = open(f,"w") + for l in lines: + if l.strip().startswith("CPLUS ="): + of.write("# coerced to spack\n") + of.write("CPLUS = $(CXX)\n") + elif l.strip().startswith("CPLUS ="): + of.write("# coerced to spack\n") + of.write("CONLY = $(CC)\n") + else: + of.write(l); + + def install(self, spec, prefix): + # + # we need to follow TBB's compiler selection logic to get the proper build + link flags + # but we still need to use spack's compiler wrappers + # to accomplish this, we do two things: + # + # * Look at the spack spec to determine which compiler we should pass to tbb's Makefile + # + # * patch tbb's build system to use the compiler wrappers (CC, CXX) for + # icc, gcc, clang + # (see coerce_to_spack()) + # + self.coerce_to_spack("build") + + if spec.satisfies('%clang'): + tbb_compiler = "clang" + elif spec.satisfies('%intel'): + tbb_compiler = "icc" + else: + tbb_compiler = "gcc" + + + mkdirp(prefix) + mkdirp(prefix.lib) + + # + # tbb does not have a configure script or make install target + # we simply call make, and try to put the pieces together + # + make("compiler=%s" %(tbb_compiler)) + + # install headers to {prefix}/include + install_tree('include',prefix.include) + + # install libs to {prefix}/lib + tbb_lib_names = ["libtbb", + "libtbbmalloc", + "libtbbmalloc_proxy"] + + for lib_name in tbb_lib_names: + # install release libs + fs = glob.glob(join_path("build","*release",lib_name + ".*")) + for f in fs: + install(f, prefix.lib) + # install debug libs if they exist + fs = glob.glob(join_path("build","*debug",lib_name + "_debug.*")) + for f in fs: + install(f, prefix.lib) -- cgit v1.2.3-60-g2f50 From 1eb7b8cf4624910121ac66996f17a212ed2cfc91 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 22 Mar 2016 12:31:27 -0600 Subject: + Add a validate function that refuses to build numdiff if arch is darwin-x86_64. --- var/spack/repos/builtin/packages/numdiff/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index a51f6206cf..91286127fb 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -34,7 +34,22 @@ class Numdiff(Package): version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + def validate(self, spec): + """ + Checks if we are attempting to build on an incompatible + architecture. + + Ref. https://github.com/davydden/homebrew-dealiisuite/blob/master/numdiff.rb#L13-L15. + + :param spec: spec of the package + :raises RuntimeError: in case of inconsistencies. + """ + + if spec.satisfies("=darwin-x86_64"): + raise RuntimeError(msg) + def install(self, spec, prefix): + self.validate(spec) options = ['--prefix=%s' % prefix] configure(*options) make() -- cgit v1.2.3-60-g2f50 From 5f68e14d3bd90e4a71f6366a328dcc97fc6e8a92 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 19:41:31 +0100 Subject: add gettext package --- .../repos/builtin/packages/gettext/package.py | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gettext/package.py diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py new file mode 100644 index 0000000000..05712d7392 --- /dev/null +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -0,0 +1,30 @@ +from spack import * + +class Gettext(Package): + """GNU internationalization (i18n) and localization (l10n) library.""" + homepage = "https://www.gnu.org/software/gettext/" + url = "http://ftpmirror.gnu.org/gettext/gettext-0.19.7.tar.xz" + + version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5') + + def install(self, spec, prefix): + options = ['--disable-dependency-tracking', + '--disable-silent-rules', + '--disable-debug', + '--prefix=%s' % prefix, + '--with-included-gettext', + '--with-included-glib', + '--with-included-libcroco', + '--with-included-libunistring', + '--with-emacs', + '--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share, + '--disable-java', + '--disable-csharp', + '--without-git', # Don't use VCS systems to create these archives + '--without-cvs', + '--without-xz'] + + configure(*options) + + make() + make("install") -- cgit v1.2.3-60-g2f50 From fd1784369a20650c3fc6f84d57ed4e6be59afc44 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 19:50:15 +0100 Subject: add muparser package --- var/spack/repos/builtin/packages/muparser/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/muparser/package.py diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py new file mode 100644 index 0000000000..a1a9ff90e5 --- /dev/null +++ b/var/spack/repos/builtin/packages/muparser/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Muparser(Package): + """C++ math expression parser library.""" + homepage = "http://muparser.beltoforion.de/" + url = "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz" + + version('2.2.5', '02dae671aa5ad955fdcbcd3fee313fb7') + + def install(self, spec, prefix): + options = ['--disable-debug', + '--disable-dependency-tracking', + '--prefix=%s' % prefix] + + configure(*options) + + make() + make("install") -- cgit v1.2.3-60-g2f50 From d05e4581c9d249c0736d8d58b394860ca05f8402 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 22 Mar 2016 12:31:26 -0700 Subject: Added the '+silex' variant to the Silo package. Added a number of different versions to the Silo package. --- var/spack/repos/builtin/packages/silo/package.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index d1aed78e0e..b7894e4d2b 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -5,24 +5,35 @@ class Silo(Package): data to binary, disk files.""" homepage = "http://wci.llnl.gov/simulation/computer-codes/silo" - url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.8/silo-4.8.tar.gz" + base_url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo" + version('4.10.2', '9ceac777a2f2469ac8cef40f4fab49c8') + version('4.9', 'a83eda4f06761a86726e918fc55e782a') version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9') variant('fortran', default=True, description='Enable Fortran support') + variant('silex', default=False, description='Builds Silex, a GUI for viewing Silo files') - depends_on("hdf5") + depends_on('hdf5') + depends_on('qt', when='+silex') 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', ] + if '+silex' in spec: + config_args.append('--with-Qt-dir=%s' % spec['qt'].prefix) + configure( - "--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), + '--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), *config_args) make() - make("install") + make('install') + + def url_for_version(self, version): + return '%s/silo-%s/silo-%s.tar.gz' % (Silo.base_url, version, version) -- cgit v1.2.3-60-g2f50 From 1728a0c3e60d55d1181f14ef5a677b1652a0680b Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 22 Mar 2016 12:33:11 -0700 Subject: Updated the 'crypto++' package to use an improved URL formation scheme (inspired by changes made to the 'Silo' package). --- var/spack/repos/builtin/packages/cryptopp/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index 1693c4b160..743a3ac70f 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -8,8 +8,8 @@ class Cryptopp(Package): public-key encryption (RSA, DSA), and a few obsolete/historical encryption algorithms (MD5, Panama).""" - homepage = "http://www.cryptopp.com/" - url = "http://www.cryptopp.com/cryptopp563.zip" + homepage = "http://www.cryptopp.com" + base_url = "http://www.cryptopp.com" version('5.6.3', '3c5b70e2ec98b7a24988734446242d07') version('5.6.2', '7ed022585698df48e65ce9218f6c6a67') @@ -28,4 +28,4 @@ class Cryptopp(Package): version_tuple = tuple(v for v in iter(version)) version_string = reduce(lambda vs, nv: vs + str(nv), version_tuple, "") - return "%scryptopp%s.zip" % (Cryptopp.homepage, version_string) + return '%s/cryptopp%s.zip' % (Cryptopp.base_url, version_string) -- cgit v1.2.3-60-g2f50 From 27f337aa11104a6e625db6e40f8d9414954123ee Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 11:44:38 +0100 Subject: petsc: set PETSC_DIR in dependent_env --- var/spack/repos/builtin/packages/petsc/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 7239baaf7f..3dd117eed1 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -100,3 +100,7 @@ class Petsc(Package): # PETSc has its own way of doing parallel make. make('MAKE_NP=%s' % make_jobs, parallel=False) make("install") + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + # set up PETSC_DIR for everyone using PETSc package + spack_env.set('PETSC_DIR', self.prefix) -- cgit v1.2.3-60-g2f50 From 24264eb00e4f4e3661ea1a28e9cbe3a97cd69580 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 11:45:18 +0100 Subject: add slepc package --- var/spack/repos/builtin/packages/slepc/package.py | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 var/spack/repos/builtin/packages/slepc/package.py diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py new file mode 100644 index 0000000000..8b5f24394f --- /dev/null +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -0,0 +1,49 @@ +import os +from spack import * + + +class Slepc(Package): + """ + Scalable Library for Eigenvalue Computations. + """ + + homepage = "http://www.grycap.upv.es/slepc" + url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz" + + version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df') + + variant('arpack', default=False, description='Enables Arpack wrappers') + + depends_on('petsc') + depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi') + depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi') + + def install(self, spec, prefix): + # set SLEPC_DIR for installation + os.environ['SLEPC_DIR'] = self.stage.source_path + + options = [] + + if '+arpack' in spec: + options.extend([ + '--with-arpack-dir=%s' % spec['arpack-ng'].prefix.lib, + ]) + if 'arpack-ng~mpi' in spec: + options.extend([ + '--with-arpack-flags=-larpack' + ]) + else: + options.extend([ + '--with-arpack-flags=-lparpack,-larpack' + ]) + + configure('--prefix=%s' % prefix, *options) + + make('MAKE_NP=%s' % make_jobs, parallel=False) + #FIXME: + # make('test') + make('install') + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + # set up SLEPC_DIR for everyone using SLEPc package + spack_env.set('SLEPC_DIR', self.prefix) -- cgit v1.2.3-60-g2f50 From 6c8d51f403213cf3a49373d4dca03fac565a73b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 22:58:14 +0100 Subject: add p4est package --- var/spack/repos/builtin/packages/p4est/package.py | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 var/spack/repos/builtin/packages/p4est/package.py diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py new file mode 100644 index 0000000000..1e2969fe64 --- /dev/null +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -0,0 +1,34 @@ +from spack import * + +class P4est(Package): + """Dynamic management of a collection (a forest) of adaptive octrees in parallel""" + homepage = "http://www.p4est.org" + url = "http://p4est.github.io/release/p4est-1.1.tar.gz" + + version('1.1', '37ba7f4410958cfb38a2140339dbf64f') + + # disable by default to make it work on frontend of clusters + variant('tests', default=False, description='Run small tests') + + depends_on('mpi') + + def install(self, spec, prefix): + options = ['--enable-mpi', + '--enable-shared', + '--disable-vtk-binary', + '--without-blas', + 'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL', + 'CFLAGS=-O2', + 'CC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # TODO: use ENV variables or MPI class wrappers + 'CXX=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + 'FC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + 'F77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), + ] + + configure('--prefix=%s' % prefix, *options) + + make() + if '+tests' in self.spec: + make("check") + + make("install") -- cgit v1.2.3-60-g2f50 From 0ee993569f8f47f5ca94873bc779d98639e9a1b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:04:59 +0100 Subject: add deal.ii package --- var/spack/repos/builtin/packages/dealii/package.py | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dealii/package.py diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py new file mode 100644 index 0000000000..cddf5cd98b --- /dev/null +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -0,0 +1,67 @@ +from spack import * + +class Dealii(Package): + """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" + homepage = "https://www.dealii.org" + url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz" + + version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') + + depends_on ("cmake") + depends_on ("blas") + depends_on ("lapack") + depends_on ("mpi") + + #depends_on ("arpack") + depends_on ("boost") + #depends_on ("doxygen") + depends_on ("hdf5+mpi") + depends_on ("metis") + #depends_on "muparser" + depends_on ("netcdf") + #depends_on ("numdiff") + #depends_on ("oce") + depends_on ("p4est") + depends_on ("parmetis") + depends_on ("petsc") + #depends_on ("slepc") + depends_on ("SuiteSparse") + #depends_on "tbb" + depends_on ("trilinos") + + def install(self, spec, prefix): + options = [] + options.extend(std_cmake_args) + + # CMAKE_BUILD_TYPE should be DebugRelease | Debug | Release + for word in options[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + options.remove(word) + + options.extend([ + '-DCMAKE_BUILD_TYPE=DebugRelease', + '-DDEAL_II_WITH_THREADS:BOOL=ON' + '-DDEAL_II_WITH_MPI:BOOL=ON', + '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), + '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + #'-DARPACK_DIR=%s' % , + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DHDF5_DIR=%s' % spec['hdf5'].prefix, + '-DMETIS_DIR=%s' % spec['metis'].prefix, + #'-DMUPARSER_DIR=%s ' + '-DNETCDF_DIR=%s' % spec['netcdf'].prefix, + #'-DOPENCASCADE_DIR= + '-DP4EST_DIR=%s' % spec['p4est'].prefix, + '-DPETSC_DIR=%s' % spec['petsc'].prefix, + #'-DSLEPC_DIR= + '-DUMFPACK_DIR=%s' % spec['SuiteSparse'].prefix, + #'-DTBB_DIR=%s' + '-DTRILINOS_DIR=%s' % spec['trilinos'].prefix + ]) + + cmake('.', *options) + + make() + make("test") + make("install") -- cgit v1.2.3-60-g2f50 From 474db2085e223b8226a6ae799232bb2fede3efde Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 22 Mar 2016 15:55:54 -0700 Subject: Simplified the 'url_for_version' function for the 'Crypto++' package. --- var/spack/repos/builtin/packages/cryptopp/package.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index 743a3ac70f..bc83cb2b65 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -25,7 +25,5 @@ class Cryptopp(Package): install('libcryptopp.a', prefix.lib) def url_for_version(self, version): - version_tuple = tuple(v for v in iter(version)) - version_string = reduce(lambda vs, nv: vs + str(nv), version_tuple, "") - + version_string = str(version).replace('.', '') return '%s/cryptopp%s.zip' % (Cryptopp.base_url, version_string) -- cgit v1.2.3-60-g2f50 From 5b3c96a9bb0ba6501512c93dcdb26510e796314e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:07:45 +0100 Subject: fix superlu-dist lib installation --- var/spack/repos/builtin/packages/superlu-dist/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index c4c76909b3..9a94de8ba5 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -54,6 +54,7 @@ class SuperluDist(Package): # need to install by hand headers_location = join_path(self.prefix.include,'superlu_dist') mkdirp(headers_location) + mkdirp(prefix.lib) # FIXME: fetch all headers in the folder automatically for header in ['Cnames.h','cublas_utils.h','dcomplex.h','html_mainpage.h','machines.h','old_colamd.h','psymbfact.h','superlu_ddefs.h','superlu_defs.h','superlu_enum_consts.h','superlu_zdefs.h','supermatrix.h','util_dist.h']: superludist_header = join_path(self.stage.source_path, 'SRC/',header) -- cgit v1.2.3-60-g2f50 From c4134ee71e43a6a2a38822e25cc72ca73efdcfea Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 23 Mar 2016 00:36:32 -0700 Subject: Fix #608: broken numpy build. - Failed to catch all instances of modify_module when it was renamed to setup_dependent_package. - Refactored remaining modify_module calls. - Also modified Python's setup_dependent_package slightly: only creates empty site-packages directory for Python extensions now, not for all dependents. --- lib/spack/spack/modules.py | 4 ++-- lib/spack/spack/preferred_packages.py | 4 +++- var/spack/repos/builtin/packages/python/package.py | 11 ++++++----- var/spack/repos/builtin/packages/ruby/package.py | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 05c93cd3e6..8ed98e5d38 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -160,8 +160,8 @@ class EnvModule(object): # package-specific modifications for extendee in self.pkg.extendees: extendee_spec = self.spec[extendee] - extendee_spec.package.modify_module( - self.pkg.module, extendee_spec, self.spec) + extendee_spec.package.setup_dependent_package( + self.pkg.module, self.spec) # Package-specific environment modifications spack_env = EnvironmentModifications() diff --git a/lib/spack/spack/preferred_packages.py b/lib/spack/spack/preferred_packages.py index 4d8526c75f..f0a5382dc9 100644 --- a/lib/spack/spack/preferred_packages.py +++ b/lib/spack/spack/preferred_packages.py @@ -150,7 +150,9 @@ class PreferredPackages(object): def version_compare(self, pkgname, a, b): """Return less-than-0, 0, or greater than 0 if version a of pkgname is respecively less-than, equal-to, or greater-than version b of pkgname. - One version is less-than another if it is preferred over the other.""" + Versions marked 'preferred=True' in package.py take precedence over any + versions not marked preferred. + """ return self._spec_compare(pkgname, 'version', a, b, True, None) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 4f55bc803e..6d9030805b 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -108,7 +108,7 @@ class Python(Package): run_env.set('PYTHONPATH', pythonpath) - def modify_module(self, module, spec, ext_spec): + def setup_dependent_package(self, module, ext_spec): """ Called before python modules' install() methods. @@ -118,17 +118,18 @@ class Python(Package): """ # Python extension builds can have a global python executable function if self.version >= Version("3.0.0") and self.version < Version("4.0.0"): - module.python = Executable(join_path(spec.prefix.bin, 'python3')) + module.python = Executable(join_path(self.spec.prefix.bin, 'python3')) else: - module.python = Executable(join_path(spec.prefix.bin, 'python')) + module.python = Executable(join_path(self.spec.prefix.bin, 'python')) # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir) module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir) - # Make the site packages directory if it does not exist already. - mkdirp(module.site_packages_dir) + # Make the site packages directory for extensions, if it does not exist already. + if ext_spec.package.is_extension: + mkdirp(module.site_packages_dir) # ======================================================================== # Handle specifics of activating and deactivating python modules. diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index 7ff1898ce9..e13677e4d2 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -30,7 +30,7 @@ class Ruby(Package): # The actual installation path for this gem spack_env.set('GEM_HOME', extension_spec.prefix) - def modify_module(self, module, spec, ext_spec): + def setup_dependent_package(self, module, ext_spec): """Called before ruby modules' install() methods. Sets GEM_HOME and GEM_PATH to values appropriate for the package being built. @@ -39,5 +39,5 @@ class Ruby(Package): gem('install', '.gem') """ # Ruby extension builds have global ruby and gem functions - module.ruby = Executable(join_path(spec.prefix.bin, 'ruby')) - module.gem = Executable(join_path(spec.prefix.bin, 'gem')) + module.ruby = Executable(join_path(self.spec.prefix.bin, 'ruby')) + module.gem = Executable(join_path(self.spec.prefix.bin, 'gem')) -- cgit v1.2.3-60-g2f50 From 01918a6f4891ab985b8619daaadc1bf484e4db17 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 05:26:51 +0100 Subject: fix MUMPS build on OSX (set parallel=False) --- var/spack/repos/builtin/packages/mumps/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 5c120c37df..5a254dfd00 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -135,7 +135,8 @@ class Mumps(Package): self.write_makefile_inc() - make(*make_libs) + # Build fails in parallel, at least on OS-X + make(*make_libs, parallel=False) install_tree('lib', prefix.lib) install_tree('include', prefix.include) -- cgit v1.2.3-60-g2f50 From 38350ae33d29e108803cebdf13b90b6898947328 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 23 Mar 2016 01:32:54 -0700 Subject: resurrect preferred=True option for packages lost in merge of externals support. - Pyton 2.7.11 is preferred again. --- lib/spack/spack/concretize.py | 4 ++++ lib/spack/spack/preferred_packages.py | 4 +--- lib/spack/spack/test/concretize.py | 9 +++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 2e576743ec..ed9bf79868 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -159,6 +159,10 @@ class DefaultConcretizer(object): if any(v.satisfies(sv) for sv in spec.versions)], cmp=cmp_versions) + def prefer_key(v): + return pkg.versions.get(Version(v)).get('preferred', False) + valid_versions.sort(key=prefer_key, reverse=True) + if valid_versions: spec.versions = ver([valid_versions[0]]) else: diff --git a/lib/spack/spack/preferred_packages.py b/lib/spack/spack/preferred_packages.py index f0a5382dc9..4d8526c75f 100644 --- a/lib/spack/spack/preferred_packages.py +++ b/lib/spack/spack/preferred_packages.py @@ -150,9 +150,7 @@ class PreferredPackages(object): def version_compare(self, pkgname, a, b): """Return less-than-0, 0, or greater than 0 if version a of pkgname is respecively less-than, equal-to, or greater-than version b of pkgname. - Versions marked 'preferred=True' in package.py take precedence over any - versions not marked preferred. - """ + One version is less-than another if it is preferred over the other.""" return self._spec_compare(pkgname, 'version', a, b, True, None) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 08cce09674..9cd8c969ae 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -24,6 +24,7 @@ ############################################################################## import spack from spack.spec import Spec, CompilerSpec +from spack.version import ver from spack.concretize import find_spec from spack.test.mock_packages_test import * @@ -77,6 +78,14 @@ class ConcretizeTest(MockPackagesTest): self.check_concretize('mpich') + def test_concretize_preferred_version(self): + spec = self.check_concretize('python') + self.assertEqual(spec.versions, ver('2.7.11')) + + spec = self.check_concretize('python@3.5.1') + self.assertEqual(spec.versions, ver('3.5.1')) + + def test_concretize_with_virtual(self): self.check_concretize('mpileaks ^mpi') self.check_concretize('mpileaks ^mpi@:1.1') -- cgit v1.2.3-60-g2f50 From cc582dd4b435ba06dc140b1ca96b688871e36abb Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 23 Mar 2016 02:02:49 -0700 Subject: Add mock python package. --- .../repos/builtin.mock/packages/python/package.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin.mock/packages/python/package.py diff --git a/var/spack/repos/builtin.mock/packages/python/package.py b/var/spack/repos/builtin.mock/packages/python/package.py new file mode 100644 index 0000000000..c5fed52f53 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/python/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Python(Package): + """Dummy Python package to demonstrate preferred versions.""" + homepage = "http://www.python.org" + url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz" + + extendable = True + + version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe') + version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36') + version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True) + version('2.7.10', 'd7547558fd673bd9d38e2108c6b42521') + version('2.7.9', '5eebcaa0030dc4061156d3429657fb83') + version('2.7.8', 'd4bca0159acb0b44a781292b5231936f') + + def install(self, spec, prefix): + pass + -- cgit v1.2.3-60-g2f50 From 0fbdb3f65d234d6ed8f77d3732c134962ad47b35 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 15:43:16 +0100 Subject: modules : added configuration file with disable keyword --- lib/spack/spack/config.py | 28 +++++++++++++++++++++++++--- lib/spack/spack/modules.py | 12 ++++++++++-- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6afd69b3ac..6ef79c70b1 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -237,7 +237,29 @@ section_schemas = { 'type' : 'object', 'default' : {}, } - },},},},},} + },},},},},}, + 'modules': { + '$schema': 'http://json-schema.org/schema#', + 'title': 'Spack module file configuration file schema', + 'type': 'object', + 'additionalProperties': False, + 'patternProperties': { + r'modules:?': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'disable': { + 'type': 'array', + 'default': [], + 'items': { + 'type': 'string' + } + } + } + }, + }, + }, } """OrderedDict of config scopes keyed by name. @@ -405,11 +427,11 @@ def _read_config_file(filename, schema): validate_section(data, schema) return data - except MarkedYAMLError, e: + except MarkedYAMLError as e: raise ConfigFileError( "Error parsing yaml%s: %s" % (str(e.context_mark), e.problem)) - except IOError, e: + except IOError as e: raise ConfigFileError( "Error reading configuration file %s: %s" % (filename, str(e))) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 8ed98e5d38..639f1101b8 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -48,6 +48,7 @@ import textwrap import llnl.util.tty as tty import spack +import spack.config from llnl.util.filesystem import join_path, mkdirp from spack.environment import * @@ -57,6 +58,13 @@ __all__ = ['EnvModule', 'Dotkit', 'TclModule'] module_types = {} +def read_configuration_file(): + f = spack.config.get_config('modules') + f.setdefault('disable', []) # Default : disable nothing + return f + +CONFIGURATION = read_configuration_file() + def print_help(): """For use by commands to tell user how to activate shell support.""" @@ -115,8 +123,8 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module': - module_types[cls.name] = cls + if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']: + module_types[cls.name] = cls def __init__(self, spec=None): self.spec = spec -- cgit v1.2.3-60-g2f50 From d93f2b335d5a5198b943cc6293a1d24d614c979b Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 16:04:36 +0100 Subject: modules : fixed annoying indent --- lib/spack/spack/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 639f1101b8..d354c8bb71 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -124,7 +124,7 @@ class EnvModule(object): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']: - module_types[cls.name] = cls + module_types[cls.name] = cls def __init__(self, spec=None): self.spec = spec -- cgit v1.2.3-60-g2f50 From 34a8f0c96bc50870f20f094d95b403b2bb19487d Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 17:01:52 +0100 Subject: espresso : fixes #454 --- var/spack/repos/builtin/packages/espresso/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index a2bf58f585..59f362ab46 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -32,6 +32,10 @@ class Espresso(Package): if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec): raise RuntimeError(error.format(variant='elpa')) + def setup_environment(self, spack_env, run_env): + # Espresso copies every executable in prefix without creating sub-folders + run_env.prepend_path('PATH', self.prefix) + def install(self, spec, prefix): self.check_variants(spec) -- cgit v1.2.3-60-g2f50 From 4e5dfc8b18ed30e261fe6b6dd014c8991937934d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 19:40:16 +0100 Subject: fix missing (depricated) _dggsvd_ and _sggsvd_ in Openblas 0.2.16 --- var/spack/repos/builtin/packages/openblas/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 781a1e2ec8..1d10f217c4 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -6,6 +6,7 @@ class Openblas(Package): homepage = "http://www.openblas.net" url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1') version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') @@ -14,7 +15,14 @@ class Openblas(Package): provides('lapack') def install(self, spec, prefix): - make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77') + extra=[] + if spec.satisfies('@0.2.16'): + extra.extend([ + 'BUILD_LAPACK_DEPRECATED=1' # fix missing _dggsvd_ and _sggsvd_ + ]) + + make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77',*extra) + make("tests") make('install', "PREFIX='%s'" % prefix) lib_dsuffix = 'dylib' if sys.platform == 'darwin' else 'so' -- cgit v1.2.3-60-g2f50 From f095e619b985a9271ff96cd469086d4654edf489 Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 24 Mar 2016 09:31:28 +0100 Subject: module files configuration : enable/disable logic is now positive --- lib/spack/spack/config.py | 2 +- lib/spack/spack/modules.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6ef79c70b1..14e5aaf4fb 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -249,7 +249,7 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'properties': { - 'disable': { + 'enable': { 'type': 'array', 'default': [], 'items': { diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d354c8bb71..6c32937c3c 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -57,13 +57,8 @@ __all__ = ['EnvModule', 'Dotkit', 'TclModule'] # Registry of all types of modules. Entries created by EnvModule's metaclass module_types = {} +CONFIGURATION = spack.config.get_config('modules') -def read_configuration_file(): - f = spack.config.get_config('modules') - f.setdefault('disable', []) # Default : disable nothing - return f - -CONFIGURATION = read_configuration_file() def print_help(): """For use by commands to tell user how to activate shell support.""" @@ -123,7 +118,7 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']: + if cls.name != 'env_module' and cls.name in CONFIGURATION['enable']: module_types[cls.name] = cls def __init__(self, spec=None): -- cgit v1.2.3-60-g2f50 From e4adc675e58222f3082f167e709e3819beafd474 Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 24 Mar 2016 10:04:02 +0100 Subject: module files configuration : added default configuration --- etc/spack/modules.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 etc/spack/modules.yaml diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml new file mode 100644 index 0000000000..aa2a2c3fe2 --- /dev/null +++ b/etc/spack/modules.yaml @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------- +# This is the default spack module files generation configuration. +# +# Changes to this file will affect all users of this spack install, +# although users can override these settings in their ~/.spack/modules.yaml. +# ------------------------------------------------------------------------- +modules: + enable: ['tcl', 'dotkit'] -- cgit v1.2.3-60-g2f50 From 9b8b17b6f1ec22ce4ac2115e5f7687beba21dd19 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 10:36:02 +0100 Subject: fix parmetis on Ubuntu with GNU compilers by linking to lm --- var/spack/repos/builtin/packages/parmetis/link-to-lm.patch | 14 ++++++++++++++ var/spack/repos/builtin/packages/parmetis/package.py | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/parmetis/link-to-lm.patch diff --git a/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch b/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch new file mode 100644 index 0000000000..faa809231e --- /dev/null +++ b/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch @@ -0,0 +1,14 @@ +diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt +index 9cfc8a7..dfc0125 100644 +--- a/libparmetis/CMakeLists.txt ++++ b/libparmetis/CMakeLists.txt +@@ -5,7 +5,7 @@ file(GLOB parmetis_sources *.c) + # Create libparmetis + add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources}) + # Link with metis and MPI libraries. +-target_link_libraries(parmetis metis ${MPI_LIBRARIES}) ++target_link_libraries(parmetis metis ${MPI_LIBRARIES} "-lm") + set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}") + + install(TARGETS parmetis + diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index c691cf4191..bc71fb7299 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -52,6 +52,8 @@ class Parmetis(Package): # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') + patch('link-to-lm.patch') + depends_on('gdb', when='+gdb') def install(self, spec, prefix): -- cgit v1.2.3-60-g2f50 From 758a9c9096bd6c306f2dba0e40b46544dcec1992 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 11:18:11 +0100 Subject: python extensions : create PYTHONPATH in module files --- lib/spack/spack/modules.py | 10 +++++----- var/spack/repos/builtin/packages/python/package.py | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 6c32937c3c..d45fdde703 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -161,13 +161,13 @@ class EnvModule(object): # Let the extendee modify their extensions before asking for # package-specific modifications - for extendee in self.pkg.extendees: - extendee_spec = self.spec[extendee] - extendee_spec.package.setup_dependent_package( - self.pkg.module, self.spec) + spack_env = EnvironmentModifications() + for item in self.pkg.extendees: + package = self.spec[item].package + package.setup_dependent_package(self.pkg.module, self.spec) + package.setup_dependent_environment(spack_env, env, self.spec) # Package-specific environment modifications - spack_env = EnvironmentModifications() self.spec.package.setup_environment(spack_env, env) # TODO : implement site-specific modifications and filters diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 6d9030805b..f5237c3b57 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -105,7 +105,10 @@ class Python(Package): pythonpath = ':'.join(python_paths) spack_env.set('PYTHONPATH', pythonpath) - run_env.set('PYTHONPATH', pythonpath) + + # For run time environment set only the path for extension_spec and prepend it to PYTHONPATH + if extension_spec.package.extends(self.spec): + run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir)) def setup_dependent_package(self, module, ext_spec): -- cgit v1.2.3-60-g2f50 From 8643e2191357dd6f53bfafdfd51f43b770e2137c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 24 Mar 2016 12:34:58 -0500 Subject: Simplified NumPy dependencies --- .../repos/builtin/packages/py-numpy/package.py | 37 ++++++++++++++++------ .../repos/builtin/packages/py-scipy/package.py | 5 +-- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 0354811186..a08e612df6 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -1,24 +1,43 @@ from spack import * class PyNumpy(Package): - """array processing for numbers, strings, records, and objects.""" - homepage = "https://pypi.python.org/pypi/numpy" + """NumPy is the fundamental package for scientific computing with Python. + It contains among other things: a powerful N-dimensional array object, + sophisticated (broadcasting) functions, tools for integrating C/C++ and + Fortran code, and useful linear algebra, Fourier transform, and random + number capabilities""" + homepage = "http://www.numpy.org/" url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" - version('1.9.1', '78842b73560ec378142665e712ae4ad9') - version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') + version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad') + version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') + version('1.9.1', '78842b73560ec378142665e712ae4ad9') - variant('blas', default=True) + + variant('blas', default=True) + variant('lapack', default=True) extends('python') depends_on('py-nose') - depends_on('netlib-blas+fpic', when='+blas') - depends_on('netlib-lapack+shared', when='+blas') + depends_on('blas', when='+blas') + depends_on('lapack', when='+lapack') def install(self, spec, prefix): + libraries = [] + library_dirs = [] + if '+blas' in spec: + libraries.append('blas') + library_dirs.append(spec['blas'].prefix.lib) + if '+lapack' in spec: + libraries.append('lapack') + library_dirs.append(spec['lapack'].prefix.lib) + + if '+blas' in spec or '+lapack' in spec: with open('site.cfg', 'w') as f: f.write('[DEFAULT]\n') - f.write('libraries=lapack,blas\n') - f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) + f.write('libraries=%s\n' % ','.join(libraries)) + f.write('library_dirs=%s\n' % ':'.join(library_dirs)) + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 3a1124cc15..c2161c90c4 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -2,11 +2,12 @@ from spack import * class PyScipy(Package): """Scientific Library for Python.""" - homepage = "https://pypi.python.org/pypi/scipy" + homepage = "http://www.scipy.org/" url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" - version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') + version('0.17.0', '5ff2971e1ce90e762c59d2cd84837224') version('0.15.1', 'be56cd8e60591d6332aac792a5880110') + version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') extends('python') depends_on('py-nose') -- cgit v1.2.3-60-g2f50 From 254f65f2994de32da8681c24838beb32bbbc5fe1 Mon Sep 17 00:00:00 2001 From: Alfredo Gimenez Date: Thu, 24 Mar 2016 10:48:38 -0700 Subject: Remove incorrect sanity check for libelf --- var/spack/repos/builtin/packages/libelf/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py index 9f16708af5..29bc21b65c 100644 --- a/var/spack/repos/builtin/packages/libelf/package.py +++ b/var/spack/repos/builtin/packages/libelf/package.py @@ -38,8 +38,6 @@ class Libelf(Package): provides('elf') - sanity_check_is_file = 'include/libelf.h' - def install(self, spec, prefix): configure("--prefix=" + prefix, "--enable-shared", -- cgit v1.2.3-60-g2f50 From 9985816642bad10008f45583a7d715761a6ae03d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 24 Mar 2016 14:49:41 -0500 Subject: Fix spack info indentation --- lib/spack/spack/cmd/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index e7abe7f4a5..c93db55c63 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -52,7 +52,7 @@ def print_text_info(pkg): print "Safe versions: " if not pkg.versions: - print("None") + print(" None") else: pad = padder(pkg.versions, 4) for v in reversed(sorted(pkg.versions)): @@ -62,7 +62,7 @@ def print_text_info(pkg): print print "Variants:" if not pkg.variants: - print "None" + print " None" else: pad = padder(pkg.variants, 4) -- cgit v1.2.3-60-g2f50 From 7fb463abb9b912f9a5bcb6e810b733f0b8bc1672 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 20:23:13 +0100 Subject: install GKlib headers along with METIS --- .../packages/metis/install_gklib_defs_rename.patch | 22 ++++++++++++++++++++++ var/spack/repos/builtin/packages/metis/package.py | 13 +++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/metis/install_gklib_defs_rename.patch diff --git a/var/spack/repos/builtin/packages/metis/install_gklib_defs_rename.patch b/var/spack/repos/builtin/packages/metis/install_gklib_defs_rename.patch new file mode 100644 index 0000000000..b182b167b9 --- /dev/null +++ b/var/spack/repos/builtin/packages/metis/install_gklib_defs_rename.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Sean Farley +# Date 1332269671 18000 +# Tue Mar 20 13:54:31 2012 -0500 +# Node ID b95c0c2e1d8bf8e3273f7d45e856f0c0127d998e +# Parent 88049269953c67c3fdcc4309bf901508a875f0dc +cmake: add gklib headers to install into include + +diff -r 88049269953c -r b95c0c2e1d8b libmetis/CMakeLists.txt +Index: libmetis/CMakeLists.txt +=================================================================== +--- a/libmetis/CMakeLists.txt Tue Mar 20 13:54:29 2012 -0500 ++++ b/libmetis/CMakeLists.txt Tue Mar 20 13:54:31 2012 -0500 +@@ -12,6 +12,8 @@ endif() + if(METIS_INSTALL) + install(TARGETS metis + LIBRARY DESTINATION lib + RUNTIME DESTINATION lib + ARCHIVE DESTINATION lib) ++ install(FILES gklib_defs.h DESTINATION include) ++ install(FILES gklib_rename.h DESTINATION include) + endif() diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index bbfc4de7d1..68b9f6fd30 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 class Metis(Package): """ @@ -49,6 +49,8 @@ class Metis(Package): depends_on('gdb', when='+gdb') + patch('install_gklib_defs_rename.patch') + def install(self, spec, prefix): options = [] @@ -80,4 +82,11 @@ class Metis(Package): with working_dir(build_directory, create=True): cmake(source_directory, *options) make() - make("install") \ No newline at end of file + make("install") + + # install GKlib headers, which will be needed for ParMETIS + GKlib_dist = join_path(prefix.include,'GKlib') + mkdirp(GKlib_dist) + fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) + for f in fs: + install(f, GKlib_dist) -- cgit v1.2.3-60-g2f50 From 0d4d201b70c57359f041807df0a2f58b47be78d6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 21:22:58 +0100 Subject: patch parmetis to use external GKlib --- .../packages/parmetis/enable_external_metis.patch | 48 ++++++++++++++++++++-- .../repos/builtin/packages/parmetis/package.py | 2 +- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch b/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch index 514781b8b8..8b05ecc872 100644 --- a/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch +++ b/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch @@ -1,13 +1,55 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ca945dd..1bf94e9 100644 +index ca945dd..5995e42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -23,7 +23,7 @@ else() + set(ParMETIS_LIBRARY_TYPE STATIC) + endif() + +-include(${GKLIB_PATH}/GKlibSystem.cmake) ++include_directories(${GKLIB_PATH}) + + # List of paths that the compiler will search for header files. + # i.e., the -I equivalent @@ -33,7 +33,7 @@ include_directories(${GKLIB_PATH}) include_directories(${METIS_PATH}/include) - + # List of directories that cmake will look for CMakeLists.txt -add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) -+#add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) ++# add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) add_subdirectory(include) add_subdirectory(libparmetis) add_subdirectory(programs) +diff --git a/libparmetis/parmetislib.h b/libparmetis/parmetislib.h +index c1daeeb..07511f6 100644 +--- a/libparmetis/parmetislib.h ++++ b/libparmetis/parmetislib.h +@@ -20,13 +20,12 @@ + + #include + +-#include "../metis/libmetis/gklib_defs.h" ++#include + +-#include ++#include + + #include + #include + #include + #include + #include +- +diff --git a/programs/parmetisbin.h b/programs/parmetisbin.h +index e26cd2d..d156480 100644 +--- a/programs/parmetisbin.h ++++ b/programs/parmetisbin.h +@@ -19,7 +19,7 @@ + #include + #include + +-#include "../metis/libmetis/gklib_defs.h" ++#include + #include "../libparmetis/rename.h" + #include "../libparmetis/defs.h" + #include "../libparmetis/struct.h" diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index bc71fb7299..5c97a836f9 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -66,7 +66,7 @@ class Parmetis(Package): # FIXME : Once a contract is defined, MPI compilers should be retrieved indirectly via spec['mpi'] in case # FIXME : they use a non-standard name - options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=metis_source), # still need headers from METIS source, and they are not installed with METIS. shame... + options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=spec['metis'].prefix.include), '-DMETIS_PATH:PATH={metis_source}'.format(metis_source=spec['metis'].prefix), '-DCMAKE_C_COMPILER:STRING=mpicc', '-DCMAKE_CXX_COMPILER:STRING=mpicxx']) -- cgit v1.2.3-60-g2f50 From 03c8a91f6a647849f0251496f361da9574a98c22 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 22:33:10 +0100 Subject: parmetis: avoid hardcoding -lm; use same approach as in METIS --- .../packages/parmetis/enable_external_metis.patch | 20 ++++++++++++++++++-- .../repos/builtin/packages/parmetis/link-to-lm.patch | 14 -------------- var/spack/repos/builtin/packages/parmetis/package.py | 2 -- 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/parmetis/link-to-lm.patch diff --git a/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch b/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch index 8b05ecc872..e4f2729483 100644 --- a/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch +++ b/var/spack/repos/builtin/packages/parmetis/enable_external_metis.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ca945dd..5995e42 100644 +index ca945dd..aff8b5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ else() @@ -16,10 +16,26 @@ index ca945dd..5995e42 100644 # List of directories that cmake will look for CMakeLists.txt -add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) -+# add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) ++find_library(METIS_LIBRARY metis PATHS ${METIS_PATH}/lib) add_subdirectory(include) add_subdirectory(libparmetis) add_subdirectory(programs) +diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt +index 9cfc8a7..e0c4de7 100644 +--- a/libparmetis/CMakeLists.txt ++++ b/libparmetis/CMakeLists.txt +@@ -5,7 +5,10 @@ file(GLOB parmetis_sources *.c) + # Create libparmetis + add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources}) + # Link with metis and MPI libraries. +-target_link_libraries(parmetis metis ${MPI_LIBRARIES}) ++target_link_libraries(parmetis ${METIS_LIBRARY} ${MPI_LIBRARIES}) ++if(UNIX) ++ target_link_libraries(parmetis m) ++endif() + set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}") + + install(TARGETS parmetis diff --git a/libparmetis/parmetislib.h b/libparmetis/parmetislib.h index c1daeeb..07511f6 100644 --- a/libparmetis/parmetislib.h diff --git a/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch b/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch deleted file mode 100644 index faa809231e..0000000000 --- a/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt -index 9cfc8a7..dfc0125 100644 ---- a/libparmetis/CMakeLists.txt -+++ b/libparmetis/CMakeLists.txt -@@ -5,7 +5,7 @@ file(GLOB parmetis_sources *.c) - # Create libparmetis - add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources}) - # Link with metis and MPI libraries. --target_link_libraries(parmetis metis ${MPI_LIBRARIES}) -+target_link_libraries(parmetis metis ${MPI_LIBRARIES} "-lm") - set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}") - - install(TARGETS parmetis - diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 5c97a836f9..f5b8b6de91 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -52,8 +52,6 @@ class Parmetis(Package): # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') - patch('link-to-lm.patch') - depends_on('gdb', when='+gdb') def install(self, spec, prefix): -- cgit v1.2.3-60-g2f50 From fdd7e91ba078bea4f0fec1859124baaa8261fa2c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:49:56 +0100 Subject: add shared variant to mumps (needed for Trilinos) plus tests --- .../repos/builtin/packages/mumps/Makefile.inc | 5 +-- var/spack/repos/builtin/packages/mumps/package.py | 45 +++++++++++++++++++--- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/Makefile.inc b/var/spack/repos/builtin/packages/mumps/Makefile.inc index 2e6a041878..22d8f5518a 100644 --- a/var/spack/repos/builtin/packages/mumps/Makefile.inc +++ b/var/spack/repos/builtin/packages/mumps/Makefile.inc @@ -8,12 +8,9 @@ IORDERINGSF = $(ISCOTCH) IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) PLAT = -LIBEXT = .a -OUTC = -o +OUTC = -o OUTF = -o RM = /bin/rm -f -AR = ar vr -RANLIB = ranlib INCSEQ = -I$(topdir)/libseq LIBSEQ = -L$(topdir)/libseq -lmpiseq diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 5a254dfd00..2801d4194d 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,6 +1,5 @@ from spack import * -import os - +import os, sys class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -19,6 +18,7 @@ class Mumps(Package): variant('float', default=True, description='Activate the compilation of smumps') variant('complex', default=True, description='Activate the compilation of cmumps and/or zmumps') variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') + variant('shared', default=True, description='Build shared libraries') depends_on('scotch + esmumps', when='~ptscotch+scotch') @@ -105,6 +105,27 @@ class Mumps(Package): # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER makefile_conf.append("CDEFS = -DAdd_") + if '+shared' in self.spec: + if sys.platform == 'darwin': + # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) + makefile_conf.extend([ + 'LIBEXT=.dylib', + 'AR=%s -dynamiclib -undefined dynamic_lookup -o ' % os.environ['FC'], + 'RANLIB=echo' + ]) + else: + makefile_conf.extend([ + 'LIBEXT=.so', + 'AR=$(FL) -shared -o', + 'RANLIB=echo' + ]) + else: + makefile_conf.extend([ + 'LIBEXT = .a', + 'AR = ar vr', + 'RANLIB = ranlib' + ]) + makefile_inc_template = join_path(os.path.dirname(self.module.__file__), 'Makefile.inc') @@ -121,7 +142,7 @@ class Mumps(Package): def install(self, spec, prefix): make_libs = [] - # the coice to compile ?examples is to have kind of a sanity + # the choice to compile ?examples is to have kind of a sanity # check on the libraries generated. if '+float' in spec: make_libs.append('sexamples') @@ -135,10 +156,24 @@ class Mumps(Package): self.write_makefile_inc() - # Build fails in parallel, at least on OS-X + # Build fails in parallel make(*make_libs, parallel=False) install_tree('lib', prefix.lib) install_tree('include', prefix.include) if '~mpi' in spec: - install('libseq/libmpiseq.a', prefix.lib) + lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' + lib_suffix = lib_dsuffix if '+shared' in spec else '.a' + install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) + + # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI + # FIXME: use something like numdiff to compare blessed output with the current + with working_dir('examples'): + if '+float' in spec: + os.system('./ssimpletest < input_simpletest_real') + if '+complex' in spec: + os.system('./csimpletest < input_simpletest_real') + if '+double' in spec: + os.system('./dsimpletest < input_simpletest_real') + if '+complex' in spec: + os.system('./zsimpletest < input_simpletest_cmplx') -- cgit v1.2.3-60-g2f50 From 540e57f02686bad7125a951d14784e8fcc896e26 Mon Sep 17 00:00:00 2001 From: Josh Sixsmith Date: Fri, 25 Mar 2016 18:27:02 +1100 Subject: Upload of GDAL, kealib, openjpeg, py-tuiview package builds. --- var/spack/repos/builtin/packages/gdal/package.py | 69 ++++++++++++++++++++++ var/spack/repos/builtin/packages/kealib/package.py | 35 +++++++++++ .../repos/builtin/packages/openjpeg/package.py | 26 ++++++++ .../repos/builtin/packages/py-tuiview/package.py | 19 ++++++ 4 files changed, 149 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gdal/package.py create mode 100644 var/spack/repos/builtin/packages/kealib/package.py create mode 100644 var/spack/repos/builtin/packages/openjpeg/package.py create mode 100644 var/spack/repos/builtin/packages/py-tuiview/package.py diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py new file mode 100644 index 0000000000..4f1f1ec2dd --- /dev/null +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -0,0 +1,69 @@ +from spack import * + +class Gdal(Package): + """ + GDAL is a translator library for raster and vector geospatial + data formats that is released under an X/MIT style Open Source + license by the Open Source Geospatial Foundation. As a library, + it presents a single raster abstract data model and vector + abstract data model to the calling application for all supported + formats. It also comes with a variety of useful command line + utilities for data translation and processing + """ + + homepage = "http://www.gdal.org/" + url = "http://download.osgeo.org/gdal/2.0.2/gdal-2.0.2.tar.gz" + list_url = "http://download.osgeo.org/gdal/" + list_depth = 2 + + version('2.0.2', '573865f3f59ba7b4f8f4cddf223b52a5') + + extends('python') + + variant('hdf5', default=False, description='Enable HDF5 support') + variant('hdf', default=False, description='Enable HDF4 support') + variant('openjpeg', default=False, description='Enable JPEG2000 support') + variant('geos', default=False, description='Enable GEOS support') + variant('kea', default=False, description='Enable KEA support') + variant('netcdf', default=False, description='Enable netcdf support') + + depends_on('swig') + depends_on("hdf5", when='+hdf5') + depends_on("hdf", when='+hdf') + depends_on("openjpeg", when='+openjpeg') + depends_on("geos", when='+geos') + depends_on("kealib", when='+kea') + depends_on("netcdf", when='+netcdf') + depends_on("libtiff") + depends_on("libpng") + depends_on("zlib") + depends_on("proj") + depends_on("py-numpy") + + parallel = False + + def install(self, spec, prefix): + args = [] + args.append("--prefix=%s" % prefix) + args.append("--with-liblzma=yes") + args.append("--with-zlib=%s" % spec['zlib'].prefix) + args.append("--with-python=%s" % spec['python'].prefix.bin + "/python") + args.append("--without-libtool") + + if '+geos' in spec: + args.append('--with-geos=yes') + if '+hdf' in spec: + args.append('--with-hdf4=%s' % spec['hdf'].prefix) + if '+hdf5' in spec: + args.append('--with-hdf5=%s' % spec['hdf5'].prefix) + if '+openjpeg' in spec: + args.append('--with-openjpeg=%s' % spec['openjpeg'].prefix) + if '+kea' in spec: + args.append('--with-kea=yes') + if '+netcdf' in spec: + args.append('--with-netcdf=%s' % spec['netcdf'].prefix) + + configure(*args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py new file mode 100644 index 0000000000..475d21e1d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Kealib(Package): + """An HDF5 Based Raster File Format + + KEALib provides an implementation of the GDAL data model. + The format supports raster attribute tables, image pyramids, + meta-data and in-built statistics while also handling very + large files and compression throughout. + + Based on the HDF5 standard, it also provides a base from which + other formats can be derived and is a good choice for long + term data archiving. An independent software library (libkea) + provides complete access to the KEA image format and a GDAL + driver allowing KEA images to be used from any GDAL supported software. + + Development work on this project has been funded by Landcare Research. + """ + homepage = "http://kealib.org/" + url = "https://bitbucket.org/chchrsc/kealib/get/kealib-1.4.5.tar.gz" + + version('1.4.5', '112e9c42d980b2d2987a3c15d0833a5d') + + depends_on("hdf5") + + def install(self, spec, prefix): + with working_dir('trunk', create=False): + cmake_args = [] + cmake_args.append("-DCMAKE_INSTALL_PREFIX=%s" % prefix) + cmake_args.append("-DHDF5_INCLUDE_DIR=%s" % spec['hdf5'].prefix.include) + cmake_args.append("-DHDF5_LIB_PATH=%s" % spec['hdf5'].prefix.lib) + cmake('.', *cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py new file mode 100644 index 0000000000..afec197d11 --- /dev/null +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Openjpeg(Package): + """ + OpenJPEG is an open-source JPEG 2000 codec written in C language. + It has been developed in order to promote the use of JPEG 2000, a + still-image compression standard from the Joint Photographic + Experts Group (JPEG). + Since April 2015, it is officially recognized by ISO/IEC and + ITU-T as a JPEG 2000 Reference Software. + """ + homepage = "https://github.com/uclouvain/openjpeg" + url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz" + + version('2.1' , '3e1c451c087f8462955426da38aa3b3d') + version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5') + version('2.0' , 'cdf266530fee8af87454f15feb619609') + version('1.5.2', '545f98923430369a6b046ef3632ef95c') + version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') + + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py new file mode 100644 index 0000000000..984b4196b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -0,0 +1,19 @@ +from spack import * + +class PyTuiview(Package): + """ + TuiView is a lightweight raster GIS with powerful raster attribute + table manipulation abilities. + """ + homepage = "https://bitbucket.org/chchrsc/tuiview" + url = "https://bitbucket.org/chchrsc/tuiview/get/tuiview-1.1.7.tar.gz" + + version('1.1.7', '4b3b38a820cc239c8ab4a181ac5d4c30') + + extends("python") + depends_on("py-pyqt") + depends_on("py-numpy") + depends_on("gdal") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From fd67da607e5476b767071dc37af66af6fd492452 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 08:32:14 +0100 Subject: make netcdf link against Spack's curl --- var/spack/repos/builtin/packages/netcdf/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index 227362399a..b60a2c4e9a 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -43,6 +43,13 @@ class Netcdf(Package): "--enable-dap" ] + # Make sure Netcdf links against Spack's curl + # Otherwise it may pick up system's curl, which could lead to link errors: + # /usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0' + LIBS.append("-lcurl") + CPPFLAGS.append("-I%s" % spec['curl'].prefix.include) + LDFLAGS.append ("-L%s" % spec['curl'].prefix.lib) + if '+mpi' in spec: config_args.append('--enable-parallel4') -- cgit v1.2.3-60-g2f50 From 3e39daeb12aa13a3f3f975ff315143bc3f13a2b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 09:56:24 +0100 Subject: add fPIC to MUMPS when building shared libs --- var/spack/repos/builtin/packages/mumps/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 2801d4194d..b295857ab5 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -70,6 +70,9 @@ class Mumps(Package): makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) + # when building shared libs need -fPIC, otherwise + # /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC + fpic = '-fPIC' if '+shared' in self.spec else '' # TODO: test this part, it needs a full blas, scalapack and # partitionning environment with 64bit integers if '+idx64' in self.spec: @@ -77,14 +80,14 @@ class Mumps(Package): # the fortran compilation flags most probably are # working only for intel and gnu compilers this is # perhaps something the compiler should provide - ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', - 'OPTL = -O ', - 'OPTC = -O -DINTSIZE64']) + ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), + 'OPTL = %s -O ' % fpic, + 'OPTC = %s -O -DINTSIZE64' % fpic]) else: makefile_conf.extend( - ['OPTF = -O -DALLOW_NON_INIT', - 'OPTL = -O ', - 'OPTC = -O ']) + ['OPTF = %s -O -DALLOW_NON_INIT' % fpic, + 'OPTL = %s -O ' % fpic, + 'OPTC = %s -O ' % fpic]) if '+mpi' in self.spec: -- cgit v1.2.3-60-g2f50 From 83fea631f1765d4641cde8af2c5c931b22e4ee33 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:04:17 +0100 Subject: extend trilinos --- .../repos/builtin/packages/trilinos/package.py | 32 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index edc40476e3..22c7ab6d61 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,5 +1,5 @@ from spack import * - +import os class Trilinos(Package): """ @@ -10,6 +10,7 @@ class Trilinos(Package): homepage = "https://trilinos.org/" url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" + version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4') version('12.4.2', '7c830f7f0f68b8ad324690603baf404e') version('12.2.1', '6161926ea247863c690e927687f83be9') version('12.0.1', 'bd99741d047471e127b8296b2ec08017') @@ -39,15 +40,38 @@ class Trilinos(Package): options.extend(std_cmake_args) options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', + '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), - '-DTPL_ENABLE_MPI:STRING=ON', - '-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix, - '-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix + '-DTPL_ENABLE_MPI:BOOL=ON', + '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, + '-DTPL_ENABLE_BLAS=ON', + '-DBLAS_LIBRARY_NAMES=blas', + '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, + '-DTPL_ENABLE_LAPACK=ON', + '-DLAPACK_LIBRARY_NAMES=lapack', + '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, + '-DTPL_ENABLE_Boost:BOOL=ON', + '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, + '-DTrilinos_ENABLE_Fortran=OFF', + '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', + '-DTrilinos_ENABLE_CXX11:BOOL=ON', + '-DTrilinos_CXX11_FLAGS=-std=c++11' + ]) + + # disable due to compiler / config errors: + options.extend(['-DTrilinos_ENABLE_SEACAS=OFF', + '-DTrilinos_ENABLE_Pike=OFF', + '-DTrilinos_ENABLE_STK=OFF' ]) + if self.compiler.name == "clang": + os.environ['CPPFLAGS']="-Qunused-arguments" + + #os.environ['LDFLAGS']="lgfortran" + with working_dir('spack-build', create=True): cmake('..', *options) make() -- cgit v1.2.3-60-g2f50 From 30ba96e58fe699e92902ce53a87b5e1cfb756d6f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:56:18 +0100 Subject: same --- .../repos/builtin/packages/trilinos/package.py | 84 +++++++++++++++++++--- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 22c7ab6d61..7b913031e3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -2,8 +2,7 @@ from spack import * import os class Trilinos(Package): - """ - The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented + """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. A unique design feature of Trilinos is its focus on packages. """ @@ -28,10 +27,19 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') + depends_on('metis') + depends_on('suite-sparse') + depends_on('tbb') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') + depends_on('parmetis') + depends_on('mumps+metis+parmetis') + depends_on('scalapack') + depends_on('superlu-dist') + depends_on('hypre') + depends_on('hdf5+mpi') depends_on('python') # Needs py-numpy activated @@ -49,23 +57,79 @@ class Trilinos(Package): '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', '-DBLAS_LIBRARY_NAMES=blas', - '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, + '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, #FIXME '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, + '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, - '-DTrilinos_ENABLE_Fortran=OFF', + '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTrilinos_CXX11_FLAGS=-std=c++11' + '-DTrilinos_CXX11_FLAGS=-std=c++11', + '-DTPL_ENABLE_Netcdf:BOOL=ON', + '-DTPL_ENABLE_HYPRE:BOOL=ON', + '-DTPL_ENABLE_HDF5:BOOL=ON', + '-DTPL_ENABLE_TBB:BOOL=ON' ]) + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) + + # suite-sparse related + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=ON', + '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + ]) + + # metis / parmetis + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=ON', + '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, + '-DMETIS_LIBRARY_NAMES=metis', + '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, + '-DTPL_ENABLE_ParMETIS:BOOL=ON', + '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_NAMES=parmetis;metis', + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + ]) + + # mumps + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=ON"', + '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! + ]) + + # scalapack + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + ]) + + # superlu_dist + options.extend([ + '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu_dist'].prefix.include + ]) + if spec.satisfies('^superlu-dist@4.0:'): + options.extend([ + '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + ]) + + # disable due to compiler / config errors: - options.extend(['-DTrilinos_ENABLE_SEACAS=OFF', - '-DTrilinos_ENABLE_Pike=OFF', - '-DTrilinos_ENABLE_STK=OFF' - ]) + options.extend([ + '-DTrilinos_ENABLE_SEACAS=OFF', + '-DTrilinos_ENABLE_Pike=OFF', + '-DTrilinos_ENABLE_STK=OFF' + ]) if self.compiler.name == "clang": os.environ['CPPFLAGS']="-Qunused-arguments" -- cgit v1.2.3-60-g2f50 From 76006fc346c7880b03356c1cf9d00bab2fdeac45 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 05:30:48 +0100 Subject: fix typo --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 7b913031e3..7d7613d2b5 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -116,7 +116,7 @@ class Trilinos(Package): # superlu_dist options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu_dist'].prefix.include + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ -- cgit v1.2.3-60-g2f50 From 18db930866b2024b242ea7c825851d7a56b27247 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:09:58 +0100 Subject: rearrange --- var/spack/repos/builtin/packages/trilinos/package.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 7d7613d2b5..063d179c7e 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -73,14 +73,6 @@ class Trilinos(Package): '-DTPL_ENABLE_TBB:BOOL=ON' ]) - # Amesos, conflicting types of double and complex SLU_D - # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html - # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html - options.extend([ - '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', - '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' - ]) - # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=ON', @@ -113,7 +105,14 @@ class Trilinos(Package): '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) - # superlu_dist + # superlu_dist: + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include @@ -123,7 +122,6 @@ class Trilinos(Package): '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' ]) - # disable due to compiler / config errors: options.extend([ '-DTrilinos_ENABLE_SEACAS=OFF', -- cgit v1.2.3-60-g2f50 From b91a155e8d996c9e51da7f75d4e106469ba488e6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:10:31 +0100 Subject: more specific about dependencies --- var/spack/repos/builtin/packages/trilinos/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 063d179c7e..2937ed4c38 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -62,7 +62,7 @@ class Trilinos(Package): '-DLAPACK_LIBRARY_NAMES=lapack', '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, + '-DBoost_BASE_DIR:PATH=%s' % spec['boost'].prefix, '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', @@ -76,7 +76,9 @@ class Trilinos(Package): # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=ON', + '-DCholmod_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-D_UMFPACK_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) @@ -94,7 +96,7 @@ class Trilinos(Package): # mumps options.extend([ - '-DTPL_ENABLE_MUMPS:BOOL=ON"', + '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! ]) @@ -115,6 +117,7 @@ class Trilinos(Package): ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_BASE_DIR:PATH=%s' % spec['superlu-dist'].prefix, '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): -- cgit v1.2.3-60-g2f50 From b6a35716ce3e02e1a3661e2433986ad637b65d0c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:33:28 +0100 Subject: same --- var/spack/repos/builtin/packages/trilinos/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 2937ed4c38..b31cf880bc 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -43,6 +43,8 @@ class Trilinos(Package): depends_on('python') # Needs py-numpy activated + patch('umfpack_from_suitesparse.patch') + def install(self, spec, prefix): options = [] options.extend(std_cmake_args) @@ -76,9 +78,11 @@ class Trilinos(Package): # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=ON', - '-DCholmod_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, + '-DCholmod_LIBRARY_DIRS=%s' % spec['suite-sparse'].prefix.lib, + '-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-D_UMFPACK_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, + '-D_UMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + '-D_UMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) @@ -117,7 +121,7 @@ class Trilinos(Package): ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_BASE_DIR:PATH=%s' % spec['superlu-dist'].prefix, + '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): -- cgit v1.2.3-60-g2f50 From 45b4895888a2abb3cf11ecf2b26b7940a9f89b5a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:34:22 +0100 Subject: patch --- .../builtin/packages/trilinos/umfpack_from_suitesparse.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch diff --git a/var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch b/var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch new file mode 100644 index 0000000000..9defc55527 --- /dev/null +++ b/var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/TPLs/FindTPLUMFPACK.cmake b/cmake/TPLs/FindTPLUMFPACK.cmake +index 963eb71..998cd02 100644 +--- a/cmake/TPLs/FindTPLUMFPACK.cmake ++++ b/cmake/TPLs/FindTPLUMFPACK.cmake +@@ -55,6 +55,6 @@ + + + TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( UMFPACK +- REQUIRED_HEADERS umfpack.h amd.h UFconfig.h ++ REQUIRED_HEADERS umfpack.h amd.h SuiteSparse_config.h + REQUIRED_LIBS_NAMES umfpack amd + ) -- cgit v1.2.3-60-g2f50 From bc3314a57d43963416f709a94967ae8e1758c458 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:05:18 +0100 Subject: more and more --- var/spack/repos/builtin/packages/trilinos/package.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b31cf880bc..77ae6f818d 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -64,7 +64,8 @@ class Trilinos(Package): '-DLAPACK_LIBRARY_NAMES=lapack', '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBoost_BASE_DIR:PATH=%s' % spec['boost'].prefix, + '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', @@ -77,12 +78,13 @@ class Trilinos(Package): # suite-sparse related options.extend([ - '-DTPL_ENABLE_Cholmod:BOOL=ON', - '-DCholmod_LIBRARY_DIRS=%s' % spec['suite-sparse'].prefix.lib, - '-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? + #'-DTPL_ENABLE_Cholmod:BOOL=ON', + #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-D_UMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - '-D_UMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) -- cgit v1.2.3-60-g2f50 From 2162627f35f98dc7f07cd34a6593f71d74095955 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:13:19 +0100 Subject: more --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 77ae6f818d..532db69cc2 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -124,7 +124,7 @@ class Trilinos(Package): options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include + '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ -- cgit v1.2.3-60-g2f50 From 88a7a23132a379e526220324b8493d3be870f7e6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:46:23 +0100 Subject: even more --- var/spack/repos/builtin/packages/trilinos/package.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 532db69cc2..13794ae930 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -36,7 +36,7 @@ class Trilinos(Package): depends_on('netcdf+mpi') depends_on('parmetis') depends_on('mumps+metis+parmetis') - depends_on('scalapack') + # depends_on('scalapack') # see FIXME below depends_on('superlu-dist') depends_on('hypre') depends_on('hdf5+mpi') @@ -49,6 +49,7 @@ class Trilinos(Package): options = [] options.extend(std_cmake_args) + mpi_bin = spec['mpi'].prefix.bin options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', @@ -73,7 +74,12 @@ class Trilinos(Package): '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON', - '-DTPL_ENABLE_TBB:BOOL=ON' + '-DTPL_ENABLE_TBB:BOOL=ON', + # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS + '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name + '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' ]) # suite-sparse related @@ -109,8 +115,8 @@ class Trilinos(Package): # scalapack options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=ON', - '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o + #'-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) # superlu_dist: @@ -141,8 +147,6 @@ class Trilinos(Package): if self.compiler.name == "clang": os.environ['CPPFLAGS']="-Qunused-arguments" - #os.environ['LDFLAGS']="lgfortran" - with working_dir('spack-build', create=True): cmake('..', *options) make() -- cgit v1.2.3-60-g2f50 From 7e4e2c988ab4e5163469395ace204d9f332a9675 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:48:25 +0100 Subject: minor --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 13794ae930..c915d8eb1a 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -78,7 +78,7 @@ class Trilinos(Package): # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'), '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' ]) -- cgit v1.2.3-60-g2f50 From 50e4b609c688b573ef882a079e2d45a83966f94c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 09:11:26 +0100 Subject: minor --- var/spack/repos/builtin/packages/trilinos/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index c915d8eb1a..3622548ece 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -52,6 +52,7 @@ class Trilinos(Package): mpi_bin = spec['mpi'].prefix.bin options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', + '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), @@ -145,7 +146,9 @@ class Trilinos(Package): ]) if self.compiler.name == "clang": - os.environ['CPPFLAGS']="-Qunused-arguments" + options.extend([ + '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' + ]) with working_dir('spack-build', create=True): cmake('..', *options) -- cgit v1.2.3-60-g2f50 From 2fb599ea86c82e3395d8402db116a3a25fed0c73 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 09:16:51 +0100 Subject: minor --- var/spack/repos/builtin/packages/trilinos/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3622548ece..82681e004c 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -55,7 +55,7 @@ class Trilinos(Package): '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', - '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), + '-DCMAKE_BUILD_TYPE:STRING=%s' % ('DEBUG' if '+debug' in spec else 'RELEASE'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, @@ -83,6 +83,11 @@ class Trilinos(Package): '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' ]) + # for build-debug only: + options.extend([ + '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + ]) + # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? -- cgit v1.2.3-60-g2f50 From eb5b0767aa20b46932c36203595c124b7463a444 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 09:45:33 +0100 Subject: remove gfortran as we have libnotfound... --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 82681e004c..bb6f095190 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -80,7 +80,7 @@ class Trilinos(Package): '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'), - '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' + # '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' # FIXME ]) # for build-debug only: -- cgit v1.2.3-60-g2f50 From 7897f10126f0f8389326c9e723d73021f654ea6a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 13:04:43 +0100 Subject: fiddle with fortran --- .../repos/builtin/packages/trilinos/package.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index bb6f095190..f6f24e967e 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -68,7 +68,7 @@ class Trilinos(Package): '-DTPL_ENABLE_Boost:BOOL=ON', '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, - '-DTrilinos_ENABLE_Fortran=OFF', # FIXME + # '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTrilinos_CXX11_FLAGS=-std=c++11', @@ -79,10 +79,17 @@ class Trilinos(Package): # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'), - # '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' # FIXME + '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') ]) + # Fortran lib + libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) + #os.environ['LDFLAGS'] = '-L%s -lgfortran' % libgfortran + options.extend([ + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran', + '-DCMAKE_EXE_LINKER_FLAGS:STRING=-L%s -lgfortran' % libgfortran + ]) + # for build-debug only: options.extend([ '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' @@ -150,10 +157,10 @@ class Trilinos(Package): '-DTrilinos_ENABLE_STK=OFF' ]) - if self.compiler.name == "clang": - options.extend([ - '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' - ]) + #if self.compiler.name == "clang": + # options.extend([ + # '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' + # ]) with working_dir('spack-build', create=True): cmake('..', *options) -- cgit v1.2.3-60-g2f50 From fade526ae4e748a9454fd56c07ef7bc1fca38423 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 16:58:59 +0100 Subject: remove tbb --- var/spack/repos/builtin/packages/trilinos/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index f6f24e967e..12212360a0 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -29,7 +29,6 @@ class Trilinos(Package): depends_on('swig') depends_on('metis') depends_on('suite-sparse') - depends_on('tbb') # MPI related dependencies depends_on('mpi') @@ -75,7 +74,6 @@ class Trilinos(Package): '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON', - '-DTPL_ENABLE_TBB:BOOL=ON', # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), -- cgit v1.2.3-60-g2f50 From e51fe2934e0189aa5c33c8663819d23e7706f809 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 17:38:36 +0100 Subject: fiddle more --- var/spack/repos/builtin/packages/trilinos/package.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 12212360a0..fb14e1f36c 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -67,7 +67,6 @@ class Trilinos(Package): '-DTPL_ENABLE_Boost:BOOL=ON', '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, - # '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTrilinos_CXX11_FLAGS=-std=c++11', @@ -82,10 +81,9 @@ class Trilinos(Package): # Fortran lib libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) - #os.environ['LDFLAGS'] = '-L%s -lgfortran' % libgfortran options.extend([ - '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran', - '-DCMAKE_EXE_LINKER_FLAGS:STRING=-L%s -lgfortran' % libgfortran + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, + '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise VerifyFortranC fails as it does not contain -lgfortran , issues with IMPLICIT_LINK_LIBRARIES in CMakeFiles/CMake(C|CXX|Fortran)Compiler.cmake? ]) # for build-debug only: @@ -155,11 +153,6 @@ class Trilinos(Package): '-DTrilinos_ENABLE_STK=OFF' ]) - #if self.compiler.name == "clang": - # options.extend([ - # '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' - # ]) - with working_dir('spack-build', create=True): cmake('..', *options) make() -- cgit v1.2.3-60-g2f50 From 3f12a51759fcdd3b11867cb849fc2aa81a4941ef Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 19:35:49 +0100 Subject: keep fiddling --- var/spack/repos/builtin/packages/trilinos/package.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index fb14e1f36c..cdc2bf2379 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,6 +1,11 @@ from spack import * import os +# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: +# https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 +# https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package +# https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh +# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb class Trilinos(Package): """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. @@ -59,11 +64,11 @@ class Trilinos(Package): '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', - '-DBLAS_LIBRARY_NAMES=blas', - '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, #FIXME + '-DBLAS_LIBRARY_NAMES=blas', # FIXME: for Intel, Clang+GNU, GNU; easybuild add gfortran here... + '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME + '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, '-DTPL_ENABLE_Boost:BOOL=ON', '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, @@ -74,9 +79,9 @@ class Trilinos(Package): '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON', # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS - '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name - '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') + #'-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name + #'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + #'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') ]) # Fortran lib -- cgit v1.2.3-60-g2f50 From 8c9f88761384d16c77aa9cbee55cc501712c7b12 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:45:43 +0100 Subject: finally builds --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index cdc2bf2379..b80123838a 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -39,7 +39,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis') - depends_on('mumps+metis+parmetis') + depends_on('mumps+metis+parmetis+shared') # build errors with static libs # depends_on('scalapack') # see FIXME below depends_on('superlu-dist') depends_on('hypre') -- cgit v1.2.3-60-g2f50 From df995c4ef850338823b3a5a5c2ee3b12e05a33b1 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:57:22 +0100 Subject: minor cleanup --- var/spack/repos/builtin/packages/trilinos/package.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b80123838a..f2e9c37caa 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -77,24 +77,20 @@ class Trilinos(Package): '-DTrilinos_CXX11_FLAGS=-std=c++11', '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', - '-DTPL_ENABLE_HDF5:BOOL=ON', - # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS - #'-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name - #'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - #'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') + '-DTPL_ENABLE_HDF5:BOOL=ON' ]) # Fortran lib libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, - '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise VerifyFortranC fails as it does not contain -lgfortran , issues with IMPLICIT_LINK_LIBRARIES in CMakeFiles/CMake(C|CXX|Fortran)Compiler.cmake? + '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran ]) # for build-debug only: - options.extend([ - '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - ]) + # options.extend([ + # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + # ]) # suite-sparse related options.extend([ -- cgit v1.2.3-60-g2f50 From 0fc9326a4cc742e7a06cc1bb4192d0dfd008880d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 13:23:56 +0100 Subject: add variants --- .../repos/builtin/packages/trilinos/package.py | 111 +++++++++++++-------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index f2e9c37caa..2e119581e1 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -22,8 +22,15 @@ class Trilinos(Package): version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + variant('metis', default=True, description='Compile with METIS') + variant('parmetis', default=True, description='Compile with ParMETIS') + variant('mumps', default=True, description='Compile with support for MUMPS solvers') + variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') + variant('hypre', default=True, description='Compile with Hypre preconditioner') + variant('hdf5', default=True, description='Compile with HDF5') + variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds a debug version of the libraries') # Everything should be compiled with -fpic depends_on('blas') @@ -49,7 +56,23 @@ class Trilinos(Package): patch('umfpack_from_suitesparse.patch') + # check that the combination of variants makes sense + def variants_check(self): + if '+parmetis' in self.spec and '+metis' not in self.spec: + raise RuntimeError('You cannot use the variant parmetis without metis') + + if '+mumps' in self.spec and '+parmetis' not in self.spec: + raise RuntimeError('You cannot use the variant mumps without parmetis') + + if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): + # For Trilinos v11 we need to force SuperLUDist=OFF, + # since only the deprecated SuperLUDist v3.3 together with an Amesos patch + # is working. + raise RuntimeError('The superlu-dist variant can only be used with Trilinos @12.0.1:') + def install(self, spec, prefix): + self.variants_check() + options = [] options.extend(std_cmake_args) @@ -93,35 +116,38 @@ class Trilinos(Package): # ]) # suite-sparse related - options.extend([ - '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? - #'-DTPL_ENABLE_Cholmod:BOOL=ON', - #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, - '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, - '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' - ]) + if '+suite-sparse' in spec: + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? + #'-DTPL_ENABLE_Cholmod:BOOL=ON', + #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + ]) # metis / parmetis - options.extend([ - '-DTPL_ENABLE_METIS:BOOL=ON', - '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, - '-DMETIS_LIBRARY_NAMES=metis', - '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, - '-DTPL_ENABLE_ParMETIS:BOOL=ON', - '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), - '-DParMETIS_LIBRARY_NAMES=parmetis;metis', - '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include - ]) + if '+parmetis' in spec: # metis is required, see variants_check() + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=ON', + '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, + '-DMETIS_LIBRARY_NAMES=metis', + '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, + '-DTPL_ENABLE_ParMETIS:BOOL=ON', + '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_NAMES=parmetis;metis', + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + ]) # mumps - options.extend([ - '-DTPL_ENABLE_MUMPS:BOOL=ON', - '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, - '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! - ]) + if '+mumps' in spec: + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=ON', + '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! + ]) # scalapack options.extend([ @@ -129,23 +155,24 @@ class Trilinos(Package): #'-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) - # superlu_dist: - # Amesos, conflicting types of double and complex SLU_D - # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html - # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html - options.extend([ - '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', - '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' - ]) - options.extend([ - '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder - ]) - if spec.satisfies('^superlu-dist@4.0:'): + # superlu-dist: + if '+superlu-dist' in spec: + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) options.extend([ - '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, + '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder ]) + if spec.satisfies('^superlu-dist@4.0:'): + options.extend([ + '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + ]) # disable due to compiler / config errors: options.extend([ -- cgit v1.2.3-60-g2f50 From 416fcd081013afa8349d311909d50b21d9685674 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 13:33:00 +0100 Subject: same --- var/spack/repos/builtin/packages/trilinos/package.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 2e119581e1..3beadeb798 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -29,6 +29,7 @@ class Trilinos(Package): variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') + variant('python', default=True, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') @@ -39,20 +40,20 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') - depends_on('metis') - depends_on('suite-sparse') + depends_on('metis',when='+metis') + depends_on('suite-sparse',when='+suite-sparse') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') - depends_on('parmetis') - depends_on('mumps+metis+parmetis+shared') # build errors with static libs + depends_on('parmetis',when='+parmetis') + depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs # depends_on('scalapack') # see FIXME below - depends_on('superlu-dist') - depends_on('hypre') - depends_on('hdf5+mpi') + depends_on('superlu-dist',when='+superlu-dist') + depends_on('hypre',when='+hypre') + depends_on('hdf5+mpi',when='+hdf5') - depends_on('python') # Needs py-numpy activated + depends_on('python',when='+python') # Needs py-numpy activated patch('umfpack_from_suitesparse.patch') -- cgit v1.2.3-60-g2f50 From c33a63cabc8dcd8c71fc87de60a883cef4a4dae2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 13:47:07 +0100 Subject: fix python installation --- var/spack/repos/builtin/packages/trilinos/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3beadeb798..886893b639 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -186,3 +186,14 @@ class Trilinos(Package): cmake('..', *options) make() make('install') + + # When trilinos is built with Python, libpytrilinos is included through + # cmake configure files. Namely, Trilinos_LIBRARIES in TrilinosConfig.cmake + # contains pytrilinos. This leads to a run-time error: + # Symbol not found: _PyBool_Type + # and prevents Trilinos to be used in any C++ code, which links executable + # against the libraries listed in Trilinos_LIBRARIES. + # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 + # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : + if '+python' in self.spec: + filter_file(r'(?:SET\(COMPONENTS_LIST.*)(PyTrilinos;)(?:.*)', '', '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) -- cgit v1.2.3-60-g2f50 From d096b155f45d97775affa2bdda640a22823cb73e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 19:41:37 +0100 Subject: fix filter_file --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 886893b639..3967d0ef0e 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -196,4 +196,4 @@ class Trilinos(Package): # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : if '+python' in self.spec: - filter_file(r'(?:SET\(COMPONENTS_LIST.*)(PyTrilinos;)(?:.*)', '', '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) + filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) -- cgit v1.2.3-60-g2f50 From 7f2db8c26793abb1977dbccd2ae8a3a1b5a46568 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 11:54:51 +0100 Subject: fix w GCC 4.8 on Ubuntu but broke w GCC 5.3/Clang on OSX --- .../repos/builtin/packages/trilinos/package.py | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3967d0ef0e..1f1601e537 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -48,7 +48,7 @@ class Trilinos(Package): depends_on('netcdf+mpi') depends_on('parmetis',when='+parmetis') depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs - # depends_on('scalapack') # see FIXME below + depends_on('scalapack') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') @@ -108,13 +108,13 @@ class Trilinos(Package): libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, - '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran + '-DTrilinos_ENABLE_Fortran=ON' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran ]) # for build-debug only: - # options.extend([ - # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - # ]) + options.extend([ + '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + ]) # suite-sparse related if '+suite-sparse' in spec: @@ -144,16 +144,22 @@ class Trilinos(Package): # mumps if '+mumps' in spec: + # FIXME: + # since we use mumps with MPI, it will certainly be build against Scalapack. + # Add scalapack lib here as well. + # This likely won't be need if Trilinos would compile with Scalapack options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! +# '-DMUMPS_LIBRARY_DIRS=%s;%s' % (spec['mumps'].prefix.lib,spec['scalapack'].prefix.lib), +# '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord;scalapack' # order is important! ]) # scalapack options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o - #'-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) # superlu-dist: @@ -175,6 +181,12 @@ class Trilinos(Package): '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' ]) + # python + if '~python' in spec: + options.extend([ + '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' + ]) + # disable due to compiler / config errors: options.extend([ '-DTrilinos_ENABLE_SEACAS=OFF', -- cgit v1.2.3-60-g2f50 From 828aeefb1d4e09deb0694c61397a3097bda85ccb Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 12:01:00 +0100 Subject: minor cleanup --- var/spack/repos/builtin/packages/trilinos/package.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1f1601e537..1dba2b8db3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -88,7 +88,7 @@ class Trilinos(Package): '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', - '-DBLAS_LIBRARY_NAMES=blas', # FIXME: for Intel, Clang+GNU, GNU; easybuild add gfortran here... + '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', @@ -108,7 +108,7 @@ class Trilinos(Package): libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, - '-DTrilinos_ENABLE_Fortran=ON' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran + '-DTrilinos_ENABLE_Fortran=ON' ]) # for build-debug only: @@ -144,21 +144,15 @@ class Trilinos(Package): # mumps if '+mumps' in spec: - # FIXME: - # since we use mumps with MPI, it will certainly be build against Scalapack. - # Add scalapack lib here as well. - # This likely won't be need if Trilinos would compile with Scalapack options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! -# '-DMUMPS_LIBRARY_DIRS=%s;%s' % (spec['mumps'].prefix.lib,spec['scalapack'].prefix.lib), -# '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord;scalapack' # order is important! ]) # scalapack options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=ON', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) -- cgit v1.2.3-60-g2f50 From 21e81e92a9ac88bd498bd65aa9b77a43c27da881 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 12:05:48 +0100 Subject: try to disable VerifyFortranC tests on Darwin --- var/spack/repos/builtin/packages/trilinos/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1dba2b8db3..0c7d8a7967 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -110,6 +110,13 @@ class Trilinos(Package): '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, '-DTrilinos_ENABLE_Fortran=ON' ]) + # FIXME: + # VerifyFortranC test of CMake does not contain -lgfortran and thus fails. + # This could be GCC/CMake related, but appears at least on OSX with Clang@7.0.2 and GNU Fortran@5.3.0 + if sys.platform == 'darwin': + options.extend([ + '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' + ]) # for build-debug only: options.extend([ -- cgit v1.2.3-60-g2f50 From 26a72619aed8684019ab331889b276b8883b76c8 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 12:42:26 +0100 Subject: add missing sys --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0c7d8a7967..e077dfbbfd 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,5 +1,5 @@ from spack import * -import os +import os, sys # Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: # https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 -- cgit v1.2.3-60-g2f50 From 5172f09b9f966a3f1be438bab972a0267cccc73b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 16:47:48 +0100 Subject: builds on OSX again (modulo CC wrappers are solved) --- var/spack/repos/builtin/packages/trilinos/package.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index e077dfbbfd..3003b4ab53 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -113,15 +113,15 @@ class Trilinos(Package): # FIXME: # VerifyFortranC test of CMake does not contain -lgfortran and thus fails. # This could be GCC/CMake related, but appears at least on OSX with Clang@7.0.2 and GNU Fortran@5.3.0 - if sys.platform == 'darwin': - options.extend([ - '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' - ]) + #if sys.platform == 'darwin': + # options.extend([ + # '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' + # ]) # for build-debug only: - options.extend([ - '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - ]) + #options.extend([ + # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + #]) # suite-sparse related if '+suite-sparse' in spec: @@ -194,6 +194,11 @@ class Trilinos(Package): '-DTrilinos_ENABLE_Pike=OFF', '-DTrilinos_ENABLE_STK=OFF' ]) + if sys.platform == 'darwin': + options.extend([ + '-DTrilinos_ENABLE_FEI=OFF' + ]) + with working_dir('spack-build', create=True): cmake('..', *options) -- cgit v1.2.3-60-g2f50 From eec50b524bdf9e04f9e3536bc389ce633133373b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 16:58:14 +0100 Subject: minor cleanup --- .../repos/builtin/packages/trilinos/package.py | 46 ++++++++++++++++------ 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3003b4ab53..b1caca96ff 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -28,6 +28,7 @@ class Trilinos(Package): variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') + variant('scalapack', default=True, description='Compile with Scalapack') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') variant('python', default=True, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') @@ -110,13 +111,6 @@ class Trilinos(Package): '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, '-DTrilinos_ENABLE_Fortran=ON' ]) - # FIXME: - # VerifyFortranC test of CMake does not contain -lgfortran and thus fails. - # This could be GCC/CMake related, but appears at least on OSX with Clang@7.0.2 and GNU Fortran@5.3.0 - #if sys.platform == 'darwin': - # options.extend([ - # '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' - # ]) # for build-debug only: #options.extend([ @@ -135,6 +129,11 @@ class Trilinos(Package): '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) + else: + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=OFF', + '-DTPL_ENABLE_UMFPACK:BOOL=OFF', + ]) # metis / parmetis if '+parmetis' in spec: # metis is required, see variants_check() @@ -148,6 +147,11 @@ class Trilinos(Package): '-DParMETIS_LIBRARY_NAMES=parmetis;metis', '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include ]) + else: + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=OFF', + '-DTPL_ENABLE_ParMETIS:BOOL=OFF', + ]) # mumps if '+mumps' in spec: @@ -156,12 +160,22 @@ class Trilinos(Package): '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! ]) + else: + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=OFF', + ]) # scalapack - options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=ON', - '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 - ]) + if '+scalapack' in spec: + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + ]) + else: + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', + ]) + # superlu-dist: if '+superlu-dist' in spec: @@ -181,12 +195,22 @@ class Trilinos(Package): options.extend([ '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' ]) + else: + options.extend([ + '-DTPL_ENABLE_SuperLUDist:BOOL=OFF', + ]) + # python if '~python' in spec: options.extend([ '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' ]) + else: + options.extend([ + '-DTrilinos_ENABLE_PyTrilinos:BOOL=ON' + ]) + # disable due to compiler / config errors: options.extend([ -- cgit v1.2.3-60-g2f50 From 6699399e5191004ed924b9a8916ec1ae61223000 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 17:00:42 +0100 Subject: add when to depends_on scalapack --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b1caca96ff..8b66405137 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -49,7 +49,7 @@ class Trilinos(Package): depends_on('netcdf+mpi') depends_on('parmetis',when='+parmetis') depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs - depends_on('scalapack') + depends_on('scalapack',when='+scalapack') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') -- cgit v1.2.3-60-g2f50 From c7011d21aa95145c7b3978f4220b211e39c9ecf2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 22:15:39 +0100 Subject: update dependencies. Builds fine on OSX --- var/spack/repos/builtin/packages/dealii/package.py | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index cddf5cd98b..5a50481b9b 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,21 +12,21 @@ class Dealii(Package): depends_on ("lapack") depends_on ("mpi") - #depends_on ("arpack") + depends_on ("arpack-ng") depends_on ("boost") - #depends_on ("doxygen") - depends_on ("hdf5+mpi") + depends_on ("doxygen") + depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis") - #depends_on "muparser" + depends_on ("muparser") depends_on ("netcdf") - #depends_on ("numdiff") - #depends_on ("oce") + #depends_on ("numdiff") #FIXME + depends_on ("oce") depends_on ("p4est") depends_on ("parmetis") depends_on ("petsc") - #depends_on ("slepc") - depends_on ("SuiteSparse") - #depends_on "tbb" + depends_on ("slepc") + depends_on ("suite-sparse") + depends_on ("tbb") depends_on ("trilinos") def install(self, spec, prefix): @@ -42,21 +42,21 @@ class Dealii(Package): '-DCMAKE_BUILD_TYPE=DebugRelease', '-DDEAL_II_WITH_THREADS:BOOL=ON' '-DDEAL_II_WITH_MPI:BOOL=ON', - '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), + '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - #'-DARPACK_DIR=%s' % , + '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, '-DBOOST_DIR=%s' % spec['boost'].prefix, '-DHDF5_DIR=%s' % spec['hdf5'].prefix, '-DMETIS_DIR=%s' % spec['metis'].prefix, - #'-DMUPARSER_DIR=%s ' + '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, '-DNETCDF_DIR=%s' % spec['netcdf'].prefix, - #'-DOPENCASCADE_DIR= + '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DPETSC_DIR=%s' % spec['petsc'].prefix, - #'-DSLEPC_DIR= - '-DUMFPACK_DIR=%s' % spec['SuiteSparse'].prefix, - #'-DTBB_DIR=%s' + '-DSLEPC_DIR=%s' % spec['slepc'].prefix, + '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, + '-DTBB_DIR=%s' % spec['tbb'].prefix, '-DTRILINOS_DIR=%s' % spec['trilinos'].prefix ]) -- cgit v1.2.3-60-g2f50 From 497adc3b42191c000323c55aae5da32fab901265 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 25 Mar 2016 22:45:19 -0400 Subject: Added new version; old versions don't work with Python3. --- var/spack/repos/builtin/packages/py-cython/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 68eb735ad9..4d728fa8fb 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -3,10 +3,13 @@ from spack import * class PyCython(Package): """The Cython compiler for writing C extensions for the Python language.""" homepage = "https://pypi.python.org/pypi/cython" - url = "https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz" + url = "https://pypi.python.org/packages/source/C/Cython/Cython-0.22.tar.gz" - version('0.21.2', 'd21adb870c75680dc857cd05d41046a4') + version('0.23.4', '157df1f69bcec6b56fd97e0f2e057f6e') + + # These versions contain illegal Python3 code... version('0.22', '1ae25add4ef7b63ee9b4af697300d6b6') + version('0.21.2', 'd21adb870c75680dc857cd05d41046a4') extends('python') -- cgit v1.2.3-60-g2f50 From f603c82e814ebc59ba03b0b83be86f1a4bfcbd94 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 26 Mar 2016 18:43:55 +0100 Subject: qualify Amesos link errors --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 8b66405137..0ba7a51b8b 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -48,7 +48,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+parmetis') - depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs + depends_on('mumps+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+scalapack') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') -- cgit v1.2.3-60-g2f50 From 965ce633c311e2bcb765f5e9900f0da6205f9c23 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 26 Mar 2016 18:51:59 +0100 Subject: cleanup variants --- .../repos/builtin/packages/trilinos/package.py | 40 +++++++--------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0ba7a51b8b..48bffc65e0 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -22,13 +22,11 @@ class Trilinos(Package): version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') - variant('metis', default=True, description='Compile with METIS') - variant('parmetis', default=True, description='Compile with ParMETIS') + variant('metis', default=True, description='Compile with METIS and ParMETIS') variant('mumps', default=True, description='Compile with support for MUMPS solvers') variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') - variant('scalapack', default=True, description='Compile with Scalapack') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') variant('python', default=True, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') @@ -47,9 +45,9 @@ class Trilinos(Package): # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') - depends_on('parmetis',when='+parmetis') - depends_on('mumps+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) - depends_on('scalapack',when='+scalapack') + depends_on('parmetis',when='+metis') + depends_on('mumps+mpi+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') @@ -60,11 +58,8 @@ class Trilinos(Package): # check that the combination of variants makes sense def variants_check(self): - if '+parmetis' in self.spec and '+metis' not in self.spec: - raise RuntimeError('You cannot use the variant parmetis without metis') - - if '+mumps' in self.spec and '+parmetis' not in self.spec: - raise RuntimeError('You cannot use the variant mumps without parmetis') + if '+mumps' in self.spec and '+metis' not in self.spec: + raise RuntimeError('You cannot use the variant mumps without metis') if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): # For Trilinos v11 we need to force SuperLUDist=OFF, @@ -136,7 +131,7 @@ class Trilinos(Package): ]) # metis / parmetis - if '+parmetis' in spec: # metis is required, see variants_check() + if '+metis' in spec: options.extend([ '-DTPL_ENABLE_METIS:BOOL=ON', '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, @@ -153,30 +148,21 @@ class Trilinos(Package): '-DTPL_ENABLE_ParMETIS:BOOL=OFF', ]) - # mumps + # mumps / scalapack if '+mumps' in spec: options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, - '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! - ]) - else: - options.extend([ - '-DTPL_ENABLE_MUMPS:BOOL=OFF', - ]) - - # scalapack - if '+scalapack' in spec: - options.extend([ + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', # order is important! '-DTPL_ENABLE_SCALAPACK:BOOL=ON', '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) else: options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=OFF', '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', ]) - # superlu-dist: if '+superlu-dist' in spec: # Amesos, conflicting types of double and complex SLU_D @@ -202,13 +188,13 @@ class Trilinos(Package): # python - if '~python' in spec: + if '+python' in spec: options.extend([ - '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' + '-DTrilinos_ENABLE_PyTrilinos:BOOL=ON' ]) else: options.extend([ - '-DTrilinos_ENABLE_PyTrilinos:BOOL=ON' + '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' ]) -- cgit v1.2.3-60-g2f50 From 9c391bbda1c8379dd60cf21d82779db704183f32 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 26 Mar 2016 20:52:08 +0100 Subject: minor changes to variants --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 5a50481b9b..19bb3814be 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,7 +12,7 @@ class Dealii(Package): depends_on ("lapack") depends_on ("mpi") - depends_on ("arpack-ng") + depends_on ("arpack-ng+mpi") depends_on ("boost") depends_on ("doxygen") depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? @@ -23,7 +23,7 @@ class Dealii(Package): depends_on ("oce") depends_on ("p4est") depends_on ("parmetis") - depends_on ("petsc") + depends_on ("petsc+mpi") depends_on ("slepc") depends_on ("suite-sparse") depends_on ("tbb") -- cgit v1.2.3-60-g2f50 From 11ca06b1045283e2c89dc84a91ceb88fcadb6163 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sat, 26 Mar 2016 20:35:34 -0400 Subject: Added new py-cython version --- var/spack/repos/builtin/packages/py-cython/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 4d728fa8fb..072355026e 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -5,6 +5,7 @@ class PyCython(Package): homepage = "https://pypi.python.org/pypi/cython" url = "https://pypi.python.org/packages/source/C/Cython/Cython-0.22.tar.gz" + version('0.23.5', '66b62989a67c55af016c916da36e7514') version('0.23.4', '157df1f69bcec6b56fd97e0f2e057f6e') # These versions contain illegal Python3 code... -- cgit v1.2.3-60-g2f50 From 9b130e1d199bcff10903e981bd7592ed941d0107 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 26 Mar 2016 20:42:35 -0400 Subject: Added googletest package. --- .../repos/builtin/packages/googletest/package.py | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 var/spack/repos/builtin/packages/googletest/package.py diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py new file mode 100644 index 0000000000..ed27afa10c --- /dev/null +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -0,0 +1,40 @@ +# 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 googletest +# +# You can always get back here to change things with: +# +# spack edit googletest +# +# See the spack documentation for more information on building +# packages. +# +from spack import * + +class Googletest(Package): + """Google test framework for C++. Also called gtest.""" + homepage = "https://github.com/google/googletest" + url = "https://github.com/google/googletest/tarball/release-1.7.0" + + version('1.7.0', '5eaf03ed925a47b37c8e1d559eb19bc4') + + depends_on("cmake") + + def install(self, spec, prefix): + which('cmake')('.', *std_cmake_args) + + make() + + # Google Test doesn't have a make install + # We have to do our own install here. + install_tree('include', prefix.include) + + mkdirp(prefix.lib) + install('./libgtest.a', '%s' % prefix.lib) + install('./libgtest_main.a', '%s' % prefix.lib) + -- cgit v1.2.3-60-g2f50 From a82a587b3298ffec0c11ddf1c9639c6de228fa6a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 06:17:43 +0200 Subject: lower requirement on mumps --- var/spack/repos/builtin/packages/trilinos/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 48bffc65e0..e8c4bcd7e2 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -46,7 +46,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+metis') - depends_on('mumps+mpi+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + depends_on('mumps+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') @@ -58,9 +58,6 @@ class Trilinos(Package): # check that the combination of variants makes sense def variants_check(self): - if '+mumps' in self.spec and '+metis' not in self.spec: - raise RuntimeError('You cannot use the variant mumps without metis') - if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): # For Trilinos v11 we need to force SuperLUDist=OFF, # since only the deprecated SuperLUDist v3.3 together with an Amesos patch -- cgit v1.2.3-60-g2f50 From 9cff241ad52ba628a0bdad47cee98bbbf6ba5511 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 10:39:09 +0200 Subject: fix install name on Darwin --- var/spack/repos/builtin/packages/trilinos/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index e8c4bcd7e2..72f904d8aa 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,5 +1,5 @@ from spack import * -import os, sys +import os, sys, glob # Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: # https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 @@ -222,3 +222,10 @@ class Trilinos(Package): # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : if '+python' in self.spec: filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) + + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fs = glob.glob(join_path(prefix.lib,"*.dylib")) + install_name_tool = which('install_name_tool') + for f in fs: + install_name_tool('-id',f,f) -- cgit v1.2.3-60-g2f50 From 69ebc8173e1843ea570d78ac27465b0ea32c753d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 16:04:13 +0200 Subject: use global tool to fix install_name --- var/spack/repos/builtin/packages/trilinos/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 72f904d8aa..6608f64ea7 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -225,7 +225,4 @@ class Trilinos(Package): # The shared libraries are not installed correctly on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): - fs = glob.glob(join_path(prefix.lib,"*.dylib")) - install_name_tool = which('install_name_tool') - for f in fs: - install_name_tool('-id',f,f) + fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-60-g2f50 From cc42391e0fa6eda490c4aeffcbfbae584f077db3 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 27 Mar 2016 11:06:10 -0400 Subject: Added py-netcdf --- var/spack/repos/builtin/packages/py-netcdf/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-netcdf/package.py diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-netcdf/package.py new file mode 100644 index 0000000000..7faa15ad25 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-netcdf/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyNetcdf(Package): + """Python interface to the netCDF Library.""" + homepage = "http://unidata.github.io/netcdf4-python" + url = "https://github.com/Unidata/netcdf4-python/tarball/v1.2.3.1rel" + + version('1.2.3.1', '4fc4320d4f2a77b894ebf8da1c9895af') + + extends('python') + depends_on('py-numpy') + depends_on('py-cython') + depends_on('netcdf') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From 439d3b3ddb4e53721b216bd19bec1e8fa16faf89 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 17:38:25 +0200 Subject: mumps: add install_name / soname --- var/spack/repos/builtin/packages/mumps/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index b295857ab5..26440ab7c8 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -113,13 +113,13 @@ class Mumps(Package): # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) makefile_conf.extend([ 'LIBEXT=.dylib', - 'AR=%s -dynamiclib -undefined dynamic_lookup -o ' % os.environ['FC'], + 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib), 'RANLIB=echo' ]) else: makefile_conf.extend([ 'LIBEXT=.so', - 'AR=$(FL) -shared -o', + 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib, 'RANLIB=echo' ]) else: -- cgit v1.2.3-60-g2f50 From b0b882cbb3d903a85413acb0439a02d6ac9e26fc Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 00:56:19 -0700 Subject: Speed up directives by skipping debug info in stack traversal. - `caller_locals()` doesn't need debug info, only frame locals. - `get_calling_module()` doesn't either. - Changed calls to `inspect.stack()` -> `inspect.stack(0)` --- lib/spack/llnl/util/lang.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index 13d301f84e..3b4e2c8352 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -117,7 +117,8 @@ def caller_locals(): scope. Yes, this is some black magic, and yes it's useful for implementing things like depends_on and provides. """ - stack = inspect.stack() + # Passing zero here skips line context for speed. + stack = inspect.stack(0) try: return stack[2][0].f_locals finally: @@ -128,7 +129,8 @@ def get_calling_module_name(): """Make sure that the caller is a class definition, and return the enclosing module's name. """ - stack = inspect.stack() + # Passing zero here skips line context for speed. + stack = inspect.stack(0) try: # Make sure locals contain __module__ caller_locals = stack[2][0].f_locals -- cgit v1.2.3-60-g2f50 From dce590fb21af844230727b283f6c8bf759ea805c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 19:59:02 -0700 Subject: Add a dso_suffix variable to build_environment - Consolidate this in one place so that we don't have to do it in every build. - Will update further once better OS support is committed. Shoudl really be an attribute of the forthcoming `Platform` class. --- lib/spack/spack/build_environment.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 119a255a34..640db0c1d1 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -59,6 +59,11 @@ SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' +# Platform-specific library suffix. +dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so' + + + class MakeExecutable(Executable): """Special callable executable object for make so the user can specify parallel or not on a per-invocation basis. Using @@ -246,6 +251,9 @@ def set_module_variables_for_package(pkg, module): # a Prefix object. m.prefix = pkg.prefix + # Platform-specific library suffix. + m.dso_suffix = dso_suffix + def get_rpaths(pkg): """Get a list of all the rpaths for a package.""" -- cgit v1.2.3-60-g2f50 From cde33205827edbed988ec4548c983ff93e9445c6 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 20:00:28 -0700 Subject: Add a method to find the containing directory of a library. --- lib/spack/llnl/util/filesystem.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index c4665c284c..92f9ca2983 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -27,7 +27,7 @@ __all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree' 'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file', 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', 'set_executable', 'copy_mode', 'unset_executable_mode', - 'remove_dead_links', 'remove_linked_tree'] + 'remove_dead_links', 'remove_linked_tree', 'find_library_path'] import os import sys @@ -392,3 +392,18 @@ def remove_linked_tree(path): os.unlink(path) else: shutil.rmtree(path, True) + + +def find_library_path(libname, *paths): + """Searches for a file called in each path. + + Return: + directory where the library was found, if found. None otherwise. + + """ + for path in paths: + library = join_path(path, libname) + if os.path.exists(library): + return path + return None + -- cgit v1.2.3-60-g2f50 From 66bb71534b3ab7eaf7b27743efc0ecf9763e4982 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 20:02:08 -0700 Subject: Better blas/lapack and scipy packages: more robust, added `shared` variants. - py-scipy now builds with netlib-lapack, openblas, and atlas. - started a convention for passing lib info from blas/lapack implementations. - Improved netlib-lapack: - Also build static libs when `shared` variant is enabled. - Enable CBLAS build - needed minor patch to build correctly. - Added `shared` variant to OpenBLAS. - Made OpenBLAS build properly shared and static. --- .../builtin/packages/netlib-lapack/package.py | 40 +++++++++++++++-- .../repos/builtin/packages/openblas/package.py | 52 +++++++++++++++++----- .../repos/builtin/packages/py-scipy/package.py | 12 +++-- 3 files changed, 88 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index c4b7ce3b04..05436332ac 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -31,8 +31,16 @@ class NetlibLapack(Package): depends_on('cmake') depends_on('blas', when='+external-blas') - def install(self, spec, prefix): - cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), + + 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) + + + 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 '+external-blas' in spec: @@ -45,7 +53,33 @@ class NetlibLapack(Package): cmake_args.extend(std_cmake_args) - with working_dir('spack-build', create=True): + build_dir = 'spack-build' + ('-shared' if shared else '-static') + with working_dir(build_dir, create=True): cmake('..', *cmake_args) make() make("install") + + + def install(self, spec, prefix): + # Always build static libraries. + self.install_one(spec, prefix, False) + + # Build shared libraries if requested. + if '+shared' in spec: + self.install_one(spec, prefix, True) + + + 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('libblas.a', self.prefix.lib64, self.prefix.lib) + + self.spec.blas_static_lib = join_path(libdir, 'libblas.a') + self.spec.lapack_static_lib = join_path(libdir, 'liblapack.a') + + 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) + + + diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 1d10f217c4..4ec829a85b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,5 +1,6 @@ from spack import * import sys +import os class Openblas(Package): """OpenBLAS: An optimized BLAS library""" @@ -10,29 +11,60 @@ class Openblas(Package): version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') + variant('shared', default=True, description="Build shared libraries as well as static libs.") + # virtual dependency provides('blas') provides('lapack') + def install(self, spec, prefix): - extra=[] + make_defs = ['CC=%s' % spack_cc, + 'FC=%s' % spack_fc] + + make_targets = ['libs', 'netlib'] + + # Build shared if variant is set. + if '+shared' in spec: + make_targets += ['shared'] + else: + make_defs += ['NO_SHARED=1'] + + # fix missing _dggsvd_ and _sggsvd_ if spec.satisfies('@0.2.16'): - extra.extend([ - 'BUILD_LAPACK_DEPRECATED=1' # fix missing _dggsvd_ and _sggsvd_ - ]) + make_defs += ['BUILD_LAPACK_DEPRECATED=1'] + + make_args = make_defs + make_targets + make(*make_args) - make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77',*extra) - make("tests") - make('install', "PREFIX='%s'" % prefix) + make("tests", *make_defs) + + # no quotes around prefix (spack doesn't use a shell) + make('install', "PREFIX=%s" % prefix, *make_defs) - lib_dsuffix = 'dylib' if sys.platform == 'darwin' else 'so' # Blas virtual package should provide blas.a and libblas.a with working_dir(prefix.lib): symlink('libopenblas.a', 'blas.a') symlink('libopenblas.a', 'libblas.a') - symlink('libopenblas.%s' % lib_dsuffix, 'libblas.%s' % lib_dsuffix) + if '+shared' in spec: + 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') - symlink('libopenblas.%s' % lib_dsuffix, 'liblapack.%s' % lib_dsuffix) + if '+shared' in spec: + symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix) + + + 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) + + 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.lapack_shared_lib = self.spec.blas_shared_lib + diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index c2161c90c4..4d47c641ee 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -11,9 +11,15 @@ class PyScipy(Package): extends('python') depends_on('py-nose') - depends_on('py-numpy') - depends_on('blas') - depends_on('lapack') + depends_on('py-numpy+blas+lapack') def install(self, spec, prefix): + if 'atlas' in spec: + # libatlas.so actually isn't always installed, but this + # seems to make the build autodetect things correctly. + env['ATLAS'] = join_path(spec['atlas'].prefix.lib, 'libatlas.' + dso_suffix) + else: + env['BLAS'] = spec['blas'].blas_shared_lib + env['LAPACK'] = spec['lapack'].lapack_shared_lib + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From e049fc2840ba81cdff2ca7edd798c5e961ae94e9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 27 Mar 2016 11:47:20 -0700 Subject: Run post-install hoooks before build stage is removed. - Build will properly fail when post-install hoooks fail. - Post-install hooks have a proper working directory set now. --- lib/spack/spack/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9af3221837..c17bec4a14 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -926,6 +926,9 @@ class Package(object): install(env_path, env_install_path) dump_packages(self.spec, packages_dir) + # Run post install hooks before build stage is removed. + spack.hooks.post_install(self) + # Stop timer. self._total_time = time.time() - start_time build_time = self._total_time - self._fetch_time @@ -954,9 +957,6 @@ class Package(object): # the database, so that we don't need to re-read from file. spack.installed_db.add(self.spec, self.prefix) - # Once everything else is done, run post install hooks - spack.hooks.post_install(self) - def sanity_check_prefix(self): """This function checks whether install succeeded.""" -- cgit v1.2.3-60-g2f50 From 20600b8cac9488ff416397de374c2d3dacf4afe4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 21:03:18 +0200 Subject: add tests and netcdf-cxx4 --- var/spack/repos/builtin/packages/dealii/package.py | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 19bb3814be..1d4c800288 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -1,4 +1,5 @@ from spack import * +import shutil class Dealii(Package): """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" @@ -18,7 +19,7 @@ class Dealii(Package): depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis") depends_on ("muparser") - depends_on ("netcdf") + depends_on ("netcdf-cxx4") #depends_on ("numdiff") #FIXME depends_on ("oce") depends_on ("p4est") @@ -50,7 +51,7 @@ class Dealii(Package): '-DHDF5_DIR=%s' % spec['hdf5'].prefix, '-DMETIS_DIR=%s' % spec['metis'].prefix, '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - '-DNETCDF_DIR=%s' % spec['netcdf'].prefix, + '-DNETCDF_DIR=%s' % spec['netcdf-cxx4'].prefix, '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DPETSC_DIR=%s' % spec['petsc'].prefix, @@ -65,3 +66,36 @@ class Dealii(Package): make() make("test") make("install") + + # run some MPI examples with different solvers from PETSc and Trilinos + env['DEAL_II_DIR'] = prefix + # take bare-bones step-3 + with working_dir('examples/step-3'): + cmake('.') + make('release') + make('run',parallel=False) + + # take step-40 which can use both PETSc and Trilinos + # FIXME: switch step-40 to MPI run + with working_dir('examples/step-40'): + # list the number of cycles to speed up + filter_file(r'(const unsigned int n_cycles = 8;)', ('const unsigned int n_cycles = 2;'), 'step-40.cc') + cmake('.') + make('release') + make('run',parallel=False) + + # change Linear Algebra to Trilinos + filter_file(r'(#define USE_PETSC_LA.*)', (''), 'step-40.cc') + make('release') + make('run',parallel=False) + + with working_dir('examples/step-36'): + cmake('.') + make('release') + make('run',parallel=False) + + with working_dir('examples/step-54'): + cmake('.') + make('release') + # FIXME + # make('run',parallel=False) -- cgit v1.2.3-60-g2f50 From 5695e4c03d6c98fc187ec405923cd1dcf2fbdff6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 27 Mar 2016 15:37:52 -0500 Subject: Wrap the long description of an environment module so it is more readable. --- lib/spack/spack/modules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d45fdde703..f6a11c92e3 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -278,6 +278,6 @@ class TclModule(EnvModule): # Long description if self.long_description: module_file.write('proc ModulesHelp { } {\n') - doc = re.sub(r'"', '\"', self.long_description) - module_file.write("puts stderr \"%s\"\n" % doc) + for line in textwrap.wrap(self.long_description, 72): + module_file.write("puts stderr \"%s\"\n" % line) module_file.write('}\n\n') -- cgit v1.2.3-60-g2f50 From fc73e93b50a708ecfa2395a636bc32161c9d3051 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 23:47:43 +0200 Subject: rework netcdf --- var/spack/repos/builtin/packages/dealii/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 1d4c800288..baedd155ef 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -1,5 +1,5 @@ from spack import * -import shutil +import sys class Dealii(Package): """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" @@ -39,6 +39,7 @@ class Dealii(Package): if word.startswith('-DCMAKE_BUILD_TYPE'): options.remove(word) + dsuf = 'dylib' if sys.platform == 'darwin' else 'so' options.extend([ '-DCMAKE_BUILD_TYPE=DebugRelease', '-DDEAL_II_WITH_THREADS:BOOL=ON' @@ -51,7 +52,14 @@ class Dealii(Package): '-DHDF5_DIR=%s' % spec['hdf5'].prefix, '-DMETIS_DIR=%s' % spec['metis'].prefix, '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - '-DNETCDF_DIR=%s' % spec['netcdf-cxx4'].prefix, + # since Netcdf is spread among two, need to do it by hand: + '-DNETCDF_FOUND=true', + '-DNETCDF_LIBRARIES=%s;%s' % + (join_path(spec['netcdf-cxx4'].prefix.lib,'libnetcdf_c++4.%s' % dsuf), + join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), + '-DNETCDF_INCLUDE_DIRS=%s;%s' % + (spec['netcdf-cxx4'].prefix.include, + spec['netcdf'].prefix.include), '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DPETSC_DIR=%s' % spec['petsc'].prefix, -- cgit v1.2.3-60-g2f50 From e0f463c4f99e4808b5647a2abae915ce0cb80561 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sun, 27 Mar 2016 23:56:41 +0200 Subject: uninstall : added recursive option --- lib/spack/spack/cmd/uninstall.py | 151 ++++++++++++++++++++++++++------------- 1 file changed, 101 insertions(+), 50 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 350ef372cb..8da0fe1c4a 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -23,19 +23,24 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from __future__ import print_function -import sys + import argparse +import sys import llnl.util.tty as tty -from llnl.util.tty.colify import colify - import spack import spack.cmd import spack.repository from spack.cmd.find import display_specs from spack.package import PackageStillNeededError -description="Remove an installed package" +description = "Remove an installed package" + +error_message = """You can either: + a) Use a more specific spec, or + b) use spack uninstall -a to uninstall ALL matching specs. +""" + def setup_parser(subparser): subparser.add_argument( @@ -44,10 +49,81 @@ def setup_parser(subparser): subparser.add_argument( '-a', '--all', action='store_true', dest='all', help="USE CAREFULLY. Remove ALL installed packages that match each " + - "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + - "libelf are uninstalled. This is both useful and dangerous, like rm -r.") + "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + + "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( - 'packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") + '-r', '--recursive', action='store_true', dest='recursive', + help='Uninstall all the packages that depends on the ones for which we required explicit removal.' + + ) + subparser.add_argument('packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") + + +def concretize_specs(specs, allow_multiple_matches=False, force=False): + """ + Returns a list of specs matching the non necessarily concretized specs given from cli + + Args: + specs: list of specs to be matched against installed packages + allow_multiple_matches : boolean (if True multiple matches for each item in specs are admitted) + + Return: + list of specs + """ + specs_from_cli = [] # List of specs that match expressions given via command line + has_errors = False + for spec in specs: + matching = spack.installed_db.query(spec) + # For each spec provided, make sure it refers to only one package. + # Fail and ask user to be unambiguous if it doesn't + if not allow_multiple_matches and len(matching) > 1: + tty.error("%s matches multiple packages:" % spec) + print() + display_specs(matching, long=True) + print() + has_errors = True + + # No installed package matches the query + if len(matching) == 0 and not force: + tty.error("%s does not match any installed packages." % spec) + has_errors = True + + specs_from_cli.extend(matching) + if has_errors: + tty.die(error_message) + + return specs_from_cli + + +def installed_dependents(specs): + dependents = {} + for item in specs: + lst = [x for x in item.package.installed_dependents if x not in specs] + if lst: + dependents[item] = lst + return dependents + + +def do_uninstall(specs, force): + specs = list(set(specs)) # Make specs unique + packages = [] + for item in specs: + try: + # should work if package is known to spack + packages.append(item.package) + except spack.repository.UnknownPackageError as e: + # The package.py file has gone away -- but still + # want to uninstall. + spack.Package(item).do_uninstall(force=True) + + # Sort packages to be uninstalled by the number of installed dependents + # This ensures we do things in the right order + def num_installed_deps(pkg): + return len(pkg.installed_dependents) + + packages.sort(key=num_installed_deps) + for item in packages: + item.do_uninstall(force=force) def uninstall(parser, args): @@ -56,50 +132,25 @@ def uninstall(parser, args): with spack.installed_db.write_transaction(): specs = spack.cmd.parse_specs(args.packages) + # Gets the list of installed specs that match the ones give via cli + uninstall_list = concretize_specs(specs, args.all, args.force) # takes care of '-a' is given in the cli + dependent_list = installed_dependents(uninstall_list) # takes care of '-r' - # For each spec provided, make sure it refers to only one package. - # Fail and ask user to be unambiguous if it doesn't - pkgs = [] - for spec in specs: - matching_specs = spack.installed_db.query(spec) - if not args.all and len(matching_specs) > 1: - tty.error("%s matches multiple packages:" % spec) - print() - display_specs(matching_specs, long=True) - print() - print("You can either:") - print(" a) Use a more specific spec, or") - print(" b) use spack uninstall -a to uninstall ALL matching specs.") - sys.exit(1) - - if len(matching_specs) == 0: - if args.force: continue - tty.die("%s does not match any installed packages." % spec) - - for s in matching_specs: - try: - # should work if package is known to spack - pkgs.append(s.package) - except spack.repository.UnknownPackageError as e: - # The package.py file has gone away -- but still - # want to uninstall. - spack.Package(s).do_uninstall(force=True) - - # Sort packages to be uninstalled by the number of installed dependents - # This ensures we do things in the right order - def num_installed_deps(pkg): - return len(pkg.installed_dependents) - pkgs.sort(key=num_installed_deps) - - # Uninstall packages in order now. - for pkg in pkgs: - try: - pkg.do_uninstall(force=args.force) - except PackageStillNeededError as e: - tty.error("Will not uninstall %s" % e.spec.format("$_$@$%@$#", color=True)) + # There are dependents but recursive uninstall wasn't a requirement + has_error = False + if dependent_list and not args.recursive and not args.force: + for spec, lst in dependent_list.items(): + tty.error("Will not uninstall %s" % spec.format("$_$@$%@$#", color=True)) print('') print("The following packages depend on it:") - display_specs(e.dependents, long=True) + display_specs(lst, long=True) print('') - print("You can use spack uninstall -f to force this action.") - sys.exit(1) + has_error = True + elif args.recursive: + for key, lst in dependent_list.items(): + uninstall_list.extend(lst) + + if has_error: + tty.die('You can use spack uninstall -f to force this action') + # Uninstall everything on the list + do_uninstall(uninstall_list, args.force) -- cgit v1.2.3-60-g2f50 From ccd155572fc8ef066b93424e90a74f9bb8fcf435 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 27 Mar 2016 18:18:54 -0400 Subject: Removed redundant package py-libxml2. Use libxml2 instead. --- var/spack/repos/builtin/packages/py-libxml2/package.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-libxml2/package.py diff --git a/var/spack/repos/builtin/packages/py-libxml2/package.py b/var/spack/repos/builtin/packages/py-libxml2/package.py deleted file mode 100644 index 59005428e4..0000000000 --- a/var/spack/repos/builtin/packages/py-libxml2/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyLibxml2(Package): - """A Python wrapper around libxml2.""" - homepage = "https://xmlsoft.org/python.html" - url = "ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz" - - version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3') - - extends('python') - depends_on('libxml2') - depends_on('libxslt') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From 7eca1284c81c3efc5a87b8a174a0974811656b3e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 08:59:25 +0200 Subject: metis/parmetis/boost/oce/scalapack: correct install_name on Darwin via a global function. --- lib/spack/llnl/util/filesystem.py | 30 ++++++++++++- var/spack/repos/builtin/packages/boost/package.py | 50 ++++++++++++---------- var/spack/repos/builtin/packages/metis/package.py | 6 ++- .../builtin/packages/netlib-scalapack/package.py | 5 +++ var/spack/repos/builtin/packages/oce/package.py | 6 ++- .../repos/builtin/packages/parmetis/package.py | 6 ++- 6 files changed, 76 insertions(+), 27 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index c4665c284c..46ca03bec4 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -27,9 +27,10 @@ __all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree' 'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file', 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', 'set_executable', 'copy_mode', 'unset_executable_mode', - 'remove_dead_links', 'remove_linked_tree'] + 'remove_dead_links', 'remove_linked_tree', 'fix_darwin_install_name'] import os +import glob import sys import re import shutil @@ -38,6 +39,7 @@ import errno import getpass from contextlib import contextmanager, closing from tempfile import NamedTemporaryFile +import subprocess import llnl.util.tty as tty from spack.util.compression import ALLOWED_ARCHIVE_TYPES @@ -392,3 +394,29 @@ def remove_linked_tree(path): os.unlink(path) else: shutil.rmtree(path, True) + +def fix_darwin_install_name(path): + """ + Fix install name of dynamic libraries on Darwin to have full path. + There are two parts of this task: + (i) use install_name('-id',...) to change install name of a single lib; + (ii) use install_name('-change',...) to change the cross linking between libs. + The function assumes that all libraries are in one folder and currently won't + follow subfolders. + + Args: + path: directory in which .dylib files are alocated + + """ + libs = glob.glob(join_path(path,"*.dylib")) + for lib in libs: + # fix install name first: + subprocess.Popen(["install_name_tool", "-id",lib,lib], stdout=subprocess.PIPE).communicate()[0] + long_deps = subprocess.Popen(["otool", "-L",lib], stdout=subprocess.PIPE).communicate()[0].split('\n') + deps = [dep.partition(' ')[0][1::] for dep in long_deps[2:-1]] + # fix all dependencies: + for dep in deps: + for loc in libs: + if dep == os.path.basename(loc): + subprocess.Popen(["install_name_tool", "-change",dep,loc,lib], stdout=subprocess.PIPE).communicate()[0] + break diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index fb1f5daee7..82ce6fbb74 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -1,5 +1,6 @@ from spack import * import spack +import sys class Boost(Package): """Boost provides free peer-reviewed portable C++ source @@ -45,34 +46,34 @@ class Boost(Package): version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') - default_install_libs = set(['atomic', - 'chrono', - 'date_time', - 'filesystem', + default_install_libs = set(['atomic', + 'chrono', + 'date_time', + 'filesystem', 'graph', 'iostreams', 'locale', 'log', - 'math', + 'math', 'program_options', - 'random', - 'regex', - 'serialization', - 'signals', - 'system', - 'test', - 'thread', + 'random', + 'regex', + 'serialization', + 'signals', + 'system', + 'test', + 'thread', 'wave']) - # mpi/python are not installed by default because they pull in many - # dependencies and/or because there is a great deal of customization + # mpi/python are not installed by default because they pull in many + # dependencies and/or because there is a great deal of customization # possible (and it would be difficult to choose sensible defaults) default_noinstall_libs = set(['mpi', 'python']) all_libs = default_install_libs | default_noinstall_libs for lib in all_libs: - variant(lib, default=(lib not in default_noinstall_libs), + variant(lib, default=(lib not in default_noinstall_libs), description="Compile with {0} library".format(lib)) variant('debug', default=False, description='Switch to the debug version of Boost') @@ -124,9 +125,9 @@ class Boost(Package): with open('user-config.jam', 'w') as f: compiler_wrapper = join_path(spack.build_env_path, 'c++') - f.write("using {0} : : {1} ;\n".format(boostToolsetId, + f.write("using {0} : : {1} ;\n".format(boostToolsetId, compiler_wrapper)) - + if '+mpi' in spec: f.write('using mpi : %s ;\n' % join_path(spec['mpi'].prefix.bin, 'mpicxx')) @@ -155,7 +156,7 @@ class Boost(Package): linkTypes = ['static'] if '+shared' in spec: linkTypes.append('shared') - + threadingOpts = [] if '+multithreaded' in spec: threadingOpts.append('multi') @@ -163,12 +164,12 @@ class Boost(Package): threadingOpts.append('single') if not threadingOpts: raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled") - + options.extend([ 'toolset=%s' % self.determine_toolset(spec), 'link=%s' % ','.join(linkTypes), '--layout=tagged']) - + return threadingOpts def install(self, spec, prefix): @@ -177,14 +178,14 @@ class Boost(Package): if "+{0}".format(lib) in spec: withLibs.append(lib) if not withLibs: - # if no libraries are specified for compilation, then you dont have + # if no libraries are specified for compilation, then you dont have # to configure/build anything, just copy over to the prefix directory. src = join_path(self.stage.source_path, 'boost') mkdirp(join_path(prefix, 'include')) dst = join_path(prefix, 'include', 'boost') install_tree(src, dst) return - + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' @@ -207,4 +208,7 @@ class Boost(Package): # Boost.MPI if the threading options are not separated. for threadingOpt in threadingOpts: b2('install', 'threading=%s' % threadingOpt, *b2_options) - + + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 68b9f6fd30..9301135f9f 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 +import glob,sys class Metis(Package): """ @@ -90,3 +90,7 @@ class Metis(Package): fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) for f in fs: install(f, GKlib_dist) + + # The shared library is not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index c3e6822cdf..d59f8e41fe 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -41,6 +41,11 @@ class NetlibScalapack(Package): make() make("install") + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) + + def setup_dependent_package(self, module, dependent_spec): spec = self.spec lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 06acb96736..4d5081ac9d 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -1,5 +1,5 @@ from spack import * -import platform +import platform, sys class Oce(Package): """ @@ -45,3 +45,7 @@ class Oce(Package): cmake('.', *options) make("install/strip") + + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin'): + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index f5b8b6de91..ff4370aa4b 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -24,7 +24,7 @@ ############################################################################## from spack import * - +import sys class Parmetis(Package): """ @@ -83,3 +83,7 @@ class Parmetis(Package): cmake(source_directory, *options) make() make("install") + + # The shared library is not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-60-g2f50 From 3bd550d6a2ceb279743aae626c6a3a614519d2f5 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 27 Mar 2016 18:27:06 -0400 Subject: GEOS Python extension did not compile with Python3. --- var/spack/repos/builtin/packages/geos/package.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py index 4a2657e32f..030703f286 100644 --- a/var/spack/repos/builtin/packages/geos/package.py +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -1,4 +1,5 @@ from spack import * +import os class Geos(Package): """GEOS (Geometry Engine - Open Source) is a C++ port of the Java @@ -10,6 +11,10 @@ class Geos(Package): homepage = "http://trac.osgeo.org/geos/" url = "http://download.osgeo.org/geos/geos-3.4.2.tar.bz2" + # Verison 3.5.0 supports Autotools and CMake + version('3.5.0', '136842690be7f504fba46b3c539438dd') + + # Versions through 3.4.2 have CMake, but only Autotools is supported version('3.4.2', 'fc5df2d926eb7e67f988a43a92683bae') version('3.4.1', '4c930dec44c45c49cd71f3e0931ded7e') version('3.4.0', 'e41318fc76b5dc764a69d43ac6b18488') @@ -21,11 +26,22 @@ class Geos(Package): version('3.3.4', '1bb9f14d57ef06ffa41cb1d67acb55a1') version('3.3.3', '8454e653d7ecca475153cc88fd1daa26') - extends('python') - depends_on('swig') +# # Python3 is not supported. +# variant('python', default=False, description='Enable Python support') + +# extends('python', when='+python') +# depends_on('python', when='+python') +# depends_on('swig', when='+python') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-python") + args = ["--prefix=%s" % prefix] +# if '+python' in spec: +# os.environ['PYTHON'] = join_path(spec['python'].prefix, 'bin', +# 'python' if spec['python'].version[:1][0] <= 2 else 'python3') +# os.environ['SWIG'] = join_path(spec['swig'].prefix, 'bin', 'swig') +# +# args.append("--enable-python") + + configure(*args) make() make("install") -- cgit v1.2.3-60-g2f50 From 9c894f59354bafd9cd45e874be599dc8535e426e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 10:19:25 +0200 Subject: new package: netcdf-cxx --- var/spack/repos/builtin/packages/netcdf-cxx/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/netcdf-cxx/package.py diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py new file mode 100644 index 0000000000..5334dfb853 --- /dev/null +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -0,0 +1,15 @@ +from spack import * + +class NetcdfCxx(Package): + """C++ compatibility bindings for NetCDF""" + homepage = "http://www.unidata.ucar.edu/software/netcdf" + url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" + + version('4.2', 'd32b20c00f144ae6565d9e98d9f6204c') + + depends_on('netcdf') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-60-g2f50 From 97cdd7947894b3b631e2a209f0573ed839eb7b8a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 10:49:20 +0200 Subject: fix netcdf --- var/spack/repos/builtin/packages/dealii/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index baedd155ef..486aa6e4a4 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -19,7 +19,7 @@ class Dealii(Package): depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis") depends_on ("muparser") - depends_on ("netcdf-cxx4") + depends_on ("netcdf-cxx") #depends_on ("numdiff") #FIXME depends_on ("oce") depends_on ("p4est") @@ -55,10 +55,10 @@ class Dealii(Package): # since Netcdf is spread among two, need to do it by hand: '-DNETCDF_FOUND=true', '-DNETCDF_LIBRARIES=%s;%s' % - (join_path(spec['netcdf-cxx4'].prefix.lib,'libnetcdf_c++4.%s' % dsuf), + (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), '-DNETCDF_INCLUDE_DIRS=%s;%s' % - (spec['netcdf-cxx4'].prefix.include, + (spec['netcdf-cxx'].prefix.include, spec['netcdf'].prefix.include), '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, -- cgit v1.2.3-60-g2f50 From e00cab75bd6721ac49bb6199d77ad99df80556a9 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 12:12:55 +0200 Subject: more elaborated tests/direct solvers --- var/spack/repos/builtin/packages/dealii/package.py | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 486aa6e4a4..9ac1572b95 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -77,7 +77,13 @@ class Dealii(Package): # run some MPI examples with different solvers from PETSc and Trilinos env['DEAL_II_DIR'] = prefix + print('=====================================') + print('============ EXAMPLES ===============') + print('=====================================') # take bare-bones step-3 + print('=====================================') + print('============ Step-3 =================') + print('=====================================') with working_dir('examples/step-3'): cmake('.') make('release') @@ -86,22 +92,56 @@ class Dealii(Package): # take step-40 which can use both PETSc and Trilinos # FIXME: switch step-40 to MPI run with working_dir('examples/step-40'): + print('=====================================') + print('========== Step-40 PETSc ============') + print('=====================================') # list the number of cycles to speed up filter_file(r'(const unsigned int n_cycles = 8;)', ('const unsigned int n_cycles = 2;'), 'step-40.cc') cmake('.') make('release') make('run',parallel=False) + print('=====================================') + print('========= Step-40 Trilinos ==========') + print('=====================================') # change Linear Algebra to Trilinos - filter_file(r'(#define USE_PETSC_LA.*)', (''), 'step-40.cc') + filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') make('release') make('run',parallel=False) + print('=====================================') + print('=== Step-40 Trilinos SuperluDist ====') + print('=====================================') + # change to direct solvers + filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') + filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)', (''), 'step-40.cc') + filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', (''), 'step-40.cc') + filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', (''), 'step-40.cc') + filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') + filter_file(r'(preconditioner\);)', (''), 'step-40.cc') + + make('release') + make('run',paralle=False) + + print('=====================================') + print('====== Step-40 Trilinos MUMPS =======') + print('=====================================') + # switch to Mumps + filter_file(r'(Amesos_Superludist)', ('Amesos_Mumps'), 'step-40.cc') + make('release') + make('run',parallel=False) + + print('=====================================') + print('============ Step-36 ================') + print('=====================================') with working_dir('examples/step-36'): cmake('.') make('release') make('run',parallel=False) + print('=====================================') + print('============ Step-54 ================') + print('=====================================') with working_dir('examples/step-54'): cmake('.') make('release') -- cgit v1.2.3-60-g2f50 From f3dd889d4462d14c9f0233540bccbf6a9720bcf0 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Mar 2016 03:51:05 -0700 Subject: Fix bug with lib64 RPATH setting in cc. --- lib/spack/env/cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index c6a09724e9..17740250d1 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -293,9 +293,9 @@ for dep in "${deps[@]}"; do if [[ -d $dep/lib64 ]]; then # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then - args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + args=("-L$dep/lib64" "-Wl,-rpath,$dep/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + args=("-L$dep/lib64" "-rpath" "$dep/lib64" "${args[@]}") fi fi done -- cgit v1.2.3-60-g2f50 From d8579a5b80efd8b09e5332a922dee533f2a0a55e Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Mar 2016 03:51:41 -0700 Subject: Simplify cc: Remove old logic and add better tests. - removed a lot of old logic that was only still needed for tests. - Added better unit tests for dependency RPATH, -L, and -I args - tests now check whether the compiler omits -I args in link mode. --- lib/spack/env/cc | 138 +++++---------------------------------------- lib/spack/spack/test/cc.py | 127 +++++++++++++++++++++++++++++++++++------ 2 files changed, 123 insertions(+), 142 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 17740250d1..4217159a25 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -114,7 +114,9 @@ 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 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 for arg in "$@"; do if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then @@ -125,7 +127,6 @@ if [ -z "$mode" ]; then fi # Finish setting up the mode. - if [ -z "$mode" ]; then mode=ccld for arg in "$@"; do @@ -162,127 +163,18 @@ fi input_command="$@" args=("$@") -# Dump parsed values for unit testing if asked for -if [[ -n $SPACK_TEST_COMMAND ]]; then - - # - # Now do real parsing of the command line args, trying hard to keep - # non-rpath linker arguments in the proper order w.r.t. other command line - # arguments. This is important for things like groups. - # - includes=() - libraries=() - libs=() - rpaths=() - other_args=() - - while [ -n "$1" ]; do - case "$1" in - -I*) - arg="${1#-I}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - includes+=("$arg") - ;; - -L*) - arg="${1#-L}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libraries+=("$arg") - ;; - -l*) - arg="${1#-l}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libs+=("$arg") - ;; - -Wl,*) - arg="${1#-Wl,}" - # TODO: Handle multiple -Wl, continuations of -Wl,-rpath - if [[ $arg == -rpath=* ]]; then - arg="${arg#-rpath=}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath,* ]]; then - arg="${arg#-rpath,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath ]]; then - shift; arg="$1" - if [[ $arg != '-Wl,'* ]]; then - die "-Wl,-rpath was not followed by -Wl,*" - fi - arg="${arg#-Wl,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - else - other_args+=("-Wl,$arg") - fi - ;; - -Xlinker) - shift; arg="$1"; - if [[ $arg = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath ]]; then - shift; arg="$1" - if [[ $arg != -Xlinker ]]; then - die "-Xlinker -rpath was not followed by -Xlinker " - fi - shift; arg="$1" - rpaths+=("$arg") - else - other_args+=("-Xlinker") - other_args+=("$arg") - fi - ;; - *) - other_args+=("$1") - ;; - esac - shift - done - - IFS=$'\n' - case "$SPACK_TEST_COMMAND" in - dump-includes) echo "${includes[*]}";; - dump-libraries) echo "${libraries[*]}";; - dump-libs) echo "${libs[*]}";; - dump-rpaths) echo "${rpaths[*]}";; - dump-other-args) echo "${other_args[*]}";; - dump-all) - echo "INCLUDES:" - echo "${includes[*]}" - echo - echo "LIBRARIES:" - echo "${libraries[*]}" - echo - echo "LIBS:" - echo "${libs[*]}" - echo - echo "RPATHS:" - echo "${rpaths[*]}" - echo - echo "ARGS:" - echo "${other_args[*]}" - ;; - *) - die "ERROR: Unknown test command" - ;; - esac - exit -fi - # Read spack dependencies from the path environment variable 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 args=("-I$dep/include" "${args[@]}") fi fi + # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then - # libraries+=("$dep/lib") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then @@ -290,8 +182,8 @@ for dep in "${deps[@]}"; do fi fi + # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then - # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then args=("-L$dep/lib64" "-Wl,-rpath,$dep/lib64" "${args[@]}") elif [[ $mode = ld ]]; then @@ -302,18 +194,8 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-Wl,-rpath,$dir" "${args[@]}") - # fi - # done args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-rpath" "$dir" "${args[@]}") - # fi - # done args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -345,6 +227,14 @@ export PATH full_command=("$command" "${args[@]}") +# In test command mode, write out full command for Spack tests. +if [[ $SPACK_TEST_COMMAND = dump-args ]]; then + echo "${full_command[@]}" + exit +elif [[ -n $SPACK_TEST_COMMAND ]]; then + die "ERROR: Unknown test command" +fi + # # Write the input and output commands to debug logs if it's asked for. # diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index f3f6d4a22e..0b1aeb2a8f 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -28,6 +28,8 @@ arguments correctly. """ import os import unittest +import tempfile +import shutil from llnl.util.filesystem import * import spack @@ -55,13 +57,40 @@ class CompilerTest(unittest.TestCase): self.ld = Executable(join_path(spack.build_env_path, "ld")) self.cpp = Executable(join_path(spack.build_env_path, "cpp")) - os.environ['SPACK_CC'] = "/bin/mycc" - os.environ['SPACK_PREFIX'] = "/usr" + self.realcc = "/bin/mycc" + self.prefix = "/spack-test-prefix" + + os.environ['SPACK_CC'] = self.realcc + os.environ['SPACK_PREFIX'] = self.prefix os.environ['SPACK_ENV_PATH']="test" os.environ['SPACK_DEBUG_LOG_DIR'] = "." os.environ['SPACK_COMPILER_SPEC'] = "gcc@4.4.7" os.environ['SPACK_SHORT_SPEC'] = "foo@1.2" + # Make some fake dependencies + self.tmp_deps = tempfile.mkdtemp() + self.dep1 = join_path(self.tmp_deps, 'dep1') + self.dep2 = join_path(self.tmp_deps, 'dep2') + self.dep3 = join_path(self.tmp_deps, 'dep3') + self.dep4 = join_path(self.tmp_deps, 'dep4') + + mkdirp(join_path(self.dep1, 'include')) + mkdirp(join_path(self.dep1, 'lib')) + + mkdirp(join_path(self.dep2, 'lib64')) + + mkdirp(join_path(self.dep3, 'include')) + mkdirp(join_path(self.dep3, 'lib64')) + + mkdirp(join_path(self.dep4, 'include')) + + if 'SPACK_DEPENDENCIES' in os.environ: + del os.environ['SPACK_DEPENDENCIES'] + + + def tearDown(self): + shutil.rmtree(self.tmp_deps, True) + def check_cc(self, command, args, expected): os.environ['SPACK_TEST_COMMAND'] = command @@ -92,6 +121,10 @@ class CompilerTest(unittest.TestCase): self.check_cpp('dump-mode', [], "cpp") + def test_as_mode(self): + self.check_cc('dump-mode', ['-S'], "as") + + def test_ccld_mode(self): self.check_cc('dump-mode', [], "ccld") self.check_cc('dump-mode', ['foo.c', '-o', 'foo'], "ccld") @@ -104,27 +137,85 @@ class CompilerTest(unittest.TestCase): self.check_ld('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath,foo'], "ld") - def test_includes(self): - self.check_cc('dump-includes', test_command, - "\n".join(["/test/include", "/other/include"])) + def test_dep_rpath(self): + """Ensure RPATHs for root package are added.""" + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + ' '.join(test_command)) + + + def test_dep_include(self): + """Ensure a single dependency include directory is added.""" + os.environ['SPACK_DEPENDENCIES'] = self.dep4 + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-I' + self.dep4 + '/include ' + + ' '.join(test_command)) + + + def test_dep_lib(self): + """Ensure a single dependency RPATH is added.""" + os.environ['SPACK_DEPENDENCIES'] = self.dep2 + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-L' + self.dep2 + '/lib64 ' + + '-Wl,-rpath,' + self.dep2 + '/lib64 ' + + ' '.join(test_command)) + + + def test_all_deps(self): + """Ensure includes and RPATHs for all deps are added. """ + os.environ['SPACK_DEPENDENCIES'] = ':'.join([ + self.dep1, self.dep2, self.dep3, self.dep4]) + + # This is probably more constrained than it needs to be; it + # checks order within prepended args and doesn't strictly have + # to. We could loosen that if it becomes necessary + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + + '-I' + self.dep4 + '/include ' + + + '-L' + self.dep3 + '/lib64 ' + + '-Wl,-rpath,' + self.dep3 + '/lib64 ' + + '-I' + self.dep3 + '/include ' + + + '-L' + self.dep2 + '/lib64 ' + + '-Wl,-rpath,' + self.dep2 + '/lib64 ' + + + '-L' + self.dep1 + '/lib ' + + '-Wl,-rpath,' + self.dep1 + '/lib ' + + '-I' + self.dep1 + '/include ' + + + ' '.join(test_command)) - def test_libraries(self): - self.check_cc('dump-libraries', test_command, - "\n".join(["/test/lib", "/other/lib"])) + def test_ld_deps(self): + """Ensure no (extra) -I args or -Wl, are passed in ld mode.""" + os.environ['SPACK_DEPENDENCIES'] = ':'.join([ + self.dep1, self.dep2, self.dep3, self.dep4]) + self.check_ld('dump-args', test_command, + 'ld ' + + '-rpath ' + self.prefix + '/lib ' + + '-rpath ' + self.prefix + '/lib64 ' + - def test_libs(self): - self.check_cc('dump-libs', test_command, - "\n".join(["lib1", "lib2", "lib3", "lib4"])) + '-L' + self.dep3 + '/lib64 ' + + '-rpath ' + self.dep3 + '/lib64 ' + + '-L' + self.dep2 + '/lib64 ' + + '-rpath ' + self.dep2 + '/lib64 ' + - def test_rpaths(self): - self.check_cc('dump-rpaths', test_command, - "\n".join(["/first/rpath", "/second/rpath", "/third/rpath", "/fourth/rpath"])) + '-L' + self.dep1 + '/lib ' + + '-rpath ' + self.dep1 + '/lib ' + + ' '.join(test_command)) - def test_other_args(self): - self.check_cc('dump-other-args', test_command, - "\n".join(["arg1", "-Wl,--start-group", "arg2", "arg3", "arg4", - "-Wl,--end-group", "arg5", "arg6"])) -- cgit v1.2.3-60-g2f50 From 0da545ecac1c57a04abf814c9fed4f9929726ff5 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 13:16:08 +0200 Subject: tell amesos that we use mumps 5 --- var/spack/repos/builtin/packages/trilinos/package.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 6608f64ea7..90b7bff149 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -6,6 +6,9 @@ import os, sys, glob # https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package # https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh # https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb +# and some relevant documentation/examples: +# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html +# https://github.com/trilinos/Trilinos/issues/175 class Trilinos(Package): """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. @@ -46,7 +49,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+metis') - depends_on('mumps+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') @@ -67,6 +70,7 @@ class Trilinos(Package): def install(self, spec, prefix): self.variants_check() + cxx_flags = [] options = [] options.extend(std_cmake_args) @@ -91,7 +95,6 @@ class Trilinos(Package): '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTrilinos_CXX11_FLAGS=-std=c++11', '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON' @@ -154,6 +157,10 @@ class Trilinos(Package): '-DTPL_ENABLE_SCALAPACK:BOOL=ON', '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) + # see https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS + cxx_flags.extend([ + '-DMUMPS_5_0' + ]) else: options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=OFF', @@ -194,6 +201,10 @@ class Trilinos(Package): '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' ]) + # collect CXX flags: + options.extend([ + '-DCMAKE_CXX_FLAGS:STRING=%s' % (' '.join(cxx_flags)), + ]) # disable due to compiler / config errors: options.extend([ -- cgit v1.2.3-60-g2f50 From 5eefca43e75d2df1c2f859d199f7bb37e7142993 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 14:35:01 +0200 Subject: petsc: extend variants by mumps, complex and debug --- var/spack/repos/builtin/packages/petsc/package.py | 33 ++++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 3dd117eed1..dd3d2aa162 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -17,14 +17,17 @@ class Petsc(Package): version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') version('3.4.4', '7edbc68aa6d8d6a3295dd5f6c2f6979d') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('mpi', default=True, description='Activates MPI support') - variant('double', default=True, description='Switches between single and double precision') - - variant('metis', default=True, description='Activates support for metis and parmetis') - variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)') - variant('boost', default=True, description='Activates support for Boost') - variant('hypre', default=True, description='Activates support for Hypre') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('mpi', default=True, description='Activates MPI support') + variant('double', default=True, description='Switches between single and double precision') + variant('complex', default=False, description='Build with complex numbers') + variant('debug', default=False, description='Compile in debug mode') + + variant('metis', default=True, description='Activates support for metis and parmetis') + variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)') + variant('boost', default=True, description='Activates support for Boost') + variant('hypre', default=True, description='Activates support for Hypre (only parallel)') + variant('mumps', default=True, description='Activates support for MUMPS (only parallel)') # Virtual dependencies depends_on('blas') @@ -40,7 +43,10 @@ class Petsc(Package): depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') - depends_on('hypre', when='+hypre+mpi') + depends_on('hypre', when='+hypre+mpi~complex') # Hypre does not support complex numbers + + depends_on('mumps+mpi', when='+mumps+mpi') + depends_on('scalapack', when='+mumps+mpi') def mpi_dependent_options(self): if '~mpi' in self.spec: @@ -55,7 +61,7 @@ class Petsc(Package): # If mpi is disabled (~mpi), it's an error to have any of these enabled. # This generates a list of any such errors. errors = [error_message_fmt.format(library=x) - for x in ('hdf5', 'hypre', 'parmetis') + for x in ('hdf5', 'hypre', 'parmetis','mumps') if ('+'+x) in self.spec] if errors: errors = ['incompatible variants given'] + errors @@ -77,16 +83,17 @@ class Petsc(Package): return compiler_opts def install(self, spec, prefix): - options = ['--with-debugging=0', - '--with-ssl=0'] + options = ['--with-ssl=0'] options.extend(self.mpi_dependent_options()) options.extend([ '--with-precision=%s' % ('double' if '+double' in spec else 'single'), + '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), '--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'), + '--with-debugging=%s' % ('1' if '+debug' in spec else '0'), '--with-blas-lapack-dir=%s' % spec['lapack'].prefix ]) # Activates library support if needed - for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis'): + for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis','mumps','scalapack'): options.append( '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) ) -- cgit v1.2.3-60-g2f50 From dd60cc326c12bfa8434b68afec72f4b68c18a94c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 17:52:22 +0200 Subject: adopt modifed superlu and hypre --- var/spack/repos/builtin/packages/trilinos/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 90b7bff149..b2dc8df0ea 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -52,7 +52,7 @@ class Trilinos(Package): depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') - depends_on('hypre',when='+hypre') + depends_on('hypre~internal-superlu',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') depends_on('python',when='+python') # Needs py-numpy activated @@ -179,7 +179,7 @@ class Trilinos(Package): options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ -- cgit v1.2.3-60-g2f50 From 207215980b05e4916e05ded8b05044b3edbe92c0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 17:54:27 +0200 Subject: make hypre and hdf5 be ON/OFF --- var/spack/repos/builtin/packages/trilinos/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b2dc8df0ea..eb3bd1e0ee 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -96,8 +96,8 @@ class Trilinos(Package): '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DTPL_ENABLE_HYPRE:BOOL=ON', - '-DTPL_ENABLE_HDF5:BOOL=ON' + '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'),, + '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), ]) # Fortran lib -- cgit v1.2.3-60-g2f50 From 4e87cf9d7492133d30675a64703b91ec6992ca00 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 18:00:34 +0200 Subject: fix extra comma --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index eb3bd1e0ee..71c0be61c3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -96,7 +96,7 @@ class Trilinos(Package): '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'),, + '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'), '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), ]) -- cgit v1.2.3-60-g2f50 From 09e77812b67d92094bea8dae54617e3e02ebaa61 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 17:49:20 +0200 Subject: fix installation of superlu_dist headers and add it as a dependency to petsc; add a variant to hypre to disable internal superlu --- var/spack/repos/builtin/packages/hypre/package.py | 5 +++++ var/spack/repos/builtin/packages/petsc/package.py | 21 ++++++++++++++++++--- .../repos/builtin/packages/superlu-dist/package.py | 11 ++++++----- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 8d93d48d1f..0e99553293 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -14,6 +14,8 @@ class Hypre(Package): # hypre does not know how to build shared libraries on Darwin variant('shared', default=sys.platform!='darwin', description="Build shared library version (disables static library)") + # SuperluDist have conflicting headers with those in Hypre + variant('internal-superlu', default=True, description="Use internal Superlu routines") depends_on("mpi") depends_on("blas") @@ -38,6 +40,9 @@ class Hypre(Package): if '+shared' in self.spec: configure_args.append("--enable-shared") + if '~internal-superlu' in self.spec: + configure_args.append("--without-superlu") + # Hypre's source is staged under ./src so we'll have to manually # cd into it. with working_dir("src"): diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index dd3d2aa162..e9b7c8a732 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -28,6 +28,7 @@ class Petsc(Package): variant('boost', default=True, description='Activates support for Boost') variant('hypre', default=True, description='Activates support for Hypre (only parallel)') variant('mumps', default=True, description='Activates support for MUMPS (only parallel)') + variant('superlu-dist', default=True, description='Activates support for SuperluDist (only parallel)') # Virtual dependencies depends_on('blas') @@ -43,8 +44,11 @@ class Petsc(Package): depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') - depends_on('hypre', when='+hypre+mpi~complex') # Hypre does not support complex numbers - + # Hypre does not support complex numbers. + # Also PETSc prefer to build it without internal superlu, likely due to conflict in headers + # see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py + depends_on('hypre~internal-superlu', when='+hypre+mpi~complex') + depends_on('superlu-dist', when='+superlu-dist+mpi') depends_on('mumps+mpi', when='+mumps+mpi') depends_on('scalapack', when='+mumps+mpi') @@ -61,7 +65,7 @@ class Petsc(Package): # If mpi is disabled (~mpi), it's an error to have any of these enabled. # This generates a list of any such errors. errors = [error_message_fmt.format(library=x) - for x in ('hdf5', 'hypre', 'parmetis','mumps') + for x in ('hdf5', 'hypre', 'parmetis','mumps','superlu-dist') if ('+'+x) in self.spec] if errors: errors = ['incompatible variants given'] + errors @@ -101,6 +105,17 @@ class Petsc(Package): options.append( '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) ) + # PETSc does not pick up SuperluDist from the dir as they look for superlu_dist_4.1.a + if 'superlu-dist' in spec: + options.extend([ + '--with-superlu_dist-include=%s' % spec['superlu-dist'].prefix.include, + '--with-superlu_dist-lib=%s' % join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'), + '--with-superlu_dist=1' + ]) + else: + options.append( + '--with-superlu_dist=0' + ) configure('--prefix=%s' % prefix, *options) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 9a94de8ba5..ddcb7f9225 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -1,4 +1,5 @@ from spack import * +import glob class SuperluDist(Package): """A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines.""" @@ -52,13 +53,13 @@ class SuperluDist(Package): # system "make" # need to install by hand - headers_location = join_path(self.prefix.include,'superlu_dist') + headers_location = self.prefix.include mkdirp(headers_location) mkdirp(prefix.lib) - # FIXME: fetch all headers in the folder automatically - for header in ['Cnames.h','cublas_utils.h','dcomplex.h','html_mainpage.h','machines.h','old_colamd.h','psymbfact.h','superlu_ddefs.h','superlu_defs.h','superlu_enum_consts.h','superlu_zdefs.h','supermatrix.h','util_dist.h']: - superludist_header = join_path(self.stage.source_path, 'SRC/',header) - install(superludist_header, headers_location) + + headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h')) + for h in headers: + install(h,headers_location) superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a') install(superludist_lib,self.prefix.lib) -- cgit v1.2.3-60-g2f50 From 1141f1195572a81cb98e5fa439db6860fd326d43 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 29 Mar 2016 00:28:02 +0200 Subject: uninstall : added user confirmation --- lib/spack/spack/cmd/uninstall.py | 47 +++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 8da0fe1c4a..7183817908 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -24,15 +24,14 @@ ############################################################################## from __future__ import print_function -import argparse import sys +import argparse import llnl.util.tty as tty import spack import spack.cmd import spack.repository from spack.cmd.find import display_specs -from spack.package import PackageStillNeededError description = "Remove an installed package" @@ -41,6 +40,16 @@ error_message = """You can either: b) use spack uninstall -a to uninstall ALL matching specs. """ +def ask_for_confirmation(message): + while True: + tty.msg(message + '[y/n]') + choice = raw_input().lower() + if choice == 'y': + break + elif choice == 'n': + sys.exit(1) + tty.warning('Please reply either "y" or "n"') + def setup_parser(subparser): subparser.add_argument( @@ -53,7 +62,11 @@ def setup_parser(subparser): "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( '-r', '--recursive', action='store_true', dest='recursive', - help='Uninstall all the packages that depends on the ones for which we required explicit removal.' + help='Also uninstall any packages that depend on the ones given via command line.' + ) + subparser.add_argument( + '-y', '--yes-to-all', action='store_true', dest='yes_to_all', + help='Assume "yes" is the answer to every confirmation asked to the user.' ) subparser.add_argument('packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") @@ -96,6 +109,15 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False): def installed_dependents(specs): + """ + Returns a dictionary that maps a spec with a list of its installed dependents + + Args: + specs: list of specs to be checked for dependents + + Returns: + dictionary of installed dependents + """ dependents = {} for item in specs: lst = [x for x in item.package.installed_dependents if x not in specs] @@ -105,7 +127,13 @@ def installed_dependents(specs): def do_uninstall(specs, force): - specs = list(set(specs)) # Make specs unique + """ + Uninstalls all the specs in a list. + + Args: + specs: list of specs to be uninstalled + force: force uninstallation (boolean) + """ packages = [] for item in specs: try: @@ -136,7 +164,7 @@ def uninstall(parser, args): uninstall_list = concretize_specs(specs, args.all, args.force) # takes care of '-a' is given in the cli dependent_list = installed_dependents(uninstall_list) # takes care of '-r' - # There are dependents but recursive uninstall wasn't a requirement + # Process dependent_list and update uninstall_list has_error = False if dependent_list and not args.recursive and not args.force: for spec, lst in dependent_list.items(): @@ -149,8 +177,17 @@ def uninstall(parser, args): elif args.recursive: for key, lst in dependent_list.items(): uninstall_list.extend(lst) + uninstall_list = list(set(uninstall_list)) if has_error: tty.die('You can use spack uninstall -f to force this action') + + if not args.yes_to_all: + tty.msg("The following packages will be uninstalled : ") + print('') + display_specs(uninstall_list, long=True) + print('') + ask_for_confirmation('Do you want to proceed ? ') + # Uninstall everything on the list do_uninstall(uninstall_list, args.force) -- cgit v1.2.3-60-g2f50 From a14527ec0619151d6defc909a46aefd2a9378cb7 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Mar 2016 15:34:25 -0700 Subject: Add command to compiler input log. --- 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 4217159a25..68cd8514f4 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -241,7 +241,7 @@ fi 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 "$input_command" >> $input_log + echo "$command $input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-60-g2f50 From f9bcce6a683b1d948190b9927254e3ee29d3606c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:19:24 +0200 Subject: turn off python by default --- var/spack/repos/builtin/packages/trilinos/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 71c0be61c3..0ab4addd52 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -31,7 +31,8 @@ class Trilinos(Package): variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') - variant('python', default=True, description='Build python wrappers') + # not everyone has py-numpy activated, keep it disabled by default to avoid configure errors + variant('python', default=False, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') @@ -55,7 +56,7 @@ class Trilinos(Package): depends_on('hypre~internal-superlu',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') - depends_on('python',when='+python') # Needs py-numpy activated + depends_on('python',when='+python') patch('umfpack_from_suitesparse.patch') -- cgit v1.2.3-60-g2f50 From 7753d823cbe1d1983957fb948bf095d624d76b7c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:27:55 +0200 Subject: add a comment on static mumps --- var/spack/repos/builtin/packages/trilinos/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0ab4addd52..6223848c68 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -7,7 +7,6 @@ import os, sys, glob # https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh # https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb # and some relevant documentation/examples: -# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html # https://github.com/trilinos/Trilinos/issues/175 class Trilinos(Package): """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented @@ -50,7 +49,14 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+metis') - depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + # Trilinos' Tribits config system is limited which makes it + # very tricky to link Amesos with static MUMPS, see + # https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html + # One could work it out by getting linking flags from mpif90 --showme:link (or alike) + # and adding results to -DTrilinos_EXTRA_LINK_FLAGS + # together with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and + # it may work at the end. But let's avoid all this by simply using shared libs + depends_on('mumps@5.0:+mpi+shared',when='+mumps') depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre~internal-superlu',when='+hypre') -- cgit v1.2.3-60-g2f50 From 63c3feb79e7e4022e5565deb9f2749fa9732e7d2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:41:57 +0200 Subject: minor fixes to hypre and muparser on Linux --- var/spack/repos/builtin/packages/hypre/package.py | 3 +++ var/spack/repos/builtin/packages/muparser/package.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 0e99553293..4b915daa68 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -42,6 +42,9 @@ class Hypre(Package): if '~internal-superlu' in self.spec: configure_args.append("--without-superlu") + # MLI and FEI do not build without superlu on Linux + configure_args.append("--without-mli") + configure_args.append("--without-fei") # Hypre's source is staged under ./src so we'll have to manually # cd into it. diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py index a1a9ff90e5..19ca8ce287 100644 --- a/var/spack/repos/builtin/packages/muparser/package.py +++ b/var/spack/repos/builtin/packages/muparser/package.py @@ -14,5 +14,5 @@ class Muparser(Package): configure(*options) - make() + make(parallel=False) make("install") -- cgit v1.2.3-60-g2f50 From f80e839ff48809a5ba8b7343d2378133a3fbce82 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 29 Mar 2016 02:58:05 -0700 Subject: Handle Darwin's ld -r option properly - ld -r doesn't work with RPATH on OS X. - for GNU ld, the -r option only means 'relocatable', and doesn't affect RPATH. - This adds special handling to omit RPATHs for ld -r on OS X --- lib/spack/env/cc | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 68cd8514f4..2eb6f46afe 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -85,6 +85,10 @@ done # 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 cc|c89|c99|gcc|clang|icc|pgcc|xlc) @@ -108,6 +112,17 @@ case "$command" in ;; 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" @@ -176,27 +191,31 @@ for dep in "${deps[@]}"; do # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then if [[ $mode = ccld ]]; then - args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + $add_rpaths && args=("-Wl,-rpath,$dep/lib" "${args[@]}") + args=("-L$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}") + args=("-L$dep/lib" "${args[@]}") fi fi # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then if [[ $mode = ccld ]]; then - args=("-L$dep/lib64" "-Wl,-rpath,$dep/lib64" "${args[@]}") + $add_rpaths && args=("-Wl,-rpath,$dep/lib64" "${args[@]}") + args=("-L$dep/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-L$dep/lib64" "-rpath" "$dep/lib64" "${args[@]}") + $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}") + args=("-L$dep/lib64" "${args[@]}") fi fi done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then - args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi # @@ -241,8 +260,8 @@ fi 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 "$command $input_command" >> $input_log - echo "$mode ${full_command[@]}" >> $output_log + echo "[$mode] $command $input_command" >> $input_log + echo "[$mode] ${full_command[@]}" >> $output_log fi exec "${full_command[@]}" -- cgit v1.2.3-60-g2f50 From ccc1b23bea57a9c8a31ab1f4e9b739b54440466b Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 28 Mar 2016 16:28:29 -0500 Subject: this allows gcc4.9.3 to build on OSX10 --- .../builtin/packages/gcc/darwin/gcc-4.9.patch1 | 42 ++++++++++++++++++++++ .../builtin/packages/gcc/darwin/gcc-4.9.patch2 | 28 +++++++++++++++ var/spack/repos/builtin/packages/gcc/package.py | 12 ++++++- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 create mode 100644 var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 diff --git a/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 new file mode 100644 index 0000000000..444e292786 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 @@ -0,0 +1,42 @@ +diff --git a/gcc/configure b/gcc/configure +index 9523773..52b0bf7 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -24884,7 +24884,7 @@ if test "${gcc_cv_as_ix86_filds+set}" = set; then : + else + gcc_cv_as_ix86_filds=no + if test x$gcc_cv_as != x; then +- $as_echo 'filds mem; fists mem' > conftest.s ++ $as_echo 'filds (%ebp); fists (%ebp)' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +@@ -24915,7 +24915,7 @@ if test "${gcc_cv_as_ix86_fildq+set}" = set; then : + else + gcc_cv_as_ix86_fildq=no + if test x$gcc_cv_as != x; then +- $as_echo 'fildq mem; fistpq mem' > conftest.s ++ $as_echo 'fildq (%ebp); fistpq (%ebp)' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 68b0ee8..bd53978 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -3869,13 +3869,13 @@ foo: nop + + gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], + gcc_cv_as_ix86_filds,,, +- [filds mem; fists mem],, ++ [filds (%ebp); fists (%ebp)],, + [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, + [Define if your assembler uses filds and fists mnemonics.])]) + + gcc_GAS_CHECK_FEATURE([fildq and fistpq mnemonics], + gcc_cv_as_ix86_fildq,,, +- [fildq mem; fistpq mem],, ++ [fildq (%ebp); fistpq (%ebp)],, + [AC_DEFINE(HAVE_AS_IX86_FILDQ, 1, + [Define if your assembler uses fildq and fistq mnemonics.])]) + diff --git a/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 new file mode 100644 index 0000000000..b065997f45 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 @@ -0,0 +1,28 @@ +From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001 +From: Iain Sandoe +Date: Sat, 21 Dec 2013 00:30:18 +0000 +Subject: [PATCH] don't try to mark local symbols as no-dead-strip + +--- + gcc/config/darwin.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c +index 40804b8..0080299 100644 +--- a/gcc/config/darwin.c ++++ b/gcc/config/darwin.c +@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) + void + darwin_mark_decl_preserved (const char *name) + { ++ /* Actually we shouldn't mark any local symbol this way, but for now ++ this only happens with ObjC meta-data. */ ++ if (darwin_label_is_anonymous_local_objc_name (name)) ++ return; ++ + fprintf (asm_out_file, "\t.no_dead_strip "); + assemble_name (asm_out_file, name); + fputc ('\n', asm_out_file); +-- +2.2.1 + diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 232d0020df..6043b62279 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -27,6 +27,7 @@ from spack import * from contextlib import closing from glob import glob import sys +import os class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -63,6 +64,9 @@ class Gcc(Package): # TODO: integrate these libraries. #depends_on("ppl") #depends_on("cloog") + if sys.platform == 'darwin': + patch('darwin/gcc-4.9.patch1', when='@4.9.3') + patch('darwin/gcc-4.9.patch2', when='@4.9.3') def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. @@ -70,6 +74,7 @@ class Gcc(Package): string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) + if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': enabled_languages.add('go') @@ -101,12 +106,17 @@ class Gcc(Package): isl_options = ["--with-isl=%s" % spec['isl'].prefix] options.extend(isl_options) + if sys.platform == 'darwin' : + darwin_options = [ "--with-build-config=bootstrap-debug" ] + options.extend(darwin_options) + build_dir = join_path(self.stage.path, 'spack-build') configure = Executable( join_path(self.stage.source_path, 'configure') ) with working_dir(build_dir, create=True): # Rest of install is straightforward. configure(*options) - make() + if sys.platform == 'darwin' : make("bootstrap") + else: make() make("install") self.write_rpath_specs() -- cgit v1.2.3-60-g2f50 From dfc5cf288c1017ef62390489cb534848aef5a9a6 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 29 Mar 2016 04:35:41 -0700 Subject: Fix bug in restage - Restage previously only removed the source directory from the stage. - Now removes any other directories in stage as well. --- lib/spack/spack/fetch_strategy.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0d0a7db8a9..4ea87bea7e 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -289,8 +289,14 @@ class URLFetchStrategy(FetchStrategy): if not self.archive_file: raise NoArchiveFileError("Tried to reset URLFetchStrategy before fetching", "Failed on reset() for URL %s" % self.url) - if self.stage.source_path: - shutil.rmtree(self.stage.source_path, ignore_errors=True) + + # Remove everythigng but the archive from the stage + for filename in os.listdir(self.stage.path): + abspath = os.path.join(self.stage.path, filename) + if abspath != self.archive_file: + shutil.rmtree(abspath, ignore_errors=True) + + # Expand the archive again self.expand() def __repr__(self): -- cgit v1.2.3-60-g2f50 From 653d7c52574b7a6e3795fb3beeeee553bd76b293 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 29 Mar 2016 17:28:46 +0200 Subject: uninstall : minor fixes --- lib/spack/spack/cmd/uninstall.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 7183817908..72ad132112 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -40,6 +40,7 @@ error_message = """You can either: b) use spack uninstall -a to uninstall ALL matching specs. """ + def ask_for_confirmation(message): while True: tty.msg(message + '[y/n]') @@ -122,6 +123,7 @@ def installed_dependents(specs): for item in specs: lst = [x for x in item.package.installed_dependents if x not in specs] if lst: + lst = list(set(lst)) dependents[item] = lst return dependents -- cgit v1.2.3-60-g2f50 From ad402ff85bc4150aa49fb394929b062b40b27604 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 21 Mar 2016 22:36:31 +0100 Subject: astyle@2.04: add new package --- var/spack/repos/builtin/packages/astyle/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/astyle/package.py diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py new file mode 100644 index 0000000000..7260fd74a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -0,0 +1,17 @@ +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.""" + homepage = "http://astyle.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz" + + version('2.04', '30b1193a758b0909d06e7ee8dd9627f6') + + def install(self, spec, prefix): + + with working_dir('src'): + make('-f', + join_path(self.stage.source_path,'build','clang','Makefile'), + parallel=False) + install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) -- cgit v1.2.3-60-g2f50 From d96ea5ba0075c63e8cd042337a1d99225b92b2d5 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 29 Mar 2016 12:20:11 -0500 Subject: add modules package and have setup script find it if built --- share/spack/setup-env.sh | 10 +++++++++ .../repos/builtin/packages/modules/package.py | 25 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 var/spack/repos/builtin/packages/modules/package.py diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..529517ff83 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -176,3 +176,13 @@ _spack_pathadd PATH "${_sp_prefix%/}/bin" _sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') _spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" + +# +# Use spack built modules package if available +# for system that does not have it +# + +_modules_install_path=$(command spack location -i modules) +if [ -n "$_modules_install_path" ] ; then + . $_modules_install_path/Modules/init/sh +fi diff --git a/var/spack/repos/builtin/packages/modules/package.py b/var/spack/repos/builtin/packages/modules/package.py new file mode 100644 index 0000000000..b014ee460c --- /dev/null +++ b/var/spack/repos/builtin/packages/modules/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Modules(Package): + """ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. """ + + homepage = "http://modules.sf.net" + url = "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz" + + version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') + + depends_on("tcl") + + def install(self, spec, prefix): + + options = ['--prefix=%s' % prefix, + '--disable-debug', + '--disable-dependency-tracking', + '--disable-silent-rules', + '--disable-versioning', + '--datarootdir=%s' % prefix.share, + 'CPPFLAGS=-DUSE_INTERP_ERRORLINE'] + + configure(*options) + make() + make("install") -- cgit v1.2.3-60-g2f50 From 4ddba5f7edd97c8c17781368edc5b9a0db74417d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 29 Mar 2016 14:47:16 -0500 Subject: Add CUDA and HOOMD-blue packages --- var/spack/repos/builtin/packages/cuda/package.py | 42 ++++++++++++++ .../repos/builtin/packages/hoomd-blue/package.py | 67 ++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cuda/package.py create mode 100644 var/spack/repos/builtin/packages/hoomd-blue/package.py diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py new file mode 100644 index 0000000000..547b43d6d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -0,0 +1,42 @@ +from spack import * +from glob import glob +import os + +class Cuda(Package): + """CUDA is a parallel computing platform and programming model invented by + NVIDIA. It enables dramatic increases in computing performance by harnessing + the power of the graphics processing unit (GPU). + + Note: NVIDIA does not provide a download URL for CUDA so you will need to + download it yourself. Go to https://developer.nvidia.com/cuda-downloads + and select your Operating System, Architecture, Distribution, and Version. + For the Installer Type, select runfile and click Download. Spack will search + your current directory for this file. Alternatively, add this file to a + mirror so that Spack can find it. For instructions on how to set up a mirror, + see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "http://www.nvidia.com/object/cuda_home_new.html" + url = "file://%s/cuda_7.5.18_linux.run" % os.getcwd() + + version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False) + + def install(self, spec, prefix): + runfile = glob(os.path.join(self.stage.path, 'cuda*.run'))[0] + chmod = which('chmod') + chmod('+x', runfile) + runfile = which(runfile) + + # Note: NVIDIA does not officially support many newer versions of compilers. + # For example, on CentOS 6, you must use GCC 4.4.7 or older. + # The --override flag disables these checks. See: + # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements + # for details. + + runfile( + '--silent', # disable interactive prompts + '--verbose', # create verbose log file + '--override', # ignore compiler checks + '--toolkit', # install CUDA Toolkit + '--toolkitpath=%s' % prefix + ) + diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py new file mode 100644 index 0000000000..97ce9c0cf0 --- /dev/null +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -0,0 +1,67 @@ +from spack import * +import os + +class HoomdBlue(Package): + """HOOMD-blue is a general-purpose particle simulation toolkit. It scales + from a single CPU core to thousands of GPUs. + + You define particle initial conditions and interactions in a high-level + python script. Then tell HOOMD-blue how you want to execute the job and it + takes care of the rest. Python job scripts give you unlimited flexibility + to create custom initialization routines, control simulation parameters, + and perform in situ analysis.""" + + homepage = "https://codeblue.umich.edu/hoomd-blue/index.html" + url = "https://bitbucket.org/glotzer/hoomd-blue/get/v1.3.3.tar.bz2" + + version('1.3.3', '1469ef4531dc14b579c0acddbfe6a273') + + variant('mpi', default=False, description='Compile with MPI enabled') + variant('cuda', default=False, description='Compile with CUDA Toolkit') + variant('doc', default=False, description='Generate documentation') + + extends('python') + depends_on('py-numpy') + depends_on('boost+python') + depends_on('cmake') + depends_on('mpi', when='+mpi') + depends_on('cuda', when='+cuda') + depends_on('doxygen', when='+doc') + + def install(self, spec, prefix): + + cmake_args = [ + '-DPYTHON_EXECUTABLE=%s/python' % spec['python'].prefix.bin, + '-DBOOST_ROOT=%s' % spec['boost' ].prefix + ] + + # MPI support + if '+mpi' in spec: + os.environ['MPI_HOME'] = spec['mpi'].prefix + cmake_args.append('-DENABLE_MPI=ON') + else: + cmake_args.append('-DENABLE_MPI=OFF') + + # CUDA support + if '+cuda' in spec: + cmake_args.append('-DENABLE_CUDA=ON') + else: + cmake_args.append('-DENABLE_CUDA=OFF') + + # CUDA-aware MPI library support + if '+cuda' in spec and '+mpi' in spec: + cmake_args.append('-DENABLE_MPI_CUDA=ON') + else: + cmake_args.append('-DENABLE_MPI_CUDA=OFF') + + # Documentation + if '+doc' in spec: + cmake_args.append('-DENABLE_DOXYGEN=ON') + else: + cmake_args.append('-DENABLE_DOXYGEN=OFF') + + cmake_args.extend(std_cmake_args) + cmake('.', *cmake_args) + + make() + make("install") -- cgit v1.2.3-60-g2f50 From abee9c83b440b8341be6df1f07c7c5f1bef9dd89 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Tue, 29 Mar 2016 17:26:34 -0400 Subject: Removed googletest FIXME... --- var/spack/repos/builtin/packages/googletest/package.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index ed27afa10c..663b758747 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -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 googletest -# -# You can always get back here to change things with: -# -# spack edit googletest -# -# See the spack documentation for more information on building -# packages. -# from spack import * class Googletest(Package): -- cgit v1.2.3-60-g2f50 From a4eff6de3faa3624a529015ea4cf5ebb1af41484 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 29 Mar 2016 17:10:49 -0600 Subject: + New version of cmake (3.5.1). --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 1f93d39769..91a4e3b415 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -30,6 +30,7 @@ class Cmake(Package): homepage = 'https://www.cmake.org' url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + version('3.5.1', 'ca051f4a66375c89d1a524e726da0296') version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e') version('3.4.3', '4cb3ff35b2472aae70f542116d616e63') version('3.4.0', 'cd3034e0a44256a0917e254167217fc8') -- cgit v1.2.3-60-g2f50 From 98bb151d85fc35389e0b76eaac90448fa688aa6c Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Tue, 29 Mar 2016 20:25:56 -0700 Subject: updated geos version --- var/spack/repos/builtin/packages/dbus/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 294b0de54e..422f5a19eb 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -13,6 +13,7 @@ class Dbus(Package): homepage = "http://dbus.freedesktop.org/" url = "http://dbus.freedesktop.org/releases/dbus/dbus-1.8.8.tar.gz" + version('1.11.2', '957a07f066f3730d2bb3ea0932f0081b') version('1.9.0', 'ec6895a4d5c0637b01f0d0e7689e2b36') version('1.8.8', 'b9f4a18ee3faa1e07c04aa1d83239c43') version('1.8.6', '6a08ba555d340e9dfe2d623b83c0eea8') -- cgit v1.2.3-60-g2f50 From 5b6eefbf0417668c19e4c898c31cf56764d5bc2b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 11:30:35 +0200 Subject: add variants and extra dependencies --- var/spack/repos/builtin/packages/dealii/package.py | 176 ++++++++++++++++----- 1 file changed, 140 insertions(+), 36 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 9ac1572b95..396601356c 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -8,27 +8,48 @@ class Dealii(Package): version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') - depends_on ("cmake") + variant('mpi', default=True, description='Compile with MPI') + variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') + variant('doxygen', default=True, description='Compile with Doxygen documentation') + variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') + variant('metis', default=True, description='Compile with Metis or ParMetis') + variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') + variant('oce', default=True, description='Compile with OCE') + variant('p4est', default=True, description='Compile with P4est (only with MPI)') + variant('petsc', default=True, description='Compile with Petsc (only with MPI)') + variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') + variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') + + # required dependencies, light version depends_on ("blas") + depends_on ("boost", when='~mpi') + depends_on ("boost+mpi", when='+mpi') + depends_on ("bzip2") + depends_on ("cmake") depends_on ("lapack") - depends_on ("mpi") - - depends_on ("arpack-ng+mpi") - depends_on ("boost") - depends_on ("doxygen") - depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? - depends_on ("metis") depends_on ("muparser") - depends_on ("netcdf-cxx") - #depends_on ("numdiff") #FIXME - depends_on ("oce") - depends_on ("p4est") - depends_on ("parmetis") - depends_on ("petsc+mpi") - depends_on ("slepc") depends_on ("suite-sparse") depends_on ("tbb") - depends_on ("trilinos") + depends_on ("zlib") + + # optional dependencies + depends_on ("mpi", when="+mpi") + depends_on ("arpack-ng+mpi", when='+arpack+mpi') + depends_on ("doxygen", when='+doxygen') + depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? + depends_on ("metis", when='+metis') + depends_on ("netcdf+mpi", when="+netcdf+mpi") + depends_on ("netcdf-cxx", when='+netcdf+mpi') + depends_on ("oce", when='+oce') + depends_on ("p4est", when='+p4est+mpi') + depends_on ("parmetis", when='+metis+mpi') + depends_on ("petsc+mpi", when='+petsc+mpi') + depends_on ("slepc", when='+slepc+petsc+mpi') + depends_on ("trilinos", when='+trilinos+mpi') + + # developer dependnecies + #depends_on ("numdiff") #FIXME + #depends_on ("astyle") #FIXME def install(self, spec, prefix): options = [] @@ -42,33 +63,116 @@ class Dealii(Package): dsuf = 'dylib' if sys.platform == 'darwin' else 'so' options.extend([ '-DCMAKE_BUILD_TYPE=DebugRelease', - '-DDEAL_II_WITH_THREADS:BOOL=ON' - '-DDEAL_II_WITH_MPI:BOOL=ON', - '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names - '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, + '-DDEAL_II_COMPONENT_EXAMPLES=ON', + '-DDEAL_II_WITH_THREADS:BOOL=ON', '-DBOOST_DIR=%s' % spec['boost'].prefix, - '-DHDF5_DIR=%s' % spec['hdf5'].prefix, - '-DMETIS_DIR=%s' % spec['metis'].prefix, + '-DBZIP2_DIR=%s' % spec['bzip2'].prefix, + # CMake's FindBlas/Lapack may pickup system's blas/lapack instead of Spack's. + # Be more specific to avoid this. + # Note that both lapack and blas are provided in -DLAPACK_XYZ variables + '-DLAPACK_FOUND=true', + '-DLAPACK_INCLUDE_DIRS=%s;%s' % + (spec['lapack'].prefix.include, + spec['blas'].prefix.include), + '-DLAPACK_LIBRARIES=%s;%s' % + (join_path(spec['lapack'].prefix.lib,'liblapack.%s' % dsuf), # FIXME don't hardcode names + join_path(spec['blas'].prefix.lib,'libblas.%s' % dsuf)), # FIXME don't hardcode names '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - # since Netcdf is spread among two, need to do it by hand: - '-DNETCDF_FOUND=true', - '-DNETCDF_LIBRARIES=%s;%s' % - (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), - join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), - '-DNETCDF_INCLUDE_DIRS=%s;%s' % - (spec['netcdf-cxx'].prefix.include, - spec['netcdf'].prefix.include), - '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, - '-DPETSC_DIR=%s' % spec['petsc'].prefix, - '-DSLEPC_DIR=%s' % spec['slepc'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, - '-DTRILINOS_DIR=%s' % spec['trilinos'].prefix + '-DZLIB_DIR=%s' % spec['zlib'].prefix ]) + # MPI + if '+mpi' in spec: + options.extend([ + '-DDEAL_II_WITH_MPI:BOOL=ON', + '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names + '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + ]) + else: + options.extend([ + '-DDEAL_II_WITH_MPI:BOOL=OFF', + ]) + + # Optional dependencies for which librariy names are the same as CMake variables + for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis','parmetis'): + if library in spec: + options.extend([ + '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), + '-DDEAL_II_WITH_{library}:BOOL=ON'.format(library=library.upper()) + ]) + else: + options.extend([ + '-DDEAL_II_WITH_{library}:BOOL=OFF'.format(library=library.upper()) + ]) + + # doxygen + options.extend([ + '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doxygen' in spec else 'OFF'), + ]) + + + # arpack + if '+arpack' in spec: + options.extend([ + '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, + '-DDEAL_II_WITH_ARPACK=ON', + '-DDEAL_II_ARPACK_WITH_PARPACK=ON' + ]) + else: + options.extend([ + '-DDEAL_II_WITH_ARPACK=OFF' + ]) + + # # metis + # if '+metis' in spec: + # + # if 'mpi' in spec: + # options.extend([ + # '-DMETIS_DIR=%s' % spec['parmetis'].prefix, + # ]) + # else: + # options.extend([ + # '-DMETIS_DIR=%s' % spec['metis'].prefix, + # ]) + # options.extend([ + # '-DDEAL_II_WITH_METIS=ON' + # ]) + # else: + # options.extend([ + # '-DDEAL_II_WITH_METIS=OFF' + # ]) + + # since Netcdf is spread among two, need to do it by hand: + if '+netcdf' in spec: + options.extend([ + '-DNETCDF_FOUND=true', + '-DNETCDF_LIBRARIES=%s;%s' % + (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), + join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), + '-DNETCDF_INCLUDE_DIRS=%s;%s' % + (spec['netcdf-cxx'].prefix.include, + spec['netcdf'].prefix.include), + ]) + else: + options.extend([ + '-DDEAL_II_WITH_NETCDF=OFF' + ]) + + # Open Cascade + if '+oce' in spec: + options.extend([ + '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, + '-DDEAL_II_WITH_OPENCASCADE=ON' + ]) + else: + options.extend([ + '-DDEAL_II_WITH_OPENCASCADE=OFF' + ]) + cmake('.', *options) make() -- cgit v1.2.3-60-g2f50 From bafc6cebe1ca37116badc1baf60e88564eb01614 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 12:00:21 +0200 Subject: doxygen off by default --- var/spack/repos/builtin/packages/dealii/package.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 396601356c..907aa33356 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -8,17 +8,17 @@ class Dealii(Package): version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') - variant('mpi', default=True, description='Compile with MPI') - variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') - variant('doxygen', default=True, description='Compile with Doxygen documentation') - variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') - variant('metis', default=True, description='Compile with Metis or ParMetis') - variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') - variant('oce', default=True, description='Compile with OCE') - variant('p4est', default=True, description='Compile with P4est (only with MPI)') - variant('petsc', default=True, description='Compile with Petsc (only with MPI)') - variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') - variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') + variant('mpi', default=True, description='Compile with MPI') + variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') + variant('doxygen', default=False, description='Compile with Doxygen documentation') + variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') + variant('metis', default=True, description='Compile with Metis or ParMetis') + variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') + variant('oce', default=True, description='Compile with OCE') + variant('p4est', default=True, description='Compile with P4est (only with MPI)') + variant('petsc', default=True, description='Compile with Petsc (only with MPI)') + variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') + variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') # required dependencies, light version depends_on ("blas") -- cgit v1.2.3-60-g2f50 From 9e9f5d01ad43e9b00262a12d1fd1225ac368581d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 11:59:13 +0200 Subject: doxygen: add missing dependencies --- var/spack/repos/builtin/packages/doxygen/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index 3d4a4e47a7..3a1deba9e1 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -4,6 +4,7 @@ #------------------------------------------------------------------------------ from spack import * +import sys class Doxygen(Package): """Doxygen is the de facto standard tool for generating documentation @@ -17,6 +18,10 @@ class Doxygen(Package): version('1.8.10', '79767ccd986f12a0f949015efb5f058f') depends_on("cmake@2.8.12:") + # flex does not build on OSX, but it's provided there anyway + depends_on("flex", sys.platform != 'darwin') + depends_on("bison", sys.platform != 'darwin') + def install(self, spec, prefix): cmake('.', *std_cmake_args) -- cgit v1.2.3-60-g2f50 From 2abdd71b414b4f551e927edb7304b4dcc053d09e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 15:19:29 +0200 Subject: add dev version and conditionals for tests; remove parmetis --- var/spack/repos/builtin/packages/dealii/package.py | 62 +++++++++------------- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 907aa33356..32dfb33c6d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -7,12 +7,13 @@ class Dealii(Package): url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz" version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') + version('dev', git='https://github.com/dealii/dealii.git') variant('mpi', default=True, description='Compile with MPI') variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') variant('doxygen', default=False, description='Compile with Doxygen documentation') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') - variant('metis', default=True, description='Compile with Metis or ParMetis') + variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') variant('oce', default=True, description='Compile with OCE') variant('p4est', default=True, description='Compile with P4est (only with MPI)') @@ -42,7 +43,6 @@ class Dealii(Package): depends_on ("netcdf-cxx", when='+netcdf+mpi') depends_on ("oce", when='+oce') depends_on ("p4est", when='+p4est+mpi') - depends_on ("parmetis", when='+metis+mpi') depends_on ("petsc+mpi", when='+petsc+mpi') depends_on ("slepc", when='+slepc+petsc+mpi') depends_on ("trilinos", when='+trilinos+mpi') @@ -98,7 +98,7 @@ class Dealii(Package): ]) # Optional dependencies for which librariy names are the same as CMake variables - for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis','parmetis'): + for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis'): if library in spec: options.extend([ '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), @@ -127,25 +127,6 @@ class Dealii(Package): '-DDEAL_II_WITH_ARPACK=OFF' ]) - # # metis - # if '+metis' in spec: - # - # if 'mpi' in spec: - # options.extend([ - # '-DMETIS_DIR=%s' % spec['parmetis'].prefix, - # ]) - # else: - # options.extend([ - # '-DMETIS_DIR=%s' % spec['metis'].prefix, - # ]) - # options.extend([ - # '-DDEAL_II_WITH_METIS=ON' - # ]) - # else: - # options.extend([ - # '-DDEAL_II_WITH_METIS=OFF' - # ]) - # since Netcdf is spread among two, need to do it by hand: if '+netcdf' in spec: options.extend([ @@ -202,16 +183,18 @@ class Dealii(Package): # list the number of cycles to speed up filter_file(r'(const unsigned int n_cycles = 8;)', ('const unsigned int n_cycles = 2;'), 'step-40.cc') cmake('.') - make('release') - make('run',parallel=False) + if '^petsc' in spec: + make('release') + make('run',parallel=False) print('=====================================') print('========= Step-40 Trilinos ==========') print('=====================================') # change Linear Algebra to Trilinos filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') - make('release') - make('run',parallel=False) + if '^trilinos+hypre' in spec: + make('release') + make('run',parallel=False) print('=====================================') print('=== Step-40 Trilinos SuperluDist ====') @@ -223,31 +206,34 @@ class Dealii(Package): filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', (''), 'step-40.cc') filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') filter_file(r'(preconditioner\);)', (''), 'step-40.cc') - - make('release') - make('run',paralle=False) + if '^trilinos+superlu-dist' in spec: + make('release') + make('run',paralle=False) print('=====================================') print('====== Step-40 Trilinos MUMPS =======') print('=====================================') # switch to Mumps filter_file(r'(Amesos_Superludist)', ('Amesos_Mumps'), 'step-40.cc') - make('release') - make('run',parallel=False) + if '^trilinos+mumps' in spec: + make('release') + make('run',parallel=False) print('=====================================') print('============ Step-36 ================') print('=====================================') with working_dir('examples/step-36'): - cmake('.') - make('release') - make('run',parallel=False) + if 'slepc' in spec: + cmake('.') + make('release') + make('run',parallel=False) print('=====================================') print('============ Step-54 ================') print('=====================================') with working_dir('examples/step-54'): - cmake('.') - make('release') - # FIXME - # make('run',parallel=False) + if 'oce' in spec: + cmake('.') + make('release') + if sys.platform != 'darwin': #FIXME + make('run',parallel=False) -- cgit v1.2.3-60-g2f50 From dd1c667d8d5d260146f81b0b90ad52c41160208e Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 30 Mar 2016 16:10:20 +0200 Subject: uninstall : changed error message --- lib/spack/spack/cmd/uninstall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 72ad132112..7aadd254e8 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -182,7 +182,7 @@ def uninstall(parser, args): uninstall_list = list(set(uninstall_list)) if has_error: - tty.die('You can use spack uninstall -f to force this action') + tty.die('You can use spack uninstall -r to uninstall these dependencies as well') if not args.yes_to_all: tty.msg("The following packages will be uninstalled : ") -- cgit v1.2.3-60-g2f50 From 5b1ef64e31a56877f6859820ca7a79dd51f6fe84 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 09:33:00 -0600 Subject: + Provide basic instructions for providing subversion w/o additional language bindings. --- .../packages/apr-util/apr-util.new/package.py | 44 ------------- .../repos/builtin/packages/apr-util/package.py | 44 +++++++++++++ .../repos/builtin/packages/apr/apr.new/package.py | 51 -------------- var/spack/repos/builtin/packages/apr/package.py | 38 +++++++++++ .../repos/builtin/packages/subversion/package.py | 77 ++++++++++++++++++++++ .../packages/subversion/subversion.new/package.py | 59 ----------------- 6 files changed, 159 insertions(+), 154 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py create mode 100644 var/spack/repos/builtin/packages/apr-util/package.py delete mode 100644 var/spack/repos/builtin/packages/apr/apr.new/package.py create mode 100644 var/spack/repos/builtin/packages/apr/package.py create mode 100644 var/spack/repos/builtin/packages/subversion/package.py delete mode 100644 var/spack/repos/builtin/packages/subversion/subversion.new/package.py diff --git a/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py b/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py deleted file mode 100644 index 8f19c84d22..0000000000 --- a/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# 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 Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class AprUtil(Package): - """Apache Portable Runtime Utility""" - homepage = 'https://apr.apache.org/' - url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz' - - version('1.5.4', '866825c04da827c6e5f53daff5569f42') - - depends_on('apr') - - def install(self, spec, prefix): - - # configure, build, install: - options = ['--prefix=%s' % prefix] - options.append('--with-apr=%s' % spec['apr'].prefix) - - configure(*options) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py new file mode 100644 index 0000000000..8f19c84d22 --- /dev/null +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class AprUtil(Package): + """Apache Portable Runtime Utility""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz' + + version('1.5.4', '866825c04da827c6e5f53daff5569f42') + + depends_on('apr') + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/apr/apr.new/package.py b/var/spack/repos/builtin/packages/apr/apr.new/package.py deleted file mode 100644 index 5cbbad350b..0000000000 --- a/var/spack/repos/builtin/packages/apr/apr.new/package.py +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# 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 Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Apr(Package): - """Apache portable runtime.""" - homepage = 'https://apr.apache.org/' - url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz' - - version('1.5.2', '98492e965963f852ab29f9e61b2ad700') - - #variant('ncurses', default=True, description='Enables the build of the ncurses gui') - #variant('qt', default=False, description='Enables the build of cmake-gui') - #variant('doc', default=False, description='Enables the generation of html and man page documentation') - - #depends_on('ncurses', when='+ncurses') - #depends_on('qt', when='+qt') - #depends_on('python@2.7.11:', when='+doc') - #depends_on('py-sphinx', when='+doc') - - #def url_for_version(self, version): - # """Handle CMake's version-based custom URLs.""" - # return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version) - - def install(self, spec, prefix): - options = ['--prefix=%s' % prefix] - configure(*options) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py new file mode 100644 index 0000000000..8a440766ec --- /dev/null +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Apr(Package): + """Apache portable runtime.""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz' + + version('1.5.2', '98492e965963f852ab29f9e61b2ad700') + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix] + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py new file mode 100644 index 0000000000..5db1c3eb92 --- /dev/null +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -0,0 +1,77 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +#import os + +class Subversion(Package): + """Apache Subversion - an open source version control system.""" + homepage = 'https://subversion.apache.org/' + url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' + + version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') + version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') + + depends_on('apr') + depends_on('apr-util') + depends_on('zlib') + depends_on('sqlite') + + # Optional: We need swig if we want the Perl, Python or Ruby + # bindings. + #depends_on('swig') + #depends_on('python') + #depends_on('perl') + #depends_on('ruby') + + def install(self, spec, prefix): + + # configure, build, install: + # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + options.append('--with-apr-util=%s' % spec['apr-util'].prefix) + options.append('--with-zlib=%s' % spec['zlib'].prefix) + options.append('--with-sqlite=%s' % spec['sqlite'].prefix) + #options.append('--with-swig=%s' % spec['swig'].prefix) + + configure(*options) + make() + make('install') + + # python bindings + #make('swig-py', + # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', + # 'swig_pydir_extra=/usr/lib/python2.7/site-packages/svn') + #make('install-swig-py', + # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', + # 'swig_pydir_extra=/usr/lib/python2.7/site-packages/svn') + + # perl bindings + #make('swig-pl') + #make('install-swig-pl') + + # ruby bindings + #make('swig-rb') + #make('isntall-swig-rb') diff --git a/var/spack/repos/builtin/packages/subversion/subversion.new/package.py b/var/spack/repos/builtin/packages/subversion/subversion.new/package.py deleted file mode 100644 index b1c3380238..0000000000 --- a/var/spack/repos/builtin/packages/subversion/subversion.new/package.py +++ /dev/null @@ -1,59 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# 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 Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * -#import os - -class Subversion(Package): - """Apache Subversion - an open source version control system.""" - homepage = 'https://subversion.apache.org/' - url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' - - version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') - version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') - - depends_on('apr') - depends_on('apr-util') - depends_on('zlib') - depends_on('sqlite') - #depends_on('swig') - - def install(self, spec, prefix): - - # configure, build, install: - # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html - options = ['--prefix=%s' % prefix] - options.append('--with-apr=%s' % spec['apr'].prefix) - options.append('--with-apr-util=%s' % spec['apr-util'].prefix) - options.append('--with-zlib=%s' % spec['zlib'].prefix) - options.append('--with-sqlite=%s' % spec['sqlite'].prefix) - #options.append('--with-swig=%s' % spec['swig'].prefix) - - configure(*options) - make() - make('install') - #make('swig-py') # python bindings - #make('install-swig-py') - #make('swig-pl') # perl bindings - #make('install-swig-pl') -- cgit v1.2.3-60-g2f50 From a7ceacb991b2a3b0caba8da41a39e045912f9e22 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 09:47:31 -0600 Subject: + Changes to swig are not needed with this PR. --- var/spack/repos/builtin/packages/swig/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index de6055e965..8d46c4fe46 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -36,14 +36,11 @@ class Swig(Package): homepage = "http://www.swig.org" url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" - version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') - version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') - version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') + version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') depends_on('pcre') def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make() make("install") -- cgit v1.2.3-60-g2f50 From bc309e42d8f4d5c536ea43dc01a8356bf0aba3f2 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:00:18 -0500 Subject: New package, py-bottleneck. --- var/spack/repos/builtin/packages/py-bottleneck/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-bottleneck/package.py diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py new file mode 100644 index 0000000000..0aa4208b4d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyBottleneck(Package): + """Bottleneck is a collection of fast NumPy array functions written in Cython.""" + homepage = "https://pypi.python.org/pypi/Bottleneck/1.0.0" + url = "https://pypi.python.org/packages/source/B/Bottleneck/Bottleneck-1.0.0.tar.gz" + + version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2') + + extends('python', ignore=r'bin/f2py$') + depends_on('py-numpy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From 5c95977dccef17a3cceb741d39f94aa075a0a9c4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:06:04 -0500 Subject: Added version 15.0.1 --- var/spack/repos/builtin/packages/py-virtualenv/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py index 037a6fc59f..09303d37b4 100644 --- a/var/spack/repos/builtin/packages/py-virtualenv/package.py +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -8,6 +8,7 @@ class PyVirtualenv(Package): version('1.11.6', 'f61cdd983d2c4e6aeabb70b1060d6f49') version('13.0.1', '1ffc011bde6667f0e37ecd976f4934db') + version('15.0.1', '28d76a0d9cbd5dc42046dd14e76a6ecc') extends('python') depends_on('py-setuptools') -- cgit v1.2.3-60-g2f50 From 3b19cc303fae89eed11581d7cdfe2ab8e9d469ef Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:08:28 -0500 Subject: Added version 1.10.0. --- var/spack/repos/builtin/packages/py-six/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py index 05c5bd00a9..df277100f7 100644 --- a/var/spack/repos/builtin/packages/py-six/package.py +++ b/var/spack/repos/builtin/packages/py-six/package.py @@ -6,6 +6,7 @@ class PySix(Package): url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" version('1.9.0', '476881ef4012262dfc8adc645ee786c4') + version('1.10.0', '34eed507548117b2ab523ab14b2f8b55') extends('python') depends_on('py-setuptools') -- cgit v1.2.3-60-g2f50 From 9153e03e5ce5bdd5161aa4b493854208040fcf3d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:09:47 -0500 Subject: Added version 20.5. --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 26c048bfd4..c6d9be1add 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -9,6 +9,7 @@ class PySetuptools(Package): version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') + version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') extends('python') -- cgit v1.2.3-60-g2f50 From 42729d9cceafaf2382455f9e765cbc261dc41578 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:10:32 -0500 Subject: Added version 2016.3. --- var/spack/repos/builtin/packages/py-pytz/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py index da6311a784..060cf0cde4 100644 --- a/var/spack/repos/builtin/packages/py-pytz/package.py +++ b/var/spack/repos/builtin/packages/py-pytz/package.py @@ -7,6 +7,7 @@ class PyPytz(Package): version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') version('2015.4', '417a47b1c432d90333e42084a605d3d8') + version('2016.3', 'abae92c3301b27bd8a9f56b14f52cb29') extends('python') -- cgit v1.2.3-60-g2f50 From 17075736a0ff4f8f677527664e37d55b39cbfe93 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:16:11 -0500 Subject: Add version 2.5.2. --- var/spack/repos/builtin/packages/py-dateutil/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py index 0a17f2f2d2..b67e91ace6 100644 --- a/var/spack/repos/builtin/packages/py-dateutil/package.py +++ b/var/spack/repos/builtin/packages/py-dateutil/package.py @@ -7,6 +7,7 @@ class PyDateutil(Package): version('2.4.0', '75714163bb96bedd07685cdb2071b8bc') version('2.4.2', '4ef68e1c485b09e9f034e10473e5add2') + version('2.5.2', 'eafe168e8f404bf384514f5116eedbb6') extends('python') depends_on('py-setuptools') -- cgit v1.2.3-60-g2f50 From 8948cb100be21034b7e4bc78b7383fa73005a03a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:16:35 -0500 Subject: Add version 1.3.7. --- var/spack/repos/builtin/packages/py-nose/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py index 4fee99098e..c2c2b52e03 100644 --- a/var/spack/repos/builtin/packages/py-nose/package.py +++ b/var/spack/repos/builtin/packages/py-nose/package.py @@ -10,6 +10,7 @@ class PyNose(Package): version('1.3.4', '6ed7169887580ddc9a8e16048d38274d') version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16') + version('1.3.7', '4d3ad0ff07b61373d2cefc89c5d0b20b') extends('python', ignore=r'bin/nosetests.*$') depends_on('py-setuptools') -- cgit v1.2.3-60-g2f50 From f3b353f5f95c21641d4bee274393879e3a068c3c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:17:24 -0500 Subject: Add 'bin/f2py' to ignore so activation works. --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 2167735fb8..45e77dd631 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -12,7 +12,7 @@ class PyMatplotlib(Package): variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') - extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') + extends('python', ignore=r'bin/nosetests.*$|bin/pbr$|bin/f2py$') depends_on('py-pyside', when='+gui') depends_on('py-ipython', when='+ipython') -- cgit v1.2.3-60-g2f50 From e7ae983b41943939a20ca4964824b166833c282b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:20:27 -0500 Subject: Added version 2.5. Added 'bin/f2py' to ignore so that activation works. --- var/spack/repos/builtin/packages/py-numexpr/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py index 89f8a525b1..081a79dec6 100644 --- a/var/spack/repos/builtin/packages/py-numexpr/package.py +++ b/var/spack/repos/builtin/packages/py-numexpr/package.py @@ -7,8 +7,9 @@ class PyNumexpr(Package): url = "https://pypi.python.org/packages/source/n/numexpr/numexpr-2.4.6.tar.gz" version('2.4.6', '17ac6fafc9ea1ce3eb970b9abccb4fbd') + version('2.5', '84f66cced45ba3e30dcf77a937763aaa') - extends('python') + extends('python', ignore=r'bin/f2py$') depends_on('py-numpy') def install(self, spec, prefix): -- cgit v1.2.3-60-g2f50 From 78be85c84f89d861086c04e4fcc4fa70c21d0a5f Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:21:17 -0500 Subject: Added version 1.11.0. --- var/spack/repos/builtin/packages/py-numpy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index a08e612df6..40988fb44a 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -9,6 +9,7 @@ class PyNumpy(Package): homepage = "http://www.numpy.org/" url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" + version('1.11.0', 'bc56fb9fc2895aa4961802ffbdb31d0b') version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') version('1.9.1', '78842b73560ec378142665e712ae4ad9') -- cgit v1.2.3-60-g2f50 From 8ae84cfabaf22e52b01911c909b2d2342b75f3d9 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:21:38 -0500 Subject: This commit updates pandas and fixes dependencies. Added version 0.18.0. Added 'bin/f2py' to ignore so that activation works. Removed unneccessary dependencies on - libdrm - libpciaccess - llvm - mesa Added recommended dependencies from the pandas project site. http://pandas.pydata.org/pandas-docs/stable/install.html - py-numexpr - py-bottleneck The py-bottleneck is a new package that is also in this branch. Removed optional dependencies - py-scipy - py-matplotlib While those are most likely desired to be in the same python stack as pandas they are not required by pandas. --- var/spack/repos/builtin/packages/py-pandas/package.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 5b9997faa9..2320b1f92f 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -8,18 +8,15 @@ class PyPandas(Package): version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73') version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') + version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6') - extends('python') + extends('python', ignore=r'bin/f2py$') depends_on('py-dateutil') depends_on('py-numpy') - depends_on('py-matplotlib') - depends_on('py-scipy') depends_on('py-setuptools') depends_on('py-pytz') - depends_on('libdrm') - depends_on('libpciaccess') - depends_on('llvm') - depends_on('mesa') + depends_on('py-numexpr') + depends_on('py-bottleneck') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From 9519f3d988d4f83cd3edf9bbdd90080559ba9549 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 30 Mar 2016 11:46:58 -0500 Subject: Fix MPI-CUDA bug --- var/spack/repos/builtin/packages/cuda/package.py | 11 ++++++----- var/spack/repos/builtin/packages/hoomd-blue/package.py | 13 +++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 547b43d6d2..eca371d05a 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -16,9 +16,12 @@ class Cuda(Package): see http://software.llnl.gov/spack/mirrors.html""" homepage = "http://www.nvidia.com/object/cuda_home_new.html" - url = "file://%s/cuda_7.5.18_linux.run" % os.getcwd() - version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False) + version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False, + url="file://%s/cuda_7.5.18_linux.run" % os.getcwd()) + version('6.5.14', '90b1b8f77313600cc294d9271741f4da', expand=False, + url="file://%s/cuda_6.5.14_linux_64.run" % os.getcwd()) + def install(self, spec, prefix): runfile = glob(os.path.join(self.stage.path, 'cuda*.run'))[0] @@ -27,15 +30,13 @@ class Cuda(Package): runfile = which(runfile) # Note: NVIDIA does not officially support many newer versions of compilers. - # For example, on CentOS 6, you must use GCC 4.4.7 or older. - # The --override flag disables these checks. See: + # For example, on CentOS 6, you must use GCC 4.4.7 or older. See: # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements # for details. runfile( '--silent', # disable interactive prompts '--verbose', # create verbose log file - '--override', # ignore compiler checks '--toolkit', # install CUDA Toolkit '--toolkitpath=%s' % prefix ) diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py index 97ce9c0cf0..32fdff9426 100644 --- a/var/spack/repos/builtin/packages/hoomd-blue/package.py +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -49,10 +49,14 @@ class HoomdBlue(Package): cmake_args.append('-DENABLE_CUDA=OFF') # CUDA-aware MPI library support - if '+cuda' in spec and '+mpi' in spec: - cmake_args.append('-DENABLE_MPI_CUDA=ON') - else: - cmake_args.append('-DENABLE_MPI_CUDA=OFF') + #if '+cuda' in spec and '+mpi' in spec: + # cmake_args.append('-DENABLE_MPI_CUDA=ON') + #else: + # cmake_args.append('-DENABLE_MPI_CUDA=OFF') + + # There may be a bug in the MPI-CUDA code. See: + # https://groups.google.com/forum/#!msg/hoomd-users/2griTESmc5I/E69s_M5fDwAJ + cmake_args.append('-DENABLE_MPI_CUDA=OFF') # Documentation if '+doc' in spec: @@ -64,4 +68,5 @@ class HoomdBlue(Package): cmake('.', *cmake_args) make() + make("test") make("install") -- cgit v1.2.3-60-g2f50 From b909da759d7b6d0443a97c13ba1c97118acd3e7a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 19:26:03 +0200 Subject: petsc: remove no longer needed -Qunused-arguments hack --- var/spack/repos/builtin/packages/petsc/package.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index e9b7c8a732..5c1fc6cc92 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -71,19 +71,10 @@ class Petsc(Package): errors = ['incompatible variants given'] + errors raise RuntimeError('\n'.join(errors)) else: - if self.compiler.name == "clang": - compiler_opts = [ - '--with-mpi=1', - '--with-cc=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # Avoid confusing PETSc config by clang: warning: argument unused during compilation - '--with-cxx=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - '--with-fc=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - '--with-f77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), - ] - else: - compiler_opts = [ - '--with-mpi=1', - '--with-mpi-dir=%s' % self.spec['mpi'].prefix, - ] + compiler_opts = [ + '--with-mpi=1', + '--with-mpi-dir=%s' % self.spec['mpi'].prefix, + ] return compiler_opts def install(self, spec, prefix): -- cgit v1.2.3-60-g2f50 From 01657e6991197c999180c2fec367fc75e59fba15 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 30 Mar 2016 11:41:25 -0700 Subject: Make suite-sparse use spack compilers. --- var/spack/repos/builtin/packages/suite-sparse/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index b57f9967c3..c2196dcec4 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -23,4 +23,14 @@ class SuiteSparse(Package): # FIXME : this actually uses the current workaround # FIXME : (blas / lapack always provide libblas and liblapack as aliases) - make('install', 'INSTALL=%s' % prefix, 'BLAS=-lblas', 'LAPACK=-llapack') + make('install', 'INSTALL=%s' % prefix, + + # inject Spack compiler wrappers + 'AUTOCC=no', + 'CC=cc', + 'CXX=c++', + 'F77=f77', + + # BLAS arguments require path to libraries + 'BLAS=-lblas', + 'LAPACK=-llapack') -- cgit v1.2.3-60-g2f50 From 5506e89aa9f45b94a7b16a24e24e3c081fdf1e38 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 21:41:23 +0200 Subject: rename variant doxygen to doc --- var/spack/repos/builtin/packages/dealii/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 32dfb33c6d..7aaf33380e 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -11,7 +11,7 @@ class Dealii(Package): variant('mpi', default=True, description='Compile with MPI') variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') - variant('doxygen', default=False, description='Compile with Doxygen documentation') + variant('doc', default=False, description='Compile with documentation') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') @@ -36,7 +36,7 @@ class Dealii(Package): # optional dependencies depends_on ("mpi", when="+mpi") depends_on ("arpack-ng+mpi", when='+arpack+mpi') - depends_on ("doxygen", when='+doxygen') + 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 ("netcdf+mpi", when="+netcdf+mpi") @@ -111,7 +111,7 @@ class Dealii(Package): # doxygen options.extend([ - '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doxygen' in spec else 'OFF'), + '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doc' in spec else 'OFF'), ]) -- cgit v1.2.3-60-g2f50 From dbb25bfeed7113cbd6be090df52b97fcc10588e1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 16:17:52 -0400 Subject: ninja: fix installation on OS X The cp -t flag is a GNU-ism. Instead, add a trailing slash to bindir to ensure that it is not treated as a file. --- var/spack/repos/builtin/packages/ninja/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index 9e6bf4e358..0722dd49a6 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -16,7 +16,7 @@ class Ninja(Package): cp = which('cp') - bindir = os.path.join(prefix, 'bin') + bindir = os.path.join(prefix, 'bin/') mkdir(bindir) - cp('-a', '-t', bindir, 'ninja') - cp('-ra', 'misc', prefix) + cp('-a', 'ninja', bindir) + cp('-a', 'misc', prefix) -- cgit v1.2.3-60-g2f50 From d1a3adfcf09fb489acce9d29b2f9494df5f5d848 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 14:25:44 -0600 Subject: + Make --disable-perl the default configure option. --- var/spack/repos/builtin/packages/graphviz/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 84bd696af2..a45cd8743e 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -7,7 +7,11 @@ class Graphviz(Package): version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') - variant('perl', default=True, description='Disable if you have problems with the optional script language bindings') + # By default disable optional Perl language support to prevent build issues + # related to missing Perl packages. If spack begins support for Perl in the + # future, this package can be updated to depend_on('perl') and the + # ncecessary devel packages. + variant('perl', default=False, description='Disable if you have problems with the optional script language bindings') parallel = False @@ -17,7 +21,7 @@ class Graphviz(Package): def install(self, spec, prefix): options = ['--prefix=%s' % prefix] - if '~perl' in spec: + if not '+perl' in spec: options.append('--disable-perl') configure(*options) -- cgit v1.2.3-60-g2f50 From 4ab362ae17da96db2a5fb7bacb3035824817c15d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 14:27:23 -0600 Subject: + Fix variant description. --- var/spack/repos/builtin/packages/graphviz/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index a45cd8743e..ecf92620d4 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -11,7 +11,7 @@ class Graphviz(Package): # related to missing Perl packages. If spack begins support for Perl in the # future, this package can be updated to depend_on('perl') and the # ncecessary devel packages. - variant('perl', default=False, description='Disable if you have problems with the optional script language bindings') + variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') parallel = False -- cgit v1.2.3-60-g2f50 From 2bc43f7f3724e86c3ff8875ce0c91178cbc31a6f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 16:44:08 -0400 Subject: docs: add a link to the spack repo in the PR section --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8664953c0c..1977a4fee9 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,8 @@ can join it here: At the moment, contributing to Spack is relatively simple. Just send us a [pull request](https://help.github.com/articles/using-pull-requests/). -When you send your request, make ``develop`` the destination branch. +When you send your request, make ``develop`` the destination branch on the +[Spack repository](https://github.com/LLNL/spack). Spack is using a rough approximation of the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) -- cgit v1.2.3-60-g2f50 From f1a0619821fc4c4aaa0a13b114ecaf8ca35b1ce9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 17:19:29 -0400 Subject: mpich: disable fortran without a fortran compiler --- var/spack/repos/builtin/packages/mpich/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b20dc8dd60..2d7955e08d 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -78,6 +78,9 @@ class Mpich(Package): if not self.compiler.fc: config_args.append("--disable-fc") + if not self.compiler.fc and not self.compiler.f77: + config_args.append("--disable-fortran") + configure(*config_args) make() make("install") -- cgit v1.2.3-60-g2f50 From 2ad5d2ea2a280dd81a254458fcfb465073aef8da Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 15:40:04 -0600 Subject: + For darwin, add a dependency on gettext. This change was recommended in the discussion for PR#601. --- var/spack/repos/builtin/packages/numdiff/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index a51f6206cf..e72c60fadb 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import sys class Numdiff(Package): """Numdiff is a little program that can be used to compare putatively @@ -34,6 +35,8 @@ class Numdiff(Package): version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + depends_on('gettext', sys.platform=='darwin') + def install(self, spec, prefix): options = ['--prefix=%s' % prefix] configure(*options) -- cgit v1.2.3-60-g2f50 From a364ab0d0f5ac226ba9d5a519f2da8ab7a09a846 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 17:12:32 -0600 Subject: libpng depends on zlib. --- var/spack/repos/builtin/packages/libpng/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index e02b08663e..73c8c62341 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -9,6 +9,8 @@ class Libpng(Package): version('1.6.15', '829a256f3de9307731d4f52dc071916d') version('1.6.14', '2101b3de1d5f348925990f9aa8405660') + depends_on('zlib') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() -- cgit v1.2.3-60-g2f50 From a88c15e1010ccadd2f81de9edac48b140d70f9f1 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 21:18:04 -0600 Subject: + libdrm depends_on libpciaccess. Use spack provided libpciaccess. --- var/spack/repos/builtin/packages/libdrm/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py index 00736b7811..d5d779f796 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -2,7 +2,7 @@ from spack import * class Libdrm(Package): """A userspace library for accessing the DRM, direct - rendering manager, on Linux, BSD and other operating + rendering manager, on Linux, BSD and other operating systems that support the ioctl interface.""" homepage = "http://dri.freedesktop.org/libdrm/" # no real website... @@ -11,6 +11,8 @@ class Libdrm(Package): version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') version('2.4.33', '86e4e3debe7087d5404461e0032231c8') + depends_on('libpciaccess') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-60-g2f50 From 44b89474453bf80fd603eb5ea5b629b0d9dff123 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 30 Mar 2016 23:33:57 -0700 Subject: arpack-ng needs an extra libtoolize to build. --- var/spack/repos/builtin/packages/arpack-ng/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index dd86b17a53..6b152f7863 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -41,10 +41,17 @@ class ArpackNg(Package): depends_on('blas') depends_on('lapack') + depends_on('automake') + depends_on('autoconf') + depends_on('libtool@2.4.2:') + depends_on('mpi', when='+mpi') def install(self, spec, prefix): # Apparently autotools are not bootstrapped + # TODO: switch to use the CMake build in the next version + # rather than bootstrapping. + which('libtoolize')() bootstrap = Executable('./bootstrap') options = ['--prefix=%s' % prefix] -- cgit v1.2.3-60-g2f50 From 397e0d1368d8f6077cb7ea59ee953b993ef3d244 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Thu, 31 Mar 2016 10:12:20 +0100 Subject: Fixes #454 in a simpler way than 34a8f0c Rather than mess with the environment, have espresso install into the right directory (prefix/bin). --- var/spack/repos/builtin/packages/espresso/package.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index 59f362ab46..167bb38e38 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -24,7 +24,7 @@ class Espresso(Package): depends_on('fftw~mpi', when='~mpi') depends_on('fftw+mpi', when='+mpi') depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation - + def check_variants(self, spec): error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active' if '+scalapack' in spec and '~mpi' in spec: @@ -32,14 +32,10 @@ class Espresso(Package): if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec): raise RuntimeError(error.format(variant='elpa')) - def setup_environment(self, spack_env, run_env): - # Espresso copies every executable in prefix without creating sub-folders - run_env.prepend_path('PATH', self.prefix) - def install(self, spec, prefix): self.check_variants(spec) - options = ['-prefix=%s' % prefix] + options = ['-prefix=%s' % prefix.bin] if '+mpi' in spec: options.append('--enable-parallel') -- cgit v1.2.3-60-g2f50 From 7430f9142fc3fc590232a21a193321be9de33df7 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Thu, 31 Mar 2016 10:16:40 +0100 Subject: Can install espresso on OS/X Espresso uses unix utility `find dir -name \*.x` to determine the executable to install. On OS/X, it also finds a bunch of debug symbols associated with the exectuble. These files have the same name, but are in a different directory. So the install process is done by hand in the package.py file, for OS/X. --- var/spack/repos/builtin/packages/espresso/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index 167bb38e38..0dad57a9f6 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -33,6 +33,7 @@ class Espresso(Package): raise RuntimeError(error.format(variant='elpa')) def install(self, spec, prefix): + from glob import glob self.check_variants(spec) options = ['-prefix=%s' % prefix.bin] @@ -61,5 +62,11 @@ class Espresso(Package): configure(*options) make('all') - make('install') + + if spec.architecture.startswith('darwin'): + mkdirp(prefix.bin) + for filename in glob("bin/*.x"): + install(filename, prefix.bin) + else: + make('install') -- cgit v1.2.3-60-g2f50 From 4f6320a7eb14f7d09c1e31a92d224e54e32c3921 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 31 Mar 2016 13:22:48 +0200 Subject: uninstall : added unit tests --- lib/spack/spack/test/__init__.py | 3 +- lib/spack/spack/test/cmd/__init__.py | 0 lib/spack/spack/test/cmd/uninstall.py | 37 ++++++++++++++++ lib/spack/spack/test/database.py | 82 +---------------------------------- lib/spack/spack/test/mock_database.py | 78 +++++++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+), 81 deletions(-) create mode 100644 lib/spack/spack/test/cmd/__init__.py create mode 100644 lib/spack/spack/test/cmd/uninstall.py create mode 100644 lib/spack/spack/test/mock_database.py diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index cd842561e6..175a49428c 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -67,7 +67,8 @@ test_names = ['versions', 'namespace_trie', 'yaml', 'sbang', - 'environment'] + 'environment', + 'cmd.uninstall'] def list_tests(): diff --git a/lib/spack/spack/test/cmd/__init__.py b/lib/spack/spack/test/cmd/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py new file mode 100644 index 0000000000..06a24e2958 --- /dev/null +++ b/lib/spack/spack/test/cmd/uninstall.py @@ -0,0 +1,37 @@ +import spack.test.mock_database + +from spack.cmd.uninstall import uninstall + + +class MockArgs(object): + def __init__(self, packages, all=False, force=False, recursive=False): + self.packages = packages + self.all = all + self.force = force + self.recursive = recursive + self.yes_to_all = True + + +class TestUninstall(spack.test.mock_database.MockDatabase): + def test_uninstall(self): + parser = None + # Multiple matches + args = MockArgs(['mpileaks']) + self.assertRaises(SystemExit, uninstall, parser, args) + # Installed dependents + args = MockArgs(['libelf']) + self.assertRaises(SystemExit, uninstall, parser, args) + # Recursive uninstall + args = MockArgs(['callpath'], all=True, recursive=True) + uninstall(parser, args) + + all_specs = spack.install_layout.all_specs() + self.assertEqual(len(all_specs), 7) + # query specs with multiple configurations + mpileaks_specs = [s for s in all_specs if s.satisfies('mpileaks')] + callpath_specs = [s for s in all_specs if s.satisfies('callpath')] + mpi_specs = [s for s in all_specs if s.satisfies('mpi')] + + self.assertEqual(len(mpileaks_specs), 0) + self.assertEqual(len(callpath_specs), 0) + self.assertEqual(len(mpi_specs), 3) diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index ce6e8a0552..465263d057 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -28,16 +28,12 @@ both in memory and in its file """ import os.path import multiprocessing -import shutil -import tempfile import spack from llnl.util.filesystem import join_path from llnl.util.lock import * from llnl.util.tty.colify import colify -from spack.database import Database -from spack.directory_layout import YamlDirectoryLayout -from spack.test.mock_packages_test import * +from spack.test.mock_database import MockDatabase def _print_ref_counts(): @@ -75,80 +71,7 @@ def _print_ref_counts(): colify(recs, cols=3) -class DatabaseTest(MockPackagesTest): - - def _mock_install(self, spec): - s = Spec(spec) - s.concretize() - pkg = spack.repo.get(s) - pkg.do_install(fake=True) - - - def _mock_remove(self, spec): - specs = spack.installed_db.query(spec) - assert(len(specs) == 1) - spec = specs[0] - spec.package.do_uninstall(spec) - - - def setUp(self): - super(DatabaseTest, self).setUp() - # - # TODO: make the mockup below easier. - # - - # Make a fake install directory - self.install_path = tempfile.mkdtemp() - self.spack_install_path = spack.install_path - spack.install_path = self.install_path - - self.install_layout = YamlDirectoryLayout(self.install_path) - self.spack_install_layout = spack.install_layout - spack.install_layout = self.install_layout - - # Make fake database and fake install directory. - self.installed_db = Database(self.install_path) - self.spack_installed_db = spack.installed_db - spack.installed_db = self.installed_db - - # make a mock database with some packages installed note that - # the ref count for dyninst here will be 3, as it's recycled - # across each install. - # - # Here is what the mock DB looks like: - # - # o mpileaks o mpileaks' o mpileaks'' - # |\ |\ |\ - # | o callpath | o callpath' | o callpath'' - # |/| |/| |/| - # o | mpich o | mpich2 o | zmpi - # | | o | fake - # | | | - # | |______________/ - # | .____________/ - # |/ - # o dyninst - # |\ - # | o libdwarf - # |/ - # o libelf - # - - # Transaction used to avoid repeated writes. - with spack.installed_db.write_transaction(): - self._mock_install('mpileaks ^mpich') - self._mock_install('mpileaks ^mpich2') - self._mock_install('mpileaks ^zmpi') - - - def tearDown(self): - super(DatabaseTest, self).tearDown() - shutil.rmtree(self.install_path) - spack.install_path = self.spack_install_path - spack.install_layout = self.spack_install_layout - spack.installed_db = self.spack_installed_db - - +class DatabaseTest(MockDatabase): def test_005_db_exists(self): """Make sure db cache file exists after creating.""" index_file = join_path(self.install_path, '.spack-db', 'index.yaml') @@ -157,7 +80,6 @@ class DatabaseTest(MockPackagesTest): self.assertTrue(os.path.exists(index_file)) self.assertTrue(os.path.exists(lock_file)) - def test_010_all_install_sanity(self): """Ensure that the install layout reflects what we think it does.""" all_specs = spack.install_layout.all_specs() diff --git a/lib/spack/spack/test/mock_database.py b/lib/spack/spack/test/mock_database.py new file mode 100644 index 0000000000..6fd05439bf --- /dev/null +++ b/lib/spack/spack/test/mock_database.py @@ -0,0 +1,78 @@ +import shutil +import tempfile + +import spack +from spack.spec import Spec +from spack.database import Database +from spack.directory_layout import YamlDirectoryLayout +from spack.test.mock_packages_test import MockPackagesTest + + +class MockDatabase(MockPackagesTest): + def _mock_install(self, spec): + s = Spec(spec) + s.concretize() + pkg = spack.repo.get(s) + pkg.do_install(fake=True) + + def _mock_remove(self, spec): + specs = spack.installed_db.query(spec) + assert(len(specs) == 1) + spec = specs[0] + spec.package.do_uninstall(spec) + + def setUp(self): + super(MockDatabase, self).setUp() + # + # TODO: make the mockup below easier. + # + + # Make a fake install directory + self.install_path = tempfile.mkdtemp() + self.spack_install_path = spack.install_path + spack.install_path = self.install_path + + self.install_layout = YamlDirectoryLayout(self.install_path) + self.spack_install_layout = spack.install_layout + spack.install_layout = self.install_layout + + # Make fake database and fake install directory. + self.installed_db = Database(self.install_path) + self.spack_installed_db = spack.installed_db + spack.installed_db = self.installed_db + + # make a mock database with some packages installed note that + # the ref count for dyninst here will be 3, as it's recycled + # across each install. + # + # Here is what the mock DB looks like: + # + # o mpileaks o mpileaks' o mpileaks'' + # |\ |\ |\ + # | o callpath | o callpath' | o callpath'' + # |/| |/| |/| + # o | mpich o | mpich2 o | zmpi + # | | o | fake + # | | | + # | |______________/ + # | .____________/ + # |/ + # o dyninst + # |\ + # | o libdwarf + # |/ + # o libelf + # + + # Transaction used to avoid repeated writes. + with spack.installed_db.write_transaction(): + self._mock_install('mpileaks ^mpich') + self._mock_install('mpileaks ^mpich2') + self._mock_install('mpileaks ^zmpi') + + def tearDown(self): + super(MockDatabase, self).tearDown() + shutil.rmtree(self.install_path) + spack.install_path = self.spack_install_path + spack.install_layout = self.spack_install_layout + spack.installed_db = self.spack_installed_db -- cgit v1.2.3-60-g2f50 From 6d0b4a28abf8216ed141dac80a6779f6a51f03f1 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 31 Mar 2016 09:39:37 +0200 Subject: oce: fix bugs related to NULL pointers and compiler optimisation --- var/spack/repos/builtin/packages/dealii/package.py | 3 +- var/spack/repos/builtin/packages/oce/null.patch | 482 +++++++++++++++++++++ var/spack/repos/builtin/packages/oce/package.py | 22 +- 3 files changed, 502 insertions(+), 5 deletions(-) create mode 100644 var/spack/repos/builtin/packages/oce/null.patch diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 7aaf33380e..0b76db3827 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -235,5 +235,4 @@ class Dealii(Package): if 'oce' in spec: cmake('.') make('release') - if sys.platform != 'darwin': #FIXME - make('run',parallel=False) + make('run',parallel=False) diff --git a/var/spack/repos/builtin/packages/oce/null.patch b/var/spack/repos/builtin/packages/oce/null.patch new file mode 100644 index 0000000000..42a3f0e44f --- /dev/null +++ b/var/spack/repos/builtin/packages/oce/null.patch @@ -0,0 +1,482 @@ +From 61cb965b9ffeca419005bc15e635e67589c421dd Mon Sep 17 00:00:00 2001 +From: Martin Siggel +Date: Thu, 28 Jan 2016 19:05:00 +0100 +Subject: [PATCH] Workaround clang optimizations for null references + +OCCT/OCE includes some evil code that uses NULL references, +which are normally not possible. Clang removes code in +branches like if(&myNullRef==NULL) as it assumes this can +never be true. This fix was inspired from the mantis issue +http://tracker.dev.opencascade.org/view.php?id=26042. This +code will be fixed in OCCT 7, but we might require the fix +for earlier releases as well. + +Fixes issue #576 +--- + inc/PLib.hxx | 2 +- + src/BSplCLib/BSplCLib.cxx | 16 ++++++------- + src/BSplCLib/BSplCLib_2.cxx | 6 ++--- + src/BSplCLib/BSplCLib_CurveComputation.gxx | 26 ++++++++++----------- + src/BSplSLib/BSplSLib.cxx | 36 +++++++++++++++--------------- + src/BSplSLib/BSplSLib_BzSyntaxes.cxx | 2 +- + src/PLib/PLib.cxx | 10 ++++----- + 7 files changed, 49 insertions(+), 49 deletions(-) + +diff --git a/inc/PLib.hxx b/inc/PLib.hxx +index 7513234..52b1f84 100644 +--- a/inc/PLib.hxx ++++ b/inc/PLib.hxx +@@ -343,6 +343,6 @@ friend class PLib_DoubleJacobiPolynomial; + + + +- ++#define IS_NULL_REF(ref) ((reinterpret_cast(&ref) & 0xFFFFFF) == 0) + + #endif // _PLib_HeaderFile +diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx +index 683e4ab..2a2d9ea 100644 +--- a/src/BSplCLib/BSplCLib.cxx ++++ b/src/BSplCLib/BSplCLib.cxx +@@ -298,7 +298,7 @@ void BSplCLib::LocateParameter + Standard_Real& NewU) + { + Standard_Integer first,last; +- if (&Mults) { ++ if (!IS_NULL_REF(Mults)) { + if (Periodic) { + first = Knots.Lower(); + last = Knots.Upper(); +@@ -1434,7 +1434,7 @@ void BSplCLib::BuildKnots(const Standard_Integer Degree, + const Standard_Real * pkn = &Knots(KLower); + pkn -= KLower; + Standard_Real *knot = &LK; +- if (&Mults == NULL) { ++ if (IS_NULL_REF(Mults)) { + switch (Degree) { + case 1 : { + Standard_Integer j = Index ; +@@ -1672,7 +1672,7 @@ Standard_Boolean BSplCLib::PrepareInsertKnots + const Standard_Real Tolerance, + const Standard_Boolean Add) + { +- Standard_Boolean addflat = &AddMults == NULL; ++ Standard_Boolean addflat = IS_NULL_REF(AddMults); + + Standard_Integer first,last; + if (Periodic) { +@@ -1856,7 +1856,7 @@ void BSplCLib::InsertKnots + const Standard_Real Tolerance, + const Standard_Boolean Add) + { +- Standard_Boolean addflat = &AddMults == NULL; ++ Standard_Boolean addflat = IS_NULL_REF(AddMults); + + Standard_Integer i,k,mult,firstmult; + Standard_Integer index,kn,curnk,curk; +@@ -3902,7 +3902,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + num_poles = FlatKnots.Length() - Deg1; + switch (ArrayDimension) { + case 2 : { +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +@@ -3970,7 +3970,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + break; + } + case 3 : { +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +@@ -4047,7 +4047,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + break; + } + case 4 : { +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +@@ -4134,7 +4134,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + } + default : { + Standard_Integer kk; +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +diff --git a/src/BSplCLib/BSplCLib_2.cxx b/src/BSplCLib/BSplCLib_2.cxx +index 35c4639..653b7cd 100644 +--- a/src/BSplCLib/BSplCLib_2.cxx ++++ b/src/BSplCLib/BSplCLib_2.cxx +@@ -70,7 +70,7 @@ void BSplCLib::BuildEval(const Standard_Integer Degree, + Standard_Integer i; + Standard_Integer ip = PLower + Index - 1; + Standard_Real w, *pole = &LP; +- if (&Weights == NULL) { ++ if (IS_NULL_REF(Weights)) { + + for (i = 0; i <= Degree; i++) { + ip++; +@@ -115,13 +115,13 @@ static void PrepareEval + + // make the knots + BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*dc.knots); +- if (&Mults == NULL) ++ if (IS_NULL_REF(Mults)) + index -= Knots.Lower() + Degree; + else + index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults); + + // check truly rational +- rational = (&Weights != NULL); ++ rational = (!IS_NULL_REF(Weights)); + if (rational) { + Standard_Integer WLower = Weights.Lower() + index; + rational = BSplCLib::IsRational(Weights, WLower, WLower + Degree); +diff --git a/src/BSplCLib/BSplCLib_CurveComputation.gxx b/src/BSplCLib/BSplCLib_CurveComputation.gxx +index e71b4e0..9d42643 100644 +--- a/src/BSplCLib/BSplCLib_CurveComputation.gxx ++++ b/src/BSplCLib/BSplCLib_CurveComputation.gxx +@@ -92,7 +92,7 @@ Standard_Boolean BSplCLib::RemoveKnot + TColStd_Array1OfInteger& NewMults, + const Standard_Real Tolerance) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -133,7 +133,7 @@ void BSplCLib::InsertKnots + const Standard_Real Epsilon, + const Standard_Boolean Add) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -222,7 +222,7 @@ void BSplCLib::IncreaseDegree + TColStd_Array1OfReal& NewKnots, + TColStd_Array1OfInteger& NewMults) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -256,7 +256,7 @@ void BSplCLib::Unperiodize + Array1OfPoints& NewPoles, + TColStd_Array1OfReal& NewWeights) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -292,7 +292,7 @@ void BSplCLib::Trimming(const Standard_Integer Degree, + Array1OfPoints& NewPoles, + TColStd_Array1OfReal& NewWeights) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -339,7 +339,7 @@ void BSplCLib::BuildEval(const Standard_Integer Degree, + Standard_Integer PUpper = Poles.Upper(); + Standard_Integer i; + Standard_Integer ip = PLower + Index - 1; +- if (&Weights == NULL) { ++ if (IS_NULL_REF(Weights)) { + for (i = 0; i <= Degree; i++) { + ip++; + if (ip > PUpper) ip = PLower; +@@ -384,13 +384,13 @@ static void PrepareEval + + // make the knots + BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*dc.knots); +- if (&Mults == NULL) ++ if (IS_NULL_REF(Mults)) + index -= Knots.Lower() + Degree; + else + index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults); + + // check truly rational +- rational = (&Weights != NULL); ++ rational = (!IS_NULL_REF(Weights)); + if (rational) { + Standard_Integer WLower = Weights.Lower() + index; + rational = BSplCLib::IsRational(Weights, WLower, WLower + Degree); +@@ -741,7 +741,7 @@ void BSplCLib::CacheD0(const Standard_Real Parameter, + Degree * Dimension_gen, + PArray[0], + myPoint[0]) ; +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + PLib::NoDerivativeEvalPolynomial(NewParameter, +@@ -798,7 +798,7 @@ void BSplCLib::CacheD1(const Standard_Real Parameter, + + ModifyCoords (LocalPDerivatives + Dimension_gen, /= SpanLenght); + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + PLib::EvalPolynomial(NewParameter, +@@ -878,7 +878,7 @@ void BSplCLib::CacheD2(const Standard_Real Parameter, + Index += Dimension_gen; + } + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + +@@ -971,7 +971,7 @@ void BSplCLib::CacheD3(const Standard_Real Parameter, + Index += Dimension_gen; + } + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + +@@ -1081,7 +1081,7 @@ void BSplCLib::BuildCache + LocalValue *= SpanDomain / (Standard_Real) ii ; + } + +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + for (ii = 1 ; ii <= Degree + 1 ; ii++) + CacheWeights(ii) = 0.0e0 ; + CacheWeights(1) = 1.0e0 ; +diff --git a/src/BSplSLib/BSplSLib.cxx b/src/BSplSLib/BSplSLib.cxx +index 5ad633c..07040d5 100644 +--- a/src/BSplSLib/BSplSLib.cxx ++++ b/src/BSplSLib/BSplSLib.cxx +@@ -309,12 +309,12 @@ static Standard_Boolean PrepareEval (const Standard_Real U, + BSplCLib::BuildKnots(UDegree,uindex,UPer,UKnots,UMults,*dc.knots1); + BSplCLib::BuildKnots(VDegree,vindex,VPer,VKnots,VMults,*dc.knots2); + +- if (&UMults == NULL) ++ if (IS_NULL_REF(UMults)) + uindex -= UKLower + UDegree; + else + uindex = BSplCLib::PoleIndex(UDegree,uindex,UPer,UMults); + +- if (&VMults == NULL) ++ if (IS_NULL_REF(VMults)) + vindex -= VKLower + VDegree; + else + vindex = BSplCLib::PoleIndex(VDegree,vindex,VPer,VMults); +@@ -460,12 +460,12 @@ static Standard_Boolean PrepareEval (const Standard_Real U, + BSplCLib::BuildKnots(UDegree,uindex,UPer,UKnots,UMults,*dc.knots2); + BSplCLib::BuildKnots(VDegree,vindex,VPer,VKnots,VMults,*dc.knots1); + +- if (&UMults == NULL) ++ if (IS_NULL_REF(UMults)) + uindex -= UKLower + UDegree; + else + uindex = BSplCLib::PoleIndex(UDegree,uindex,UPer,UMults); + +- if (&VMults == NULL) ++ if (IS_NULL_REF(VMults)) + vindex -= VKLower + VDegree; + else + vindex = BSplCLib::PoleIndex(VDegree,vindex,VPer,VMults); +@@ -1299,7 +1299,7 @@ void BSplSLib::Iso(const Standard_Real Param, + { + Standard_Integer index = 0; + Standard_Real u = Param; +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = rational ? 4 : 3; + + // compute local knots +@@ -1307,7 +1307,7 @@ void BSplSLib::Iso(const Standard_Real Param, + NCollection_LocalArray locknots1 (2*Degree); + BSplCLib::LocateParameter(Degree,Knots,Mults,u,Periodic,index,u); + BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*locknots1); +- if (&Mults == NULL) ++ if (IS_NULL_REF(Mults)) + index -= Knots.Lower() + Degree; + else + index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults); +@@ -1381,7 +1381,7 @@ void BSplSLib::Iso(const Standard_Real Param, + } + + // if the input is not rational but weights are wanted +- if (!rational && (&CWeights != NULL)) { ++ if (!rational && (!IS_NULL_REF(CWeights))) { + + for (i = CWeights.Lower(); i <= CWeights.Upper(); i++) + CWeights(i) = 1.; +@@ -1741,7 +1741,7 @@ void BSplSLib::InsertKnots(const Standard_Boolean UDirection, + const Standard_Real Epsilon, + const Standard_Boolean Add ) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1787,7 +1787,7 @@ Standard_Boolean BSplSLib::RemoveKnot + TColStd_Array1OfInteger& NewMults, + const Standard_Real Tolerance) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1834,7 +1834,7 @@ void BSplSLib::IncreaseDegree + TColStd_Array1OfReal& NewKnots, + TColStd_Array1OfInteger& NewMults) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1876,7 +1876,7 @@ void BSplSLib::Unperiodize + TColgp_Array2OfPnt& NewPoles, + TColStd_Array2OfReal& NewWeights) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1929,7 +1929,7 @@ void BSplSLib::BuildCache + Standard_Boolean rational,rational_u,rational_v,flag_u_or_v; + Standard_Integer kk,d1,d1p1,d2,d2p1,ii,jj,iii,jjj,Index; + Standard_Real u1,min_degree_domain,max_degree_domain,f,factor[2],u2; +- if (&Weights != NULL) ++ if (!IS_NULL_REF(Weights)) + rational_u = rational_v = Standard_True; + else + rational_u = rational_v = Standard_False; +@@ -2025,7 +2025,7 @@ void BSplSLib::BuildCache + } + factor[0] *= max_degree_domain / (Standard_Real) (iii) ; + } +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + // + // means that PrepareEval did found out that the surface was + // locally polynomial but since the surface is constructed +@@ -2110,7 +2110,7 @@ void BSplSLib::CacheD0(const Standard_Real UParameter, + (min_degree << 1) + min_degree, + locpoles[0], + myPoint[0]) ; +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + dimension = min_degree + 1 ; + Standard_Real * + WArray = (Standard_Real *) +@@ -2190,7 +2190,7 @@ void BSplSLib::CacheD1(const Standard_Real UParameter, + // the coefficients + // + // +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + + local_poles_array [0][0][0] = 0.0e0 ; + local_poles_array [0][0][1] = 0.0e0 ; +@@ -2275,7 +2275,7 @@ void BSplSLib::CacheD1(const Standard_Real UParameter, + locpoles[dimension], + local_poles_array[1][0][0]) ; + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + dimension = min_degree + 1 ; + Standard_Real * + WArray = (Standard_Real *) +@@ -2435,7 +2435,7 @@ void BSplSLib::CacheD2(const Standard_Real UParameter, + // the coefficients + // + // +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + + local_poles_and_weights_array[0][0][0] = 0.0e0 ; + local_poles_and_weights_array[0][0][1] = 0.0e0 ; +@@ -2564,7 +2564,7 @@ void BSplSLib::CacheD2(const Standard_Real UParameter, + locpoles[dimension + dimension], + local_poles_array[2][0][0]) ; + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + dimension = min_degree + 1 ; + Standard_Real * + WArray = (Standard_Real *) +diff --git a/src/BSplSLib/BSplSLib_BzSyntaxes.cxx b/src/BSplSLib/BSplSLib_BzSyntaxes.cxx +index 0faf6b6..f2c0f74 100644 +--- a/src/BSplSLib/BSplSLib_BzSyntaxes.cxx ++++ b/src/BSplSLib/BSplSLib_BzSyntaxes.cxx +@@ -68,7 +68,7 @@ void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles, + biduflatknots,bidvflatknots, + Poles,Weights, + CPoles,CWeights); +- if (&Weights == NULL) { ++ if (IS_NULL_REF(Weights)) { + + for (ii = 1; ii <= uclas; ii++) { + +diff --git a/src/PLib/PLib.cxx b/src/PLib/PLib.cxx +index 23fa302..7ee231f 100644 +--- a/src/PLib/PLib.cxx ++++ b/src/PLib/PLib.cxx +@@ -2427,7 +2427,7 @@ void PLib::CoefficientsPoles (const Standard_Integer dim, + TColStd_Array1OfReal& Poles, + TColStd_Array1OfReal& Weights) + { +- Standard_Boolean rat = &WCoefs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoefs); + Standard_Integer loc = Coefs.Lower(); + Standard_Integer lop = Poles.Lower(); + Standard_Integer lowc=0; +@@ -2550,7 +2550,7 @@ void PLib::Trimming(const Standard_Real U1, + Standard_Integer indc, indw=0; + Standard_Integer upc = Coefs.Upper() - dim + 1, upw=0; + Standard_Integer len = Coefs.Length()/dim; +- Standard_Boolean rat = &WCoefs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoefs); + + if (rat) { + if(len != WCoefs.Length()) +@@ -2607,7 +2607,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt& Coefs, + TColgp_Array2OfPnt& Poles, + TColStd_Array2OfReal& Weights) + { +- Standard_Boolean rat = (&WCoefs != NULL); ++ Standard_Boolean rat = (!IS_NULL_REF(WCoefs)); + Standard_Integer LowerRow = Poles.LowerRow(); + Standard_Integer UpperRow = Poles.UpperRow(); + Standard_Integer LowerCol = Poles.LowerCol(); +@@ -2701,7 +2701,7 @@ void PLib::UTrimming(const Standard_Real U1, + TColgp_Array2OfPnt& Coeffs, + TColStd_Array2OfReal& WCoeffs) + { +- Standard_Boolean rat = &WCoeffs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoeffs); + Standard_Integer lr = Coeffs.LowerRow(); + Standard_Integer ur = Coeffs.UpperRow(); + Standard_Integer lc = Coeffs.LowerCol(); +@@ -2735,7 +2735,7 @@ void PLib::VTrimming(const Standard_Real V1, + TColgp_Array2OfPnt& Coeffs, + TColStd_Array2OfReal& WCoeffs) + { +- Standard_Boolean rat = &WCoeffs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoeffs); + Standard_Integer lr = Coeffs.LowerRow(); + Standard_Integer ur = Coeffs.UpperRow(); + Standard_Integer lc = Coeffs.LowerCol(); \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 4d5081ac9d..3fe6638e66 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -13,9 +13,20 @@ class Oce(Package): version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d') version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3') version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca') - version('0.15' , '7ec541a1c350ca8a684f74980e48801c') + + variant('tbb', default=True, description='Build with Intel Threading Building Blocks') depends_on('cmake@2.8:') + depends_on('tbb', when='+tbb') + + # There is a bug in OCE which appears with Clang (version?) or GCC 6.0 + # and has to do with compiler optimization, see + # https://github.com/tpaviot/oce/issues/576 + # http://tracker.dev.opencascade.org/view.php?id=26042 + # https://github.com/tpaviot/oce/issues/605 + # https://github.com/tpaviot/oce/commit/61cb965b9ffeca419005bc15e635e67589c421dd.patch + patch('null.patch',when='@0.16:0.17.1') + def install(self, spec, prefix): options = [] @@ -23,12 +34,12 @@ class Oce(Package): options.extend([ '-DOCE_INSTALL_PREFIX=%s' % prefix, '-DOCE_BUILD_SHARED_LIB:BOOL=ON', - '-DOCE_BUILD_TYPE:STRING=Release', + '-DCMAKE_BUILD_TYPE:STRING=Release', '-DOCE_DATAEXCHANGE:BOOL=ON', '-DOCE_DISABLE_X11:BOOL=ON', '-DOCE_DRAW:BOOL=OFF', '-DOCE_MODEL:BOOL=ON', - '-DOCE_MULTITHREAD_LIBRARY:STRING=NONE', # FIXME: add tbb + '-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % ('TBB' if '+tbb' in spec else 'NONE'), '-DOCE_OCAF:BOOL=ON', '-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF', '-DOCE_VISUALISATION:BOOL=OFF', @@ -46,6 +57,11 @@ class Oce(Package): make("install/strip") + # OCE tests build is brocken at least on Darwin. + # Unit tests are linked against libTKernel.10.dylib isntead of /full/path/libTKernel.10.dylib + # see https://github.com/tpaviot/oce/issues/612 + # make("test") + # The shared libraries are not installed correctly on Darwin; correct this if (sys.platform == 'darwin'): fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-60-g2f50 From 0bcfd095362c5d04b9add7ebc882b74fad68f9dd Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Fri, 25 Mar 2016 13:25:29 -0400 Subject: add: VTK lastest versions --- var/spack/repos/builtin/packages/vtk/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 4a27a8fedb..aeb03fe0a3 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -7,6 +7,10 @@ class Vtk(Package): homepage = "http://www.vtk.org" url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" + version("7.0.0", "5fe35312db5fb2341139b8e4955c367d", url="http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz") + + version("6.3.0", '0231ca4840408e9dd60af48b314c5b6d', url="http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz") + version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d') depends_on("qt") -- cgit v1.2.3-60-g2f50 From 123996aad0c58bab7de6f615159b2fd7b44c7369 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Thu, 31 Mar 2016 10:29:47 -0400 Subject: Fix build for vtk6.1.0 --- var/spack/repos/builtin/packages/vtk/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index aeb03fe0a3..b29d52d0f0 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -39,6 +39,10 @@ class Vtk(Package): if spec['qt'].satisfies('@5'): cmake_args.append("-DVTK_QT_VERSION:STRING=5") + if spec.satisfies("@6.1.0"): + cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake(*cmake_args) make() make("install") -- cgit v1.2.3-60-g2f50 From 3b0311a1e484a4f731d1cc6448dc6804410ecb3c Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Thu, 31 Mar 2016 10:30:32 -0400 Subject: Add variant opengl2, which is ON by default Needed for visit which depends on vtk@6.1.0~opengl2 --- var/spack/repos/builtin/packages/vtk/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index b29d52d0f0..24382af406 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -15,7 +15,15 @@ class Vtk(Package): depends_on("qt") + # VTK7 defaults to OpenGL2 rendering backend + variant('opengl2', default=True, description='Build with OpenGL instead of OpenGL2 as rendering backend') + def install(self, spec, prefix): + def feature_to_bool(feature, on='ON', off='OFF'): + if feature in spec: + return on + return off + with working_dir('spack-build', create=True): cmake_args = [ "..", @@ -43,6 +51,8 @@ class Vtk(Package): cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY") cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) + cmake(*cmake_args) make() make("install") -- cgit v1.2.3-60-g2f50 From a0902ad8d8a8c629eb921b8701332385d622bc12 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 11:04:29 -0500 Subject: Change variant defaults and add comment --- var/spack/repos/builtin/packages/cuda/package.py | 6 +++++- var/spack/repos/builtin/packages/hoomd-blue/package.py | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index eca371d05a..ea083d8651 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -13,7 +13,11 @@ class Cuda(Package): For the Installer Type, select runfile and click Download. Spack will search your current directory for this file. Alternatively, add this file to a mirror so that Spack can find it. For instructions on how to set up a mirror, - see http://software.llnl.gov/spack/mirrors.html""" + see http://software.llnl.gov/spack/mirrors.html + + Note: This package does not currently install the drivers necessary to run + CUDA. These will need to be installed manually. See: + http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux for details.""" homepage = "http://www.nvidia.com/object/cuda_home_new.html" diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py index 32fdff9426..d310b7687a 100644 --- a/var/spack/repos/builtin/packages/hoomd-blue/package.py +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -16,9 +16,9 @@ class HoomdBlue(Package): version('1.3.3', '1469ef4531dc14b579c0acddbfe6a273') - variant('mpi', default=False, description='Compile with MPI enabled') - variant('cuda', default=False, description='Compile with CUDA Toolkit') - variant('doc', default=False, description='Generate documentation') + variant('mpi', default=True, description='Compile with MPI enabled') + variant('cuda', default=True, description='Compile with CUDA Toolkit') + variant('doc', default=True, description='Generate documentation') extends('python') depends_on('py-numpy') @@ -56,6 +56,7 @@ class HoomdBlue(Package): # There may be a bug in the MPI-CUDA code. See: # https://groups.google.com/forum/#!msg/hoomd-users/2griTESmc5I/E69s_M5fDwAJ + # This prevented "make test" from passing for me. cmake_args.append('-DENABLE_MPI_CUDA=OFF') # Documentation -- cgit v1.2.3-60-g2f50 From 63f824b218af9fcea4c13d7bef8b1d8ff31d09b2 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 11:53:27 -0800 Subject: add a path argument to the stage command Allow users to use spack to stage a, potentially complex, package into a given path. This is nice for packages with multiple resources that must be placed, for example LLVM with all sub-projects. --- lib/spack/spack/cmd/stage.py | 8 +++++++- lib/spack/spack/package.py | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 5786780efb..749fa90868 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -35,6 +35,9 @@ def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', help="Do not check downloaded packages against checksum") + subparser.add_argument( + '-p', '--path', dest='path', + help="Path to stage package, does not add to spack tree") subparser.add_argument( 'specs', nargs=argparse.REMAINDER, help="specs of packages to stage") @@ -50,4 +53,7 @@ def stage(parser, args): specs = spack.cmd.parse_specs(args.specs, concretize=True) for spec in specs: package = spack.repo.get(spec) - package.do_stage() + if args.path: + package.do_stage(path=args.path) + else: + package.do_stage() diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9af3221837..ce314b7b0a 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -709,14 +709,18 @@ class Package(object): if spack.do_checksum and self.version in self.versions: self.stage.check() - - def do_stage(self, mirror_only=False): + def do_stage(self, mirror_only=False, path=None): """Unpacks the fetched tarball, then changes into the expanded tarball directory.""" + if not self.spec.concrete: raise ValueError("Can only stage concrete packages.") self.do_fetch(mirror_only) + + if path is not None: + self.stage.path = path + self.stage.expand_archive() self.stage.chdir_to_source() -- cgit v1.2.3-60-g2f50 From 5d2151ed645f853a083cd445ae8631f9ed987559 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 31 Mar 2016 10:20:55 -0700 Subject: reworked to deal with stage.path as property This version actually pulls the path through the package to deliver it to each stage on creation when passed through the command. This is necessary due to the new StageComposite class that makes setting the path directly on the stage impractical, it also takes the logic out of package for the most part, which seems like an improvement. --- lib/spack/spack/cmd/stage.py | 5 ++--- lib/spack/spack/package.py | 15 +++++++-------- lib/spack/spack/stage.py | 7 +++++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 749fa90868..975bb54ef7 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -54,6 +54,5 @@ def stage(parser, args): for spec in specs: package = spack.repo.get(spec) if args.path: - package.do_stage(path=args.path) - else: - package.do_stage() + package.path = args.path + package.do_stage() diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ce314b7b0a..9dcfbee661 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -335,6 +335,9 @@ class Package(object): if '.' in self.name: self.name = self.name[self.name.rindex('.') + 1:] + # Allow custom staging paths for packages + self.path=None + # Sanity check attributes required by Spack directives. spack.directives.ensure_dicts(type(self)) @@ -445,7 +448,8 @@ class Package(object): resource_stage_folder = self._resource_stage(resource) resource_mirror = join_path(self.name, os.path.basename(fetcher.url)) stage = ResourceStage(resource.fetcher, root=root_stage, resource=resource, - name=resource_stage_folder, mirror_path=resource_mirror) + name=resource_stage_folder, mirror_path=resource_mirror, + path=self.path) return stage def _make_root_stage(self, fetcher): @@ -455,7 +459,7 @@ class Package(object): s = self.spec stage_name = "%s-%s-%s" % (s.name, s.version, s.dag_hash()) # Build the composite stage - stage = Stage(fetcher, mirror_path=mp, name=stage_name) + stage = Stage(fetcher, mirror_path=mp, name=stage_name, path=self.path) return stage def _make_stage(self): @@ -709,18 +713,13 @@ class Package(object): if spack.do_checksum and self.version in self.versions: self.stage.check() - def do_stage(self, mirror_only=False, path=None): + def do_stage(self, mirror_only=False): """Unpacks the fetched tarball, then changes into the expanded tarball directory.""" - if not self.spec.concrete: raise ValueError("Can only stage concrete packages.") self.do_fetch(mirror_only) - - if path is not None: - self.stage.path = path - self.stage.expand_archive() self.stage.chdir_to_source() diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index f88f82fc2d..d711752c20 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -89,7 +89,7 @@ class Stage(object): """ def __init__(self, url_or_fetch_strategy, - name=None, mirror_path=None, keep=False): + name=None, mirror_path=None, keep=False, path=None): """Create a stage object. Parameters: url_or_fetch_strategy @@ -135,7 +135,10 @@ class Stage(object): # Try to construct here a temporary name for the stage directory # If this is a named stage, then construct a named path. - self.path = join_path(spack.stage_path, self.name) + if path is not None: + self.path = path + else: + self.path = join_path(spack.stage_path, self.name) # Flag to decide whether to delete the stage folder on exit or not self.keep = keep -- cgit v1.2.3-60-g2f50 From a670408617b76777d35185aa554eeaf3892e0188 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 31 Mar 2016 11:34:00 -0700 Subject: Quick fix for pkg diff. --- lib/spack/spack/cmd/pkg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index cf478d3763..20a3fc5fc2 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -77,7 +77,8 @@ def get_git(): def list_packages(rev): git = get_git() - relpath = spack.packages_path[len(spack.prefix + os.path.sep):] + os.path.sep + pkgpath = os.path.join(spack.packages_path, 'packages') + relpath = pkgpath[len(spack.prefix + os.path.sep):] + os.path.sep output = git('ls-tree', '--full-tree', '--name-only', rev, relpath, output=str) return sorted(line[len(relpath):] for line in output.split('\n') if line) -- cgit v1.2.3-60-g2f50 From 66038ef729b5fb8d2efadc48c87a868370ca23c5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 13:34:56 -0500 Subject: Add url_for_version function and gtk variant --- var/spack/repos/builtin/packages/qt/package.py | 70 ++++++++++++++++---------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index d08e8e81e1..ab09469042 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -1,41 +1,31 @@ -import os from spack import * import os class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" - homepage = "http://qt.io" - list_url = 'http://download.qt-project.org/official_releases/qt/' - list_depth = 2 - - version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5', - url='http://download.qt-project.org/official_releases/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz') - - version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6', - url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz') - - version('5.3.2', 'febb001129927a70174467ecb508a682', - url='http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz') - - version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8', - url='http://download.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz') - - version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb', - url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz") + 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('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009', - url="http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8b.tar.gz") + version('5.5.1', '59f0216819152b77536cf660b015d784') + version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') + version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6') + version('5.3.2', 'febb001129927a70174467ecb508a682') + version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8') + version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb') + version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009') - variant('mesa', default=False, description='depend on mesa') # Add patch for compile issues with qt3 found with use in the OpenSpeedShop project - variant('krellpatch', default=False, description="build with openspeedshop based patch.") + variant('krellpatch', default=False, description="Build with openspeedshop based patch.") + variant('mesa', default=False, description="Depend on mesa.") + variant('gtk', default=False, description="Build with gtkplus.") + patch('qt3krell.patch', when='@3.3.8b+krellpatch') # Use system openssl for security. #depends_on("openssl") depends_on("glib") - depends_on("gtkplus") + depends_on("gtkplus", when='+gtk') depends_on("libxml2") depends_on("zlib") depends_on("dbus", when='@4:') @@ -56,6 +46,34 @@ class Qt(Package): depends_on("libxcb") + def url_for_version(self, version): + url = "http://download.qt.io/archive/qt/" + + if version >= Version('5'): + url += "%s/%s/single/qt-everywhere-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version, version) + elif version >= Version('4.8'): + url += "%s/%s/qt-everywhere-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version, version) + elif version >= Version('4.6'): + url += "%s/qt-everywhere-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version) + elif version >= Version('4.0'): + url += "%s/qt-x11-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version) + elif version >= Version('3'): + url += "%s/qt-x11-free-%s.tar.gz" % \ + (version.up_to(1), version) + elif version >= Version('2.1'): + url += "%s/qt-x11-%s.tar.gz" % \ + (version.up_to(1), version) + else: + url += "%s/qt-%s.tar.gz" % \ + (version.up_to(1), version) + + return url + + def setup_environment(self, spack_env, env): env.set('QTDIR', self.prefix) @@ -88,7 +106,7 @@ class Qt(Package): '-v', '-opensource', '-opengl', - "-release", + '-release', '-shared', '-confirm-license', '-openssl-linked', @@ -97,7 +115,7 @@ class Qt(Package): '-no-openvg', '-no-pch', # NIS is deprecated in more recent glibc - "-no-nis"] + '-no-nis'] # Don't disable all the database drivers, but should # really get them into spack at some point. -- cgit v1.2.3-60-g2f50 From 87b70e2cb45660c5c037dfce963c5dc946b2daf5 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 31 Mar 2016 14:07:03 -0500 Subject: remove the part I added to setup-env.sh as this does not work unless the modules package is already built. --- share/spack/setup-env.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 529517ff83..764af68400 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -176,13 +176,3 @@ _spack_pathadd PATH "${_sp_prefix%/}/bin" _sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') _spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" - -# -# Use spack built modules package if available -# for system that does not have it -# - -_modules_install_path=$(command spack location -i modules) -if [ -n "$_modules_install_path" ] ; then - . $_modules_install_path/Modules/init/sh -fi -- cgit v1.2.3-60-g2f50 From b1b94d2b7f35e898489b0044beb22df249967548 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 31 Mar 2016 13:59:49 -0700 Subject: Added the initial version of the 'zoltan' package. --- var/spack/repos/builtin/packages/zoltan/package.py | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 var/spack/repos/builtin/packages/zoltan/package.py diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py new file mode 100644 index 0000000000..91d3c305f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -0,0 +1,52 @@ +from spack import * + +class Zoltan(Package): + """The Zoltan library is a toolkit of parallel combinatorial algorithms for + parallel, unstructured, and/or adaptive scientific applications. Zoltan's + largest component is a suite of dynamic load-balancing and paritioning + algorithms that increase applications' parallel performance by reducing + idle time. Zoltan also has graph coloring and graph ordering algorithms, + which are useful in task schedulers and parallel preconditioners.""" + + homepage = "http://www.cs.sandia.gov/zoltan" + base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions" + + version('3.83', '1ff1bc93f91e12f2c533ddb01f2c095f') + version('3.3', '5eb8f00bda634b25ceefa0122bd18d65') + + variant('fortran', default=True, description='Enable Fortran support') + variant('mpi', default=False, description='Enable MPI support') + + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + config_args = [ + '--enable-f90interface' if '+fortan' in spec else '--disable-f90interface', + '--enable-mpi' if '+mpi' in spec else '--disable-mpi', + ] + + if '+mpi' in spec: + config_args.append('--with-mpi=%s' % spec['mpi'].prefix) + config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) + + # NOTE: Early versions of Zoltan come packaged with a few embedded + # library packages (e.g. ParMETIS, Scotch), which messes with Spack's + # ability to descend directly into the package's source directory. + if spec.satisfies('@:3.3'): + cd('Zoltan_v%s' % self.version) + + mkdirp('build') + cd('build') + + config_zoltan = Executable('../configure') + config_zoltan('--prefix=%s' % pwd(), *config_args) + + make() + make('install') + + mkdirp(prefix) + move('include', prefix) + move('lib', prefix) + + def url_for_version(self, version): + return '%s/zoltan_distrib_v%s.tar.gz' % (Zoltan.base_url, version) -- cgit v1.2.3-60-g2f50 From 09d657e98e50fd0194e35cfea39105ea31bd5e55 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 31 Mar 2016 14:36:32 -0700 Subject: Fixed the MPI variant for the 'zoltan' package. --- var/spack/repos/builtin/packages/zoltan/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 91d3c305f8..e20ae81adb 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -28,6 +28,8 @@ class Zoltan(Package): if '+mpi' in spec: config_args.append('--with-mpi=%s' % spec['mpi'].prefix) config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) + config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin) + config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin) # NOTE: Early versions of Zoltan come packaged with a few embedded # library packages (e.g. ParMETIS, Scotch), which messes with Spack's -- cgit v1.2.3-60-g2f50 From d4e6b15d981a6bad77cb6f36cdc3a41adf05525b Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 15:15:23 -0400 Subject: Fixed TCL/Tk --- var/spack/repos/builtin/packages/tcl/package.py | 7 +++++-- var/spack/repos/builtin/packages/tk/package.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index 529adf7788..c2cb09ab46 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -9,9 +9,12 @@ class Tcl(Package): that is truly cross platform, easily deployed and highly extensible.""" homepage = "http://www.tcl.tk" + urlpat = 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' - version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', - url="http://prdownloads.sourceforge.net/tcl/tcl8.6.3-src.tar.gz") + version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') + version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304', url=urlpat%'8.6.4') + version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', url=urlpat%'8.6.3') + version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 96736f6f95..6da0a423a9 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -10,7 +10,7 @@ class Tk(Package): homepage = "http://www.tcl.tk" url = "http://prdownloads.sourceforge.net/tcl/tk8.6.3-src.tar.gz" - version('src', '85ca4dbf4dcc19777fd456f6ee5d0221') + version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221') depends_on("tcl") -- cgit v1.2.3-60-g2f50 From cfd5e69b816eaca1a4d6d4467d5f1113fa0af407 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 15:16:28 -0400 Subject: Added Environment Modules package. --- .../packages/environment-modules/package.py | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/environment-modules/package.py diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py new file mode 100644 index 0000000000..df903fddf8 --- /dev/null +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -0,0 +1,27 @@ +from spack import * + + +class EnvironmentModules(Package): + """Environment Modules for HPC""" + + homepage = "https://sourceforge.net/p/modules/wiki/Home/" + url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz" + + version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') + + # Dependencies: + depends_on('tcl') + + def install(self, spec, prefix): + # See: https://sourceforge.net/p/modules/bugs/62/ + CPPFLAGS = ['-DUSE_INTERP_ERRORLINE'] + config_args = [ + "--prefix=%s" % prefix, + "--with-tcl=%s" % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh + 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) + ] + + + configure(*config_args) + make() + make("install") -- cgit v1.2.3-60-g2f50 From 459aab628d73c7f6f1d4eecbf64b34ca334e0ada Mon Sep 17 00:00:00 2001 From: citibeth Date: Fri, 1 Apr 2016 16:00:58 -0400 Subject: Added documentation for installing Environment Modules with Spack. --- lib/spack/docs/basic_usage.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index accf09cc2a..0727e12f6e 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -774,6 +774,34 @@ Environment modules Spack provides some limited integration with environment module systems to make it easier to use the packages it provides. + +Installing Environment Modules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to use Spack's generated environment modules, you must have +installed the *Environment Modules* package. On many Linux +distributions, this can be installed from the vendor's repository. +For example: ```yum install environment-modules`` +(Fedora/RHEL/CentOS). If your Linux distribution does not have +Environment Modules, you can get it with Spack: + +1. Install with:: + + spack install environment-modules + +2. Activate with:: + + MODULES_HOME=`spack location -i environment-modules` + MODULES_VERSION=`ls -1 $MODULES_HOME/Modules | head -1` + ${MODULES_HOME}/Modules/${MODULES_VERSION}/bin/add.modules + +This adds to your ``.bashrc`` (or similar) files, enabling Environment +Modules when you log in. It will ask your permission before changing +any files. + +Spack and Environment Modules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + You can enable shell support by sourcing some files in the ``/share/spack`` directory. -- cgit v1.2.3-60-g2f50 From e4f7b78e9b4ddf1d4fd7dac4782068f07626d9e0 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 16:36:31 -0400 Subject: Fixed tk, and used uverridden url_for_version(). --- var/spack/repos/builtin/packages/tcl/package.py | 12 +++++++----- var/spack/repos/builtin/packages/tk/package.py | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index c2cb09ab46..db8bee88d0 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -9,12 +9,14 @@ class Tcl(Package): that is truly cross platform, easily deployed and highly extensible.""" homepage = "http://www.tcl.tk" - urlpat = 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' - version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') - version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304', url=urlpat%'8.6.4') - version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', url=urlpat%'8.6.3') - version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') + def url_for_version(self, version): + return 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' % version + + version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326') + version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304') + version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f') + version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 6da0a423a9..839d217f34 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -8,7 +8,9 @@ class Tk(Package): applications that run unchanged across Windows, Mac OS X, Linux and more.""" homepage = "http://www.tcl.tk" - url = "http://prdownloads.sourceforge.net/tcl/tk8.6.3-src.tar.gz" + + def url_for_version(self, version): + return "http://prdownloads.sourceforge.net/tcl/tk%s-src.tar.gz" % version version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221') -- cgit v1.2.3-60-g2f50 From 71ffe2f1c40edaa311a8b7d25d87d2c3ca25388f Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Thu, 31 Mar 2016 17:11:57 -0700 Subject: mumps: install mpiseq headers for '~mpi' Prior to this commit, spack installs a library called `libmpiseq` into `spec['mumps'].prefix.lib` when it builds MUMPS without MPI. However, it does not also install the headers corresponding to this library, so it is impossible to compile source files that depend on function calls implemented in this library. This commit fixes this problem by installing these headers, which are needed by packages (e.g., IPOPT) that depend on these headers. --- var/spack/repos/builtin/packages/mumps/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 26440ab7c8..025d86ebdc 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,5 +1,5 @@ from spack import * -import os, sys +import os, sys, glob class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -164,10 +164,13 @@ class Mumps(Package): install_tree('lib', prefix.lib) install_tree('include', prefix.include) - if '~mpi' in spec: + + if '~mpi' in spec: lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' lib_suffix = lib_dsuffix if '+shared' in spec else '.a' install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) + for f in glob.glob(join_path('libseq','*.h')): + install(f, prefix.include) # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI # FIXME: use something like numdiff to compare blessed output with the current -- cgit v1.2.3-60-g2f50 From edf6e9ceacab9aa2d8795340089182ead07c30b3 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Thu, 31 Mar 2016 15:25:32 -0700 Subject: Add ipopt v3.12.4 package. Add package for the nonlinear programming solver IPOPT. This commit depends on the changes made in GitHub PR #711, since IPOPT requires the headers that correspond to the fake MPI implementation in sequential MUMPS. --- var/spack/repos/builtin/packages/ipopt/package.py | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ipopt/package.py diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py new file mode 100644 index 0000000000..13c37bf79c --- /dev/null +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -0,0 +1,51 @@ +from spack import * + +class Ipopt(Package): + """Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a + software package for large-scale nonlinear optimization.""" + homepage = "https://projects.coin-or.org/Ipopt" + url = "http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.4.tgz" + + version('3.12.4', '12a8ecaff8dd90025ddea6c65b49cb03') + version('3.12.3', 'c560cbfa9cbf62acf8b485823c255a1b') + version('3.12.2', 'ec1e855257d7de09e122c446506fb00d') + version('3.12.1', 'ceaf895ce80c77778f2cab68ba9f17f3') + version('3.12.0', 'f7dfc3aa106a6711a85214de7595e827') + + depends_on("blas") + depends_on("lapack") + depends_on("pkg-config") + depends_on("mumps+double~mpi") + + def install(self, spec, prefix): + # Dependency directories + blas_dir = spec['blas'].prefix + lapack_dir = spec['lapack'].prefix + mumps_dir = spec['mumps'].prefix + + # Add directory with fake MPI headers in sequential MUMPS + # install to header search path + mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq" + mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags + + # By convention, spack links blas & lapack libs to libblas & liblapack + blas_lib = "-L%s" % blas_dir.lib + " -lblas" + lapack_lib = "-L%s" % lapack_dir.lib + " -llapack" + + configure_args = [ + "--prefix=%s" % prefix, + "--with-mumps-incdir=%s" % mumps_dir.include, + "--with-mumps-lib=%s" % mumps_libcmd, + "--enable-shared", + "--with-blas-incdir=%s" % blas_dir.include, + "--with-blas-lib=%s" % blas_lib, + "--with-lapack-incdir=%s" % lapack_dir.include, + "--with-lapack-lib=%s" % lapack_lib + ] + + configure(*configure_args) + + # IPOPT does not build correctly in parallel on OS X + make(parallel=False) + make("test", parallel=False) + make("install", parallel=False) -- cgit v1.2.3-60-g2f50 From 624b576b1e21ea476eaf7fdc3ee38a97194e45f7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 2 Apr 2016 12:01:46 +0200 Subject: metis: fix compilation with Clang 7.3.0, add tests --- var/spack/repos/builtin/packages/metis/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 9301135f9f..d3bab554fe 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -79,10 +79,28 @@ class Metis(Package): if '+double' in spec: filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) + # Make clang 7.3 happy. + # Prevents "ld: section __DATA/__thread_bss extends beyond end of file" + # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059 + # Adopted from https://github.com/Homebrew/homebrew-science/blob/master/metis.rb + if spec.satisfies('%clang@7.3.0'): + filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_directory, 'GKlib', 'error.c')) + with working_dir(build_directory, create=True): cmake(source_directory, *options) make() make("install") + # now run some tests: + for f in ["4elt", "copter2", "mdual"]: + graph = join_path(source_directory,'graphs','%s.graph' % f) + Executable(join_path(prefix.bin,'graphchk'))(graph) + Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') + Executable(join_path(prefix.bin,'ndmetis'))(graph) + + graph = join_path(source_directory,'graphs','test.mgraph') + Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') + graph = join_path(source_directory,'graphs','metis.mesh') + Executable(join_path(prefix.bin,'mpmetis'))(graph,'2') # install GKlib headers, which will be needed for ParMETIS GKlib_dist = join_path(prefix.include,'GKlib') -- cgit v1.2.3-60-g2f50 From a88c6da9acc234484d34acf6588c838bef09e8c4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 2 Apr 2016 12:02:29 +0200 Subject: suite-sparse: fix a bug where interla metis was used; add TBB variant --- .../repos/builtin/packages/suite-sparse/package.py | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index c2196dcec4..f2e71f7479 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -10,10 +10,13 @@ class SuiteSparse(Package): version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319') + variant('tbb', default=True, description='Build with Intel TBB') + depends_on('blas') depends_on('lapack') depends_on('metis@5.1.0', when='@4.5.1') + depends_on('tbb', when='+tbb') def install(self, spec, prefix): # The build system of SuiteSparse is quite old-fashioned @@ -21,16 +24,35 @@ class SuiteSparse(Package): # with a lot of convoluted logic in it. # Any kind of customization will need to go through filtering of that file - # FIXME : this actually uses the current workaround - # FIXME : (blas / lapack always provide libblas and liblapack as aliases) - make('install', 'INSTALL=%s' % prefix, + make_args = ['INSTALL=%s' % prefix] - # inject Spack compiler wrappers + # inject Spack compiler wrappers + make_args.extend([ 'AUTOCC=no', 'CC=cc', 'CXX=c++', 'F77=f77', + ]) + + # use Spack's metis in CHOLMOD/Partition module, + # otherwise internal Metis will be compiled + make_args.extend([ + 'MY_METIS_LIB=-L%s -lmetis' % spec['metis'].prefix.lib, + 'MY_METIS_INC=%s' % spec['metis'].prefix.include, + ]) + + # Intel TBB in SuiteSparseQR + if '+tbb' in spec: + make_args.extend([ + 'SPQR_CONFIG=-DHAVE_TBB', + 'TBB=-L%s -ltbb' % spec['tbb'].prefix.lib, + ]) + + # BLAS arguments require path to libraries + # FIXME : (blas / lapack always provide libblas and liblapack as aliases) + make_args.extend([ + 'BLAS=-lblas', + 'LAPACK=-llapack' + ]) - # BLAS arguments require path to libraries - 'BLAS=-lblas', - 'LAPACK=-llapack') + make('install', *make_args) -- cgit v1.2.3-60-g2f50 From adccd18015eec2589d69194fa30be45b04cb515e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 2 Apr 2016 12:02:59 +0200 Subject: dealii: add extra test for Petsc+Metis --- var/spack/repos/builtin/packages/dealii/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 0b76db3827..d8a0df643d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -174,6 +174,19 @@ class Dealii(Package): make('release') make('run',parallel=False) + # An example which uses Metis + PETSc + # FIXME: switch step-18 to MPI + with working_dir('examples/step-18'): + print('=====================================') + print('============= Step-18 ===============') + print('=====================================') + # list the number of cycles to speed up + filter_file(r'(end_time = 10;)', ('end_time = 3;'), 'step-18.cc') + if '^petsc' in spec and '^metis' in spec: + cmake('.') + make('release') + make('run',parallel=False) + # take step-40 which can use both PETSc and Trilinos # FIXME: switch step-40 to MPI run with working_dir('examples/step-40'): -- cgit v1.2.3-60-g2f50 From 2126683203f4b8bf88aac539bac8bd8643f5bee1 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 2 Apr 2016 12:43:19 -0400 Subject: Added deprecation warning to netcdf-cxx --- var/spack/repos/builtin/packages/netcdf-cxx/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 5334dfb853..582a8e70b4 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -1,7 +1,11 @@ from spack import * class NetcdfCxx(Package): - """C++ compatibility bindings for NetCDF""" + “””Deprecated C++ compatibility bindings for NetCDF. + These do NOT read or write NetCDF-4 files, and are no longer + maintained by Unidata. Developers should migrate to current + NetCDF C++ bindings, in Spack package netcdf-cxx4.””” + homepage = "http://www.unidata.ucar.edu/software/netcdf" url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" -- cgit v1.2.3-60-g2f50 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 1c483ffe4e9b0dc03d469eba9c064461624a81be Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 2 Apr 2016 13:09:56 -0400 Subject: Merged the best of two Spack packages for Environment Modules. Named "environment-modules" to be consistent with Fedora and Ubuntu repositories. See d96ea5b for original packages/modules/package.py --- .../packages/environment-modules/package.py | 14 ++++++++---- .../repos/builtin/packages/modules/package.py | 25 ---------------------- 2 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/modules/package.py diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index df903fddf8..cc5d76760e 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -2,7 +2,8 @@ from spack import * class EnvironmentModules(Package): - """Environment Modules for HPC""" + """The Environment Modules package provides for the dynamic + modification of a user's environment via modulefiles.""" homepage = "https://sourceforge.net/p/modules/wiki/Home/" url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz" @@ -16,12 +17,17 @@ class EnvironmentModules(Package): # See: https://sourceforge.net/p/modules/bugs/62/ CPPFLAGS = ['-DUSE_INTERP_ERRORLINE'] config_args = [ - "--prefix=%s" % prefix, - "--with-tcl=%s" % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh + '--prefix=%s' % prefix, + '--disable-debug', + '--disable-dependency-tracking', + '--disable-silent-rules', + '--disable-versioning', + '--datarootdir=%s' % prefix.share, + '--with-tcl=%s' % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) ] configure(*config_args) make() - make("install") + make('install') diff --git a/var/spack/repos/builtin/packages/modules/package.py b/var/spack/repos/builtin/packages/modules/package.py deleted file mode 100644 index b014ee460c..0000000000 --- a/var/spack/repos/builtin/packages/modules/package.py +++ /dev/null @@ -1,25 +0,0 @@ -from spack import * - -class Modules(Package): - """ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. """ - - homepage = "http://modules.sf.net" - url = "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz" - - version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') - - depends_on("tcl") - - def install(self, spec, prefix): - - options = ['--prefix=%s' % prefix, - '--disable-debug', - '--disable-dependency-tracking', - '--disable-silent-rules', - '--disable-versioning', - '--datarootdir=%s' % prefix.share, - 'CPPFLAGS=-DUSE_INTERP_ERRORLINE'] - - configure(*options) - make() - make("install") -- cgit v1.2.3-60-g2f50 From c952c0ca160c31123104f68c4d1ac732bc473ede Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 2 Apr 2016 15:50:20 -0500 Subject: Added version 1.0 of sympy. Beginning with this version, sympy requires the mpmath package. The py-mpmath package is added in this PR to accommodate that. --- var/spack/repos/builtin/packages/py-mpmath/package.py | 13 +++++++++++++ var/spack/repos/builtin/packages/py-sympy/package.py | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-mpmath/package.py diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py new file mode 100644 index 0000000000..4d3261ae8f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mpmath/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyMpmath(Package): + """A Python library for arbitrary-precision floating-point arithmetic.""" + homepage = "http://mpmath.org" + url = "https://pypi.python.org/packages/source/m/mpmath/mpmath-all-0.19.tar.gz" + + version('0.19', 'd1b7e19dd6830d0d7b5e1bc93d46c02c') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py index c17e35b95f..bbce8c74e3 100644 --- a/var/spack/repos/builtin/packages/py-sympy/package.py +++ b/var/spack/repos/builtin/packages/py-sympy/package.py @@ -6,8 +6,10 @@ class PySympy(Package): url = "https://pypi.python.org/packages/source/s/sympy/sympy-0.7.6.tar.gz" version('0.7.6', '3d04753974306d8a13830008e17babca') + version('1.0', '43e797de799f00f9e8fd2307dba9fab1') extends('python') + depends_on('py-mpmath', when='@1.0:') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From e436f84244278f842822051a4049ef8418507709 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 2 Apr 2016 20:21:56 -0400 Subject: Update HDF5 to 1.10.0 --- var/spack/repos/builtin/packages/hdf5/package.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 513a38ee8a..1bf01e7423 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -37,6 +37,8 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 + version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199', + url='http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz') version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') @@ -80,10 +82,16 @@ class Hdf5(Package): # sanity check in configure, so this doesn't merit a variant. extra_args.append("--enable-unsupported") - if '+debug' in spec: - extra_args.append('--enable-debug=all') + if spec.satisfies('@1.10:'): + if '+debug' in spec: + extra_args.append('--enable-build-mode=debug') + else: + extra_args.append('--enable-build-mode=production') else: - extra_args.append('--enable-production') + if '+debug' in spec: + extra_args.append('--enable-debug=all') + else: + extra_args.append('--enable-production') if '+shared' in spec: extra_args.append('--enable-shared') -- cgit v1.2.3-60-g2f50 From 40c279ef95a92ef3274fda7ae8dbff4c790ff4cd Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Sun, 3 Apr 2016 00:10:22 -0400 Subject: Fixed evil non-ASCII quotes --- var/spack/repos/builtin/packages/netcdf-cxx/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 582a8e70b4..8aa1d8b236 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -1,10 +1,10 @@ from spack import * class NetcdfCxx(Package): - “””Deprecated C++ compatibility bindings for NetCDF. + """Deprecated C++ compatibility bindings for NetCDF. These do NOT read or write NetCDF-4 files, and are no longer maintained by Unidata. Developers should migrate to current - NetCDF C++ bindings, in Spack package netcdf-cxx4.””” + NetCDF C++ bindings, in Spack package netcdf-cxx4.""" homepage = "http://www.unidata.ucar.edu/software/netcdf" url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" -- cgit v1.2.3-60-g2f50 From e0ff3f16cc142fb9ca55cc1c6000fb230627f8fe Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 3 Apr 2016 19:41:20 +0200 Subject: dealii: blacklist boost --- var/spack/repos/builtin/packages/dealii/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index d8a0df643d..1f763ad358 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -23,8 +23,10 @@ class Dealii(Package): # required dependencies, light version depends_on ("blas") - depends_on ("boost", when='~mpi') - depends_on ("boost+mpi", when='+mpi') + # Boost 1.58 is blacklisted, see https://github.com/dealii/dealii/issues/1591 + # require at least 1.59 + depends_on ("boost@1.59.0:", when='~mpi') + depends_on ("boost@1.59.0:+mpi", when='+mpi') depends_on ("bzip2") depends_on ("cmake") depends_on ("lapack") -- cgit v1.2.3-60-g2f50 From 79836520d989a19bc49b912698b22fdc8a65ca59 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 3 Apr 2016 21:38:29 -0400 Subject: Fixed up to work on a machine without any system-install tcl. --- var/spack/repos/builtin/packages/environment-modules/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index cc5d76760e..45181da41b 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -14,16 +14,21 @@ class EnvironmentModules(Package): depends_on('tcl') def install(self, spec, prefix): + tcl_spec = spec['tcl'] + # See: https://sourceforge.net/p/modules/bugs/62/ CPPFLAGS = ['-DUSE_INTERP_ERRORLINE'] config_args = [ - '--prefix=%s' % prefix, + "--without-tclx", + "--with-tclx-ver=0.0", + "--prefix=%s" % prefix, + "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'), # It looks for tclConfig.sh + "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[0], tcl_spec.version.version[1]), '--disable-debug', '--disable-dependency-tracking', '--disable-silent-rules', '--disable-versioning', '--datarootdir=%s' % prefix.share, - '--with-tcl=%s' % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) ] -- cgit v1.2.3-60-g2f50 From 2f4d8a634d19debbe069f3c44b4d2d6822f693cb Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 15:45:09 -0400 Subject: Fix conditional extends (BUG #683) --- lib/spack/spack/modules.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index f6a11c92e3..d797af287d 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -163,9 +163,14 @@ class EnvModule(object): # package-specific modifications spack_env = EnvironmentModifications() for item in self.pkg.extendees: - package = self.spec[item].package - package.setup_dependent_package(self.pkg.module, self.spec) - package.setup_dependent_environment(spack_env, env, self.spec) + try: + package = self.spec[item].package + package.setup_dependent_package(self.pkg.module, self.spec) + package.setup_dependent_environment(spack_env, env, self.spec) + except: + # The extends was conditional, so it doesn't count here + # eg: extends('python', when='+python') + pass # Package-specific environment modifications self.spec.package.setup_environment(spack_env, env) -- cgit v1.2.3-60-g2f50 From c3f7b035fdf82c6a9d1d078f9c8c4f36a4158d99 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 16:34:45 -0400 Subject: dbus: Added missing dependency (expat) --- var/spack/repos/builtin/packages/dbus/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 422f5a19eb..74ce8ef502 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -20,6 +20,8 @@ class Dbus(Package): version('1.8.4', '4717cb8ab5b80978fcadf2b4f2f72e1b') version('1.8.2', 'd6f709bbec0a022a1847c7caec9d6068') + depends_on('expat') + def install(self, spec, prefix): configure( "--prefix=%s" % prefix, -- cgit v1.2.3-60-g2f50 From 2809fe95db84956b93824402cf4e00d1c437f14e Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 12:14:38 -0400 Subject: git: added comment about newly discovered dependency --- var/spack/repos/builtin/packages/git/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 586b6ce3c3..388f84aefd 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -36,6 +36,8 @@ class Git(Package): depends_on("curl", when="+curl") depends_on("expat", when="+expat") + # Also depends_on gettext: apt-get install gettext (Ubuntu) + # Use system perl for now. # depends_on("perl") # depends_on("pcre") -- cgit v1.2.3-60-g2f50 From 0bf61ad57be3d7c3b301639b5af0c196820ec96d Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 16:35:36 -0400 Subject: libxcb: Added comments on two dependencies Spack does not yet know how to build. --- var/spack/repos/builtin/packages/libxcb/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 1dd5954c99..d7d94c4546 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -14,6 +14,9 @@ class Libxcb(Package): depends_on("python") depends_on("xcb-proto") + # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev + # depends_on('xau') # Ubuntu: apt-get install libxau-dev + def patch(self): filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h') -- cgit v1.2.3-60-g2f50 From 14f073d410abb599801fb933e5518fdc43cea7ef Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 15:46:53 -0400 Subject: py-pillow: Updated for variants, but still having trouble getting it to use Spack-supplied libjpeg. --- .../repos/builtin/packages/py-pillow/package.py | 63 +++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index adc8507bd5..66d9bb4382 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -1,4 +1,5 @@ from spack import * +import os class PyPillow(Package): """Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.""" @@ -7,8 +8,68 @@ class PyPillow(Package): url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz" version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d') + provides('PIL') + + # These defaults correspond to Pillow defaults + variant('jpeg', default=True, description='Provide JPEG functionality') + variant('zlib', default=True, description='Access to compressed PNGs') + variant('tiff', default=False, description='Access to TIFF files') + variant('freetype', default=False, description='Font related services') + variant('tk', default=False, description='Support for tkinter bitmap and photo images') + variant('lcms', default=False, description='Color management') + + # Spack does not (yet) support these modes of building + # variant('webp', default=False, description='') + # variant('webpmux', default=False, description='') + # variant('jpeg2000', default=False, description='') + extends('python') + depends_on('binutils') depends_on('py-setuptools') + depends_on('jpeg', when='+jpeg') # BUG: It will use the system libjpeg anyway + depends_on('zlib', when='+zlib') + depends_on('tiff', when='+tiff') + depends_on('freetype', when='+freetype') + depends_on('lcms', when='+lcms') + depends_on('tcl', when='+tk') + depends_on('tk', when='+tk') + def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) + libpath=[] + + if '+jpeg' in spec: + libpath.append(join_path(spec['jpeg'].prefix, 'lib')) + if '+zlib' in spec: + libpath.append(join_path(spec['zlib'].prefix, 'lib')) + if '+tiff' in spec: + libpath.append(join_path(spec['tiff'].prefix, 'lib')) + if '+freetype' in spec: + libpath.append(join_path(spec['freetype'].prefix, 'lib')) + if '+lcms' in spec: + libpath.append(join_path(spec['lcms'].prefix, 'lib')) + + # This has not been tested, and likely needs some other treatment. + #if '+tk' in spec: + # libpath.append(join_path(spec['tcl'].prefix, 'lib')) + # libpath.append(join_path(spec['tk'].prefix, 'lib')) + + # -------- Building + cmd = ['build_ext', + '--%s-jpeg' % ('enable' if '+jpeg' in spec else 'disable'), + '--%s-zlib' % ('enable' if '+zlib' in spec else 'disable'), + '--%s-tiff' % ('enable' if '+tiff' in spec else 'disable'), + '--%s-freetype' % ('enable' if '+freetype' in spec else 'disable'), + '--%s-lcms' % ('enable' if '+lcms' in spec else 'disable'), + '-L'+':'.join(libpath) # NOTE: This does not make it find libjpeg + ] + + #if '+tk' in spec: + # cmd.extend(['--enable-tcl', '--enable-tk']) + #else: + # cmd.extend(['--disable-tcl', '--disable-tk']) + + # --------- Installation + cmd.extend(['install', '--prefix=%s' % prefix]) + + python('setup.py', *cmd) -- cgit v1.2.3-60-g2f50 From 131d34f318a9955ff05c35eb8de0b399c31d5cc2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 4 Apr 2016 09:05:27 +0200 Subject: suite-sparse: temporary disable TBB due to linking errors --- var/spack/repos/builtin/packages/suite-sparse/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index f2e71f7479..a4b3979a15 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -10,13 +10,18 @@ class SuiteSparse(Package): version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319') - variant('tbb', default=True, description='Build with Intel TBB') + # FIXME: (see below) + # variant('tbb', default=True, description='Build with Intel TBB') depends_on('blas') depends_on('lapack') depends_on('metis@5.1.0', when='@4.5.1') - depends_on('tbb', when='+tbb') + # FIXME: + # in @4.5.1. TBB support in SPQR seems to be broken as TBB-related linkng flags + # does not seem to be used, which leads to linking errors on Linux. + # Try re-enabling in future versions. + # depends_on('tbb', when='+tbb') def install(self, spec, prefix): # The build system of SuiteSparse is quite old-fashioned -- cgit v1.2.3-60-g2f50 From 401dcb363539409e7b94d8ce016bc1a2e70db3a1 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 4 Apr 2016 10:28:47 +0200 Subject: uninstall : renamed `--recursive` to `--dependents` --- lib/spack/spack/cmd/uninstall.py | 6 +++--- lib/spack/spack/test/cmd/uninstall.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 7aadd254e8..231c6fe661 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -62,7 +62,7 @@ def setup_parser(subparser): "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( - '-r', '--recursive', action='store_true', dest='recursive', + '-d', '--dependents', action='store_true', dest='dependents', help='Also uninstall any packages that depend on the ones given via command line.' ) subparser.add_argument( @@ -168,7 +168,7 @@ def uninstall(parser, args): # Process dependent_list and update uninstall_list has_error = False - if dependent_list and not args.recursive and not args.force: + if dependent_list and not args.dependents and not args.force: for spec, lst in dependent_list.items(): tty.error("Will not uninstall %s" % spec.format("$_$@$%@$#", color=True)) print('') @@ -176,7 +176,7 @@ def uninstall(parser, args): display_specs(lst, long=True) print('') has_error = True - elif args.recursive: + elif args.dependents: for key, lst in dependent_list.items(): uninstall_list.extend(lst) uninstall_list = list(set(uninstall_list)) diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py index 06a24e2958..80efe06d36 100644 --- a/lib/spack/spack/test/cmd/uninstall.py +++ b/lib/spack/spack/test/cmd/uninstall.py @@ -4,11 +4,11 @@ from spack.cmd.uninstall import uninstall class MockArgs(object): - def __init__(self, packages, all=False, force=False, recursive=False): + def __init__(self, packages, all=False, force=False, dependents=False): self.packages = packages self.all = all self.force = force - self.recursive = recursive + self.dependents = dependents self.yes_to_all = True @@ -22,7 +22,7 @@ class TestUninstall(spack.test.mock_database.MockDatabase): args = MockArgs(['libelf']) self.assertRaises(SystemExit, uninstall, parser, args) # Recursive uninstall - args = MockArgs(['callpath'], all=True, recursive=True) + args = MockArgs(['callpath'], all=True, dependents=True) uninstall(parser, args) all_specs = spack.install_layout.all_specs() -- cgit v1.2.3-60-g2f50 From f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 4 Apr 2016 10:59:01 +0200 Subject: uninstall : updated documentation and error messages --- lib/spack/docs/basic_usage.rst | 42 +++++++++++++++++++++++++++++----------- lib/spack/spack/cmd/uninstall.py | 9 ++++----- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index accf09cc2a..72a02802fb 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -149,26 +149,46 @@ customize an installation in :ref:`sec-specs`. ``spack uninstall`` ~~~~~~~~~~~~~~~~~~~~~ -To uninstall a package, type ``spack uninstall ``. This will -completely remove the directory in which the package was installed. +To uninstall a package, type ``spack uninstall ``. This will ask the user for +confirmation, and in case will completely remove the directory in which the package was installed. .. code-block:: sh spack uninstall mpich If there are still installed packages that depend on the package to be -uninstalled, spack will refuse to uninstall it. You can override this -behavior with ``spack uninstall -f ``, but you risk breaking -other installed packages. In general, it is safer to remove dependent -packages *before* removing their dependencies. +uninstalled, spack will refuse to uninstall it. -A line like ``spack uninstall mpich`` may be ambiguous, if multiple -``mpich`` configurations are installed. For example, if both +To uninstall a package and every package that depends on it, you may give the +`--dependents` option. + +.. code-block:: sh + + spack uninstall --dependents mpich + +will display a list of all the packages that depends on `mpich` and, upon confirmation, +will uninstall them in the right order. + +A line like + +.. code-block:: sh + + spack uninstall mpich + +may be ambiguous, if multiple ``mpich`` configurations are installed. For example, if both ``mpich@3.0.2`` and ``mpich@3.1`` are installed, ``mpich`` could refer to either one. Because it cannot determine which one to uninstall, -Spack will ask you to provide a version number to remove the -ambiguity. As an example, ``spack uninstall mpich@3.1`` is -unambiguous in this scenario. +Spack will ask you either to provide a version number to remove the +ambiguity or use the ``--all`` option to uninstall all of the matching packages. + +You may force uninstall a package with the `--force` option + +.. code-block:: sh + + spack uninstall --force mpich + +but you risk breaking other installed packages. In general, it is safer to remove dependent +packages *before* removing their dependencies or use the `--dependents` option. Seeing installed packages diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 231c6fe661..1ff3d8db5f 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -24,7 +24,6 @@ ############################################################################## from __future__ import print_function -import sys import argparse import llnl.util.tty as tty @@ -48,8 +47,8 @@ def ask_for_confirmation(message): if choice == 'y': break elif choice == 'n': - sys.exit(1) - tty.warning('Please reply either "y" or "n"') + raise SystemExit('Operation aborted') + tty.warn('Please reply either "y" or "n"') def setup_parser(subparser): @@ -164,7 +163,7 @@ def uninstall(parser, args): specs = spack.cmd.parse_specs(args.packages) # Gets the list of installed specs that match the ones give via cli uninstall_list = concretize_specs(specs, args.all, args.force) # takes care of '-a' is given in the cli - dependent_list = installed_dependents(uninstall_list) # takes care of '-r' + dependent_list = installed_dependents(uninstall_list) # takes care of '-d' # Process dependent_list and update uninstall_list has_error = False @@ -182,7 +181,7 @@ def uninstall(parser, args): uninstall_list = list(set(uninstall_list)) if has_error: - tty.die('You can use spack uninstall -r to uninstall these dependencies as well') + tty.die('You can use spack uninstall --dependents to uninstall these dependencies as well') if not args.yes_to_all: tty.msg("The following packages will be uninstalled : ") -- cgit v1.2.3-60-g2f50 From bb968fc5a2bf2ceb585676646f68ec2029a298b1 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 4 Apr 2016 02:52:38 -0700 Subject: Fix #620, Resolve #664. Fix issues with build environment. - Also added better regression tests for build environment. --- lib/spack/spack/build_environment.py | 41 ++++------ lib/spack/spack/test/install.py | 29 +++++-- .../builtin.mock/packages/cmake-client/package.py | 89 ++++++++++++++++++++++ .../repos/builtin.mock/packages/cmake/package.py | 69 +++++++++++++++++ 4 files changed, 197 insertions(+), 31 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/cmake-client/package.py create mode 100644 var/spack/repos/builtin.mock/packages/cmake/package.py diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 640db0c1d1..f4f8037ac0 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -213,7 +213,7 @@ def set_module_variables_for_package(pkg, module): # TODO: of build dependencies, as opposed to link dependencies. # TODO: Currently, everything is a link dependency, but tools like # TODO: this shouldn't be. - m.cmake = which("cmake") + m.cmake = Executable('cmake') # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, @@ -278,21 +278,6 @@ def parent_class_modules(cls): return result -def setup_module_variables_for_dag(pkg): - """Set module-scope variables for all packages in the DAG.""" - for spec in pkg.spec.traverse(order='post'): - # If a user makes their own package repo, e.g. - # spack.repos.mystuff.libelf.Libelf, and they inherit from - # an existing class like spack.repos.original.libelf.Libelf, - # then set the module variables for both classes so the - # parent class can still use them if it gets called. - spkg = spec.package - modules = parent_class_modules(spkg.__class__) - for mod in modules: - set_module_variables_for_package(spkg, mod) - set_module_variables_for_package(spkg, spkg.module) - - def setup_package(pkg): """Execute all environment setup routines.""" spack_env = EnvironmentModifications() @@ -316,20 +301,26 @@ def setup_package(pkg): set_compiler_environment_variables(pkg, spack_env) set_build_environment_variables(pkg, spack_env) - setup_module_variables_for_dag(pkg) - # Allow dependencies to modify the module + # traverse in postorder so package can use vars from its dependencies spec = pkg.spec - for dependency_spec in spec.traverse(root=False): - dpkg = dependency_spec.package - dpkg.setup_dependent_package(pkg.module, spec) + for dspec in pkg.spec.traverse(order='post'): + # If a user makes their own package repo, e.g. + # spack.repos.mystuff.libelf.Libelf, and they inherit from + # an existing class like spack.repos.original.libelf.Libelf, + # then set the module variables for both classes so the + # parent class can still use them if it gets called. + spkg = dspec.package + modules = parent_class_modules(spkg.__class__) + for mod in modules: + set_module_variables_for_package(spkg, mod) + set_module_variables_for_package(spkg, spkg.module) - # Allow dependencies to set up environment as well - for dependency_spec in spec.traverse(root=False): - dpkg = dependency_spec.package + # Allow dependencies to modify the module + dpkg = dspec.package + dpkg.setup_dependent_package(pkg.module, spec) dpkg.setup_dependent_environment(spack_env, run_env, spec) - # Allow the package to apply some settings. pkg.setup_environment(spack_env, run_env) # Make sure nothing's strange about the Spack environment. diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index 8297893f01..fc5b7e67df 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -64,7 +64,14 @@ class InstallTest(MockPackagesTest): shutil.rmtree(self.tmpdir, ignore_errors=True) - def test_install_and_uninstall(self): + def fake_fetchify(self, pkg): + """Fake the URL for a package so it downloads from a file.""" + fetcher = FetchStrategyComposite() + fetcher.append(URLFetchStrategy(self.repo.url)) + pkg.fetcher = fetcher + + + def ztest_install_and_uninstall(self): # Get a basic concrete spec for the trivial install package. spec = Spec('trivial_install_test_package') spec.concretize() @@ -73,11 +80,7 @@ class InstallTest(MockPackagesTest): # Get the package pkg = spack.repo.get(spec) - # Fake the URL for the package so it downloads from a file. - - fetcher = FetchStrategyComposite() - fetcher.append(URLFetchStrategy(self.repo.url)) - pkg.fetcher = fetcher + self.fake_fetchify(pkg) try: pkg.do_install() @@ -85,3 +88,17 @@ class InstallTest(MockPackagesTest): except Exception, e: pkg.remove_prefix() raise + + + def test_install_environment(self): + spec = Spec('cmake-client').concretized() + + for s in spec.traverse(): + self.fake_fetchify(s.package) + + pkg = spec.package + try: + pkg.do_install() + except Exception, e: + pkg.remove_prefix() + raise diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py new file mode 100644 index 0000000000..a5d3ef156a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py @@ -0,0 +1,89 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os + +def check(condition, msg): + """Raise an install error if condition is False.""" + if not condition: + raise InstallError(msg) + + +class CmakeClient(Package): + """A dumy package that uses cmake.""" + homepage = 'https://www.example.com' + url = 'https://www.example.com/cmake-client-1.0.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') + + depends_on('cmake') + + + def setup_environment(self, spack_env, run_env): + spack_cc # Ensure spack module-scope variable is avaiabl + check(from_cmake == "from_cmake", + "setup_environment couldn't read global set by cmake.") + + check(self.spec['cmake'].link_arg == "test link arg", + "link arg on dependency spec not readable from setup_environment.") + + + def setup_dependent_environment(self, spack_env, run_env, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + check(from_cmake == "from_cmake", + "setup_dependent_environment couldn't read global set by cmake.") + + check(self.spec['cmake'].link_arg == "test link arg", + "link arg on dependency spec not readable from setup_dependent_environment.") + + + def setup_dependent_package(self, module, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + check(from_cmake == "from_cmake", + "setup_dependent_package couldn't read global set by cmake.") + + check(self.spec['cmake'].link_arg == "test link arg", + "link arg on dependency spec not readable from setup_dependent_package.") + + + + def install(self, spec, prefix): + # check that cmake is in the global scope. + global cmake + check(cmake is not None, "No cmake was in environment!") + + # check that which('cmake') returns the right one. + cmake = which('cmake') + check(cmake.exe[0].startswith(spec['cmake'].prefix.bin), + "Wrong cmake was in environment: %s" % cmake) + + check(from_cmake == "from_cmake", + "Couldn't read global set by cmake.") + + check(os.environ['from_cmake'] == 'from_cmake', + "Couldn't read env var set in envieonmnt by dependency") + + mkdirp(prefix.bin) + touch(join_path(prefix.bin, 'dummy')) diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py new file mode 100644 index 0000000000..deb44c2bf7 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cmake/package.py @@ -0,0 +1,69 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# 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 Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os + +def check(condition, msg): + """Raise an install error if condition is False.""" + if not condition: + raise InstallError(msg) + + +class Cmake(Package): + """A dumy package for the cmake build system.""" + homepage = 'https://www.cmake.org' + url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('3.4.3', '4cb3ff35b2472aae70f542116d616e63', + url='https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz') + + + def setup_environment(self, spack_env, run_env): + spack_cc # Ensure spack module-scope variable is avaiable + spack_env.set('for_install', 'for_install') + + def setup_dependent_environment(self, spack_env, run_env, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + spack_env.set('from_cmake', 'from_cmake') + + + def setup_dependent_package(self, module, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + + self.spec.from_cmake = "from_cmake" + module.from_cmake = "from_cmake" + + self.spec.link_arg = "test link arg" + + + def install(self, spec, prefix): + mkdirp(prefix.bin) + + check(os.environ['for_install'] == 'for_install', + "Couldn't read env var set in compile envieonmnt") + + cmake_exe = join_path(prefix.bin, 'cmake') + touch(cmake_exe) + set_executable(cmake_exe) -- cgit v1.2.3-60-g2f50 From 7197f1578335b38eb2037e8d82f15a27d786d5c1 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Fri, 1 Apr 2016 12:28:46 -0400 Subject: Add version 2.6.7 of py-setuptools --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index c6d9be1add..9338a5e157 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -10,6 +10,7 @@ class PySetuptools(Package): version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') + version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') extends('python') -- 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 badf5b047b5cca851c3cad14b4cb7167103ed229 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 14:42:36 -0400 Subject: Calculate version string in a function --- var/spack/repos/builtin/packages/hdf5/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 1bf01e7423..f26e225b83 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -37,8 +37,7 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 - version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199', - url='http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz') + version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') @@ -147,5 +146,7 @@ class Hdf5(Package): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" elif version < Version("1.7"): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" - else: + elif version < Version("1.10"): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + else: + return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" -- cgit v1.2.3-60-g2f50 From d0ca3952a34a74f0167b76bbedfa3cf8875a399c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 2 Apr 2016 20:17:01 -0500 Subject: Add version 0.17.1 of scikit-learn. --- var/spack/repos/builtin/packages/py-scikit-learn/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py index 5b078ce901..7f8e25e69d 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -7,6 +7,7 @@ class PyScikitLearn(Package): version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d') version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e') + version('0.17.1', 'a2f8b877e6d99b1ed737144f5a478dfc') extends('python') -- cgit v1.2.3-60-g2f50 From 3a4210e9d7cbdb1b9a441d41a88e4170d08d2879 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:07:37 -0500 Subject: New package - py-dask (http://dask.pydata.org). --- var/spack/repos/builtin/packages/py-dask/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-dask/package.py diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py new file mode 100644 index 0000000000..725d47b97c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyDask(Package): + """Minimal task scheduling abstraction""" + homepage = "https://github.com/dask/dask/" + url = "https://pypi.python.org/packages/source/d/dask/dask-0.8.1.tar.gz" + + version('0.8.1', '5dd8e3a3823b3bc62c9a6d192e2cb5b4') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From a10ab78e28ca14f923e93029027f763c16fab7fc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:09:11 -0500 Subject: New package - py-decorator (https://github.com/micheles/decorator). --- var/spack/repos/builtin/packages/py-decorator/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-decorator/package.py diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py new file mode 100644 index 0000000000..99e3dbc49c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-decorator/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyDecorator(Package): + """The aim of the decorator module it to simplify the usage of decorators for the average programmer, and to popularize decorators by showing various non-trivial examples.""" + homepage = "https://github.com/micheles/decorator" + url = "https://pypi.python.org/packages/source/d/decorator/decorator-4.0.9.tar.gz" + + version('4.0.9', 'f12c5651ccd707e12a0abaa4f76cd69a') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From 8404f084c8d768a197b830ff1809eb35f505ca8d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:12:42 -0500 Subject: New package - py-networkx (https://networkx.github.io/). --- var/spack/repos/builtin/packages/py-networkx/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-networkx/package.py diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py new file mode 100644 index 0000000000..893146ec3e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-networkx/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyNetworkx(Package): + """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.""" + homepage = "http://networkx.github.io/" + url = "https://pypi.python.org/packages/source/n/networkx/networkx-1.11.tar.gz" + + version('1.11', '6ef584a879e9163013e9a762e1cf7cd1') + + extends('python') + + depends_on('py-decorator') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From 9c60f122a6ffa877d265d523e52e8a4018c2bdec Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:13:31 -0500 Subject: New package - py-scikit-image (http://scikit-image.org/). --- .../builtin/packages/py-scikit-image/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-scikit-image/package.py diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py new file mode 100644 index 0000000000..22ce1f8374 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -0,0 +1,20 @@ +from spack import * + +class PyScikitImage(Package): + """Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc.""" + homepage = "http://scikit-image.org/" + url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz" + + version('0.12.3', '04ea833383e0b6ad5f65da21292c25e1') + + extends('python', ignore=r'bin/.*\.py$|bin/f2py$') + + depends_on('py-dask') + depends_on('py-pillow') + depends_on('py-networkx') + depends_on('py-six') + depends_on('py-scipy') + depends_on('py-matplotlib') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- 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 9bb99de0a75a9f9c2cc1ad65596a7219fa700a76 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 13:47:48 -0600 Subject: + When using CMake, use Release instead of RelWithDebInfo flags. --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 640db0c1d1..1346af2285 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -217,7 +217,7 @@ def set_module_variables_for_package(pkg, module): # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, - '-DCMAKE_BUILD_TYPE=RelWithDebInfo'] + '-DCMAKE_BUILD_TYPE=Release'] if platform.mac_ver()[0]: m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST') -- 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 cd3086f78d878a86c78672110bbc3fba4894a401 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 14:35:09 -0600 Subject: + Since CBLAS is only provided in 3.6.0 or later, modify package.py to on refer to CBLAS when the latest release is requested. --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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..d1252efb9b 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,15 +34,18 @@ 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 +83,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 db23d27eb4c7b6be36a0b9df19160cbd3af511e4 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 14:41:41 -0600 Subject: + Revert accidental commit that set CMAKE_BUILD_TYPE=Release. --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 2ef874803c..f4f8037ac0 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -217,7 +217,7 @@ def set_module_variables_for_package(pkg, module): # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, - '-DCMAKE_BUILD_TYPE=Release'] + '-DCMAKE_BUILD_TYPE=RelWithDebInfo'] if platform.mac_ver()[0]: m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST') -- cgit v1.2.3-60-g2f50 From 0296f96c7b5279b2dd9cf585a493f21e3344fe2b Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 4 Apr 2016 13:56:15 -0700 Subject: Resolves #739. Don't call setup_dependent_* for package itself. --- lib/spack/spack/build_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index f4f8037ac0..eb72f2a6b4 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -304,7 +304,7 @@ def setup_package(pkg): # traverse in postorder so package can use vars from its dependencies spec = pkg.spec - for dspec in pkg.spec.traverse(order='post'): + for dspec in pkg.spec.traverse(order='post', root=False): # If a user makes their own package repo, e.g. # spack.repos.mystuff.libelf.Libelf, and they inherit from # an existing class like spack.repos.original.libelf.Libelf, @@ -321,6 +321,7 @@ def setup_package(pkg): dpkg.setup_dependent_package(pkg.module, spec) dpkg.setup_dependent_environment(spack_env, run_env, spec) + set_module_variables_for_package(pkg, pkg.module) pkg.setup_environment(spack_env, run_env) # Make sure nothing's strange about the Spack environment. -- cgit v1.2.3-60-g2f50 From c0eb5844e536c25165b913f4dc203fe09f8ecc3d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:05:30 -0600 Subject: + Provide dia, a program for drawing structured diagrams. --- var/spack/repos/builtin/packages/dia/package.py | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dia/package.py diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py new file mode 100644 index 0000000000..0c8bbfc425 --- /dev/null +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -0,0 +1,67 @@ +from spack import * + +class Dia(Package): + """Dia is a program for drawing structured diagrams.""" + homepage = 'https://wiki.gnome.org/Apps/Dia' + url = 'https://ftp.gnome.org/pub/gnome/sources/dia/0.97/dia-0.97.3.tar.xz' + + version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') + + #variant('ncurses', default=True, description='Enables the build of the ncurses gui') + #variant('openssl', default=True, description="Enables CMake's OpenSSL features") + #variant('qt', default=False, description='Enables the build of cmake-gui') + #variant('doc', default=False, description='Enables the generation of html and man page documentation') + + depends_on('gtkplus@2.6.0:') + # depends_on('openssl', when='+openssl') + #depends_on('qt', when='+qt') + #depends_on('python@2.7.11:', when='+doc') + depends_on('cairo') + #depends_on('libart') # optional dependency, not yet supported by spack. + depends_on('libpng') + depends_on('libxslt') + depends_on('python') + depends_on('swig') + # depends_on('py-gtk') # optional dependency, not yet supported by spack. + + def url_for_version(self, version): + """Handle Dia's version-based custom URLs.""" + return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version) + + # def validate(self, spec): + # """ + # Checks if incompatible versions of qt were specified + + # :param spec: spec of the package + # :raises RuntimeError: in case of inconsistencies + # """ + + # if '+qt' in spec and spec.satisfies('^qt@5.4.0'): + # msg = 'qt-5.4.0 has broken CMake modules.' + # raise RuntimeError(msg) + + def install(self, spec, prefix): + # Consistency check + # self.validate(spec) + + # configure, build, install: + options = ['--prefix=%s' % prefix, + '--with-cairo', + '--with-xslt-prefix=%s' % spec['libxslt'].prefix, + '--with-python', + '--with-swig'] + + # if '+qt' in spec: + # options.append('--qt-gui') + + # if '+doc' in spec: + # options.append('--sphinx-html') + # options.append('--sphinx-man') + + # if '+openssl' in spec: + # options.append('--') + # options.append('-DCMAKE_USE_OPENSSL=ON') + + configure(*options) + make() + make('install') -- cgit v1.2.3-60-g2f50 From 77b688f4fa197c2b7d1e792e038e51ed52e5be2a Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:08:19 -0600 Subject: + Don't include files submitted with PR#741. --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index d1252efb9b..05436332ac 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,18 +34,15 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - if self.spec.satisfies('@3.6.0:'): - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + 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 @@ -83,3 +80,6 @@ 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 3a3f9789ce001a3dc61274eac67ddfc53d91df4c Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:10:28 -0600 Subject: + General cleanup of package.py. --- var/spack/repos/builtin/packages/dia/package.py | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py index 0c8bbfc425..1cb5910e46 100644 --- a/var/spack/repos/builtin/packages/dia/package.py +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -7,15 +7,7 @@ class Dia(Package): version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') - #variant('ncurses', default=True, description='Enables the build of the ncurses gui') - #variant('openssl', default=True, description="Enables CMake's OpenSSL features") - #variant('qt', default=False, description='Enables the build of cmake-gui') - #variant('doc', default=False, description='Enables the generation of html and man page documentation') - depends_on('gtkplus@2.6.0:') - # depends_on('openssl', when='+openssl') - #depends_on('qt', when='+qt') - #depends_on('python@2.7.11:', when='+doc') depends_on('cairo') #depends_on('libart') # optional dependency, not yet supported by spack. depends_on('libpng') @@ -28,21 +20,7 @@ class Dia(Package): """Handle Dia's version-based custom URLs.""" return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version) - # def validate(self, spec): - # """ - # Checks if incompatible versions of qt were specified - - # :param spec: spec of the package - # :raises RuntimeError: in case of inconsistencies - # """ - - # if '+qt' in spec and spec.satisfies('^qt@5.4.0'): - # msg = 'qt-5.4.0 has broken CMake modules.' - # raise RuntimeError(msg) - def install(self, spec, prefix): - # Consistency check - # self.validate(spec) # configure, build, install: options = ['--prefix=%s' % prefix, @@ -51,17 +29,6 @@ class Dia(Package): '--with-python', '--with-swig'] - # if '+qt' in spec: - # options.append('--qt-gui') - - # if '+doc' in spec: - # options.append('--sphinx-html') - # options.append('--sphinx-man') - - # if '+openssl' in spec: - # options.append('--') - # options.append('-DCMAKE_USE_OPENSSL=ON') - configure(*options) make() make('install') -- cgit v1.2.3-60-g2f50 From 48d70d960cb76783ff2d5f431b88ea1c0bf4c8a8 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:05:30 -0600 Subject: + Provide dia, a program for drawing structured diagrams. --- var/spack/repos/builtin/packages/dia/package.py | 34 ++++++++++++++++++++++ .../builtin/packages/netlib-lapack/package.py | 12 ++++---- 2 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/dia/package.py diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py new file mode 100644 index 0000000000..1cb5910e46 --- /dev/null +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -0,0 +1,34 @@ +from spack import * + +class Dia(Package): + """Dia is a program for drawing structured diagrams.""" + homepage = 'https://wiki.gnome.org/Apps/Dia' + url = 'https://ftp.gnome.org/pub/gnome/sources/dia/0.97/dia-0.97.3.tar.xz' + + version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') + + depends_on('gtkplus@2.6.0:') + depends_on('cairo') + #depends_on('libart') # optional dependency, not yet supported by spack. + depends_on('libpng') + depends_on('libxslt') + depends_on('python') + depends_on('swig') + # depends_on('py-gtk') # optional dependency, not yet supported by spack. + + def url_for_version(self, version): + """Handle Dia's version-based custom URLs.""" + return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version) + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix, + '--with-cairo', + '--with-xslt-prefix=%s' % spec['libxslt'].prefix, + '--with-python', + '--with-swig'] + + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index d1252efb9b..05436332ac 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,18 +34,15 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - if self.spec.satisfies('@3.6.0:'): - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + 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 @@ -83,3 +80,6 @@ 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 aaf2830b8be96ca3584bc0cca87c86bc5b4355a0 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 19:40:05 -0400 Subject: Require cmake --- var/spack/repos/builtin/packages/netlib-scalapack/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index d59f8e41fe..276876d197 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -18,6 +18,7 @@ class NetlibScalapack(Package): provides('scalapack') + depends_on('cmake') depends_on('mpi') depends_on('lapack') -- cgit v1.2.3-60-g2f50 From 2b3a8a4a5afc3f263a66b02b2f3cce9a5d1787fc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 19:01:44 -0500 Subject: Add missing dependencies. --- var/spack/repos/builtin/packages/py-scikit-learn/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py index 7f8e25e69d..2d7985b98c 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -11,5 +11,9 @@ class PyScikitLearn(Package): extends('python') + depends_on('py-setuptools') + depends_on('py-numpy') + depends_on('py-scipy') + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-60-g2f50 From c546b75443eea9bc8fe7b5427cdd7eba5afb5add Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 19:23:48 -0500 Subject: Add missing dependency on py-setuptools for - py-dask - py-decorator --- var/spack/repos/builtin/packages/py-dask/package.py | 2 ++ var/spack/repos/builtin/packages/py-decorator/package.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 725d47b97c..cf0a16f21e 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -9,5 +9,7 @@ class PyDask(Package): extends('python') + depends_on('py-setuptools') + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py index 99e3dbc49c..abbd9f43d1 100644 --- a/var/spack/repos/builtin/packages/py-decorator/package.py +++ b/var/spack/repos/builtin/packages/py-decorator/package.py @@ -9,5 +9,7 @@ class PyDecorator(Package): extends('python') + depends_on('py-setuptools') + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- 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 a87ae5173f5e30aa9d8b3360e67dbc17568342f5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 18:16:25 -0400 Subject: Update Julia - allow checking out the master branche - add dependencies requires by important Julia package - add OpenBLAS patch --- .../repos/builtin/packages/julia/openblas.patch | 68 ++++++++++++++++++++++ var/spack/repos/builtin/packages/julia/package.py | 68 ++++++++++++++-------- 2 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 var/spack/repos/builtin/packages/julia/openblas.patch diff --git a/var/spack/repos/builtin/packages/julia/openblas.patch b/var/spack/repos/builtin/packages/julia/openblas.patch new file mode 100644 index 0000000000..f75d7dd04f --- /dev/null +++ b/var/spack/repos/builtin/packages/julia/openblas.patch @@ -0,0 +1,68 @@ +diff --git a/deps/Makefile b/deps/Makefile +index 6cb73be..bcd8520 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -1049,7 +1049,7 @@ OPENBLAS_BUILD_OPTS += NO_AFFINITY=1 + + # Build for all architectures - required for distribution + ifeq ($(OPENBLAS_DYNAMIC_ARCH), 1) +-OPENBLAS_BUILD_OPTS += DYNAMIC_ARCH=1 ++OPENBLAS_BUILD_OPTS += DYNAMIC_ARCH=1 MAKE_NO_J=1 + endif + + # 64-bit BLAS interface +@@ -1085,6 +1085,7 @@ OPENBLAS_BUILD_OPTS += NO_AVX2=1 + endif + + $(OPENBLAS_SRC_DIR)/config.status: $(OPENBLAS_SRC_DIR)/Makefile ++ cd $(dir $@) && patch -p1 < ../openblas-make.patch + ifeq ($(OS),WINNT) + cd $(dir $@) && patch -p1 < ../openblas-win64.patch + endif +diff --git a/deps/openblas.version b/deps/openblas.version +index 7c97e1b..58b9467 100644 +--- a/deps/openblas.version ++++ b/deps/openblas.version +@@ -1,2 +1,2 @@ +-OPENBLAS_BRANCH=v0.2.15 +-OPENBLAS_SHA1=53e849f4fcae4363a64576de00e982722c7304f9 ++OPENBLAS_BRANCH=v0.2.17 ++OPENBLAS_SHA1=a71e8c82f6a9f73093b631e5deab1e8da716b61f +--- a/deps/openblas-make.patch ++++ b/deps/openblas-make.patch +@@ -0,0 +1,35 @@ ++diff --git a/Makefile.system b/Makefile.system ++index b89f60e..2dbdad0 100644 ++--- a/Makefile.system +++++ b/Makefile.system ++@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0 ++ endif ++ GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE) ++ +++ifdef MAKE_NO_J +++GETARCH_FLAGS += -DMAKE_NO_J=$(MAKE_NO_J) +++endif +++ ++ ifdef MAKE_NB_JOBS ++ GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS) ++ endif ++diff --git a/getarch.c b/getarch.c ++index f9c49e6..dffad70 100644 ++--- a/getarch.c +++++ b/getarch.c ++@@ -1012,6 +1012,7 @@ int main(int argc, char *argv[]){ ++ #endif ++ #endif ++ +++#ifndef MAKE_NO_J ++ #ifdef MAKE_NB_JOBS ++ printf("MAKE += -j %d\n", MAKE_NB_JOBS); ++ #elif NO_PARALLEL_MAKE==1 ++@@ -1021,6 +1022,7 @@ int main(int argc, char *argv[]){ ++ printf("MAKE += -j %d\n", get_num_cores()); ++ #endif ++ #endif +++#endif ++ ++ break; ++ diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 6900af38e4..b3a523bc45 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -4,43 +4,55 @@ import os class Julia(Package): """The Julia Language: A fresh approach to technical computing""" homepage = "http://julialang.org" - url = "http://github.com/JuliaLang/julia/releases/download/v0.4.2/julia-0.4.2.tar.gz" + url = "https://github.com/JuliaLang/julia/releases/download/v0.4.3/julia-0.4.3-full.tar.gz" - version('0.4.3', '7b9f096798fca4bef262a64674bc2b52') - version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') + version('master', + git='https://github.com/JuliaLang/julia.git', branch='master') + version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') + version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch') + patch('gc.patch', when='@:0.5') + patch('openblas.patch') - # Build-time dependencies - depends_on("cmake @2.8:") + # Build-time dependencies: # depends_on("awk") # depends_on("m4") # depends_on("pkg-config") - depends_on("python @2.6:2.9") - # I think that Julia requires the dependencies above, but it builds find (on - # my system) without these. We should enable them as necessary. + # Combined build-time and run-time dependencies: + depends_on("cmake @2.8:") + depends_on("git") + depends_on("openssl") + depends_on("python @2.7:2.999") + + # I think that Julia requires the dependencies above, but it + # builds fine (on my system) without these. We should enable them + # as necessary. - # Run-time dependencies + # Run-time dependencies: # depends_on("arpack") # depends_on("fftw +float") # depends_on("gmp") + # depends_on("libgit") # depends_on("mpfr") + # depends_on("openblas") # depends_on("pcre2") - # ARPACK: Requires BLAS and LAPACK; needs to use the same version as Julia. + # ARPACK: Requires BLAS and LAPACK; needs to use the same version + # as Julia. - # BLAS and LAPACK: Julia prefers 64-bit versions on 64-bit systems. OpenBLAS - # has an option for this; make it available as variant. + # BLAS and LAPACK: Julia prefers 64-bit versions on 64-bit + # systems. OpenBLAS has an option for this; make it available as + # variant. - # FFTW: Something doesn't work when using a pre-installed FFTW library; need - # to investigate. + # FFTW: Something doesn't work when using a pre-installed FFTW + # library; need to investigate. - # GMP, MPFR: Something doesn't work when using a pre-installed FFTW library; - # need to investigate. + # GMP, MPFR: Something doesn't work when using a pre-installed + # FFTW library; need to investigate. - # LLVM: Julia works only with specific versions, and might require patches. - # Thus we let Julia install its own LLVM. + # LLVM: Julia works only with specific versions, and might require + # patches. Thus we let Julia install its own LLVM. # Other possible dependencies: # USE_SYSTEM_OPENLIBM=0 @@ -50,11 +62,21 @@ class Julia(Package): # USE_SYSTEM_UTF8PROC=0 # USE_SYSTEM_LIBGIT2=0 + # Run-time dependencies for Julia packages: + depends_on("hdf5") + depends_on("mpi") + def install(self, spec, prefix): - # Explicitly setting CC, CXX, or FC breaks building libuv, one of - # Julia's dependencies. This might be a Darwin-specific problem. Given - # how Spack sets up compilers, Julia should still use Spack's compilers, - # even if we don't specify them explicitly. + if '@master' in spec: + # Julia needs to know the offset from a specific commit + git = which('git') + git('fetch', '--unshallow') + + # Explicitly setting CC, CXX, or FC breaks building libuv, one + # of Julia's dependencies. This might be a Darwin-specific + # problem. Given how Spack sets up compilers, Julia should + # still use Spack's compilers, even if we don't specify them + # explicitly. options = [#"CC=cc", #"CXX=c++", #"FC=fc", -- cgit v1.2.3-60-g2f50 From 0ebb192b2f26cfd2bbadc9be72c36469c7493d89 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 5 Apr 2016 10:36:20 -0700 Subject: Update the MRNet package with the latest source and patch related to the krell tools needs. Also, reorder the list of version to match with the spack standard: newest to oldest. --- .../repos/builtin/packages/mrnet/krell-5.0.1.patch | 154 +++++++++++++++++++++ var/spack/repos/builtin/packages/mrnet/package.py | 17 ++- 2 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch diff --git a/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch b/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch new file mode 100644 index 0000000000..53294fbbc6 --- /dev/null +++ b/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch @@ -0,0 +1,154 @@ +--- mrnet-3093918/include/mrnet/Types.h 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/include/mrnet/Types.h 2016-03-16 12:29:33.986132302 -0700 +@@ -23,7 +23,7 @@ + #ifndef MRNET_VERSION_MAJOR + # define MRNET_VERSION_MAJOR 5 + # define MRNET_VERSION_MINOR 0 +-# define MRNET_VERSION_REV 0 ++# define MRNET_VERSION_REV 1 + #endif + + namespace MRN +--- mrnet-3093918/include/mrnet_lightweight/Types.h 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/include/mrnet_lightweight/Types.h 2016-03-16 12:29:33.987132302 -0700 +@@ -30,7 +30,7 @@ + #ifndef MRNET_VERSION_MAJOR + #define MRNET_VERSION_MAJOR 5 + #define MRNET_VERSION_MINOR 0 +-#define MRNET_VERSION_REV 0 ++#define MRNET_VERSION_REV 1 + #endif + void get_Version(int* major, + int* minor, +--- mrnet-3093918/src/lightweight/SerialGraph.c 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/src/lightweight/SerialGraph.c 2016-03-16 12:29:33.995132302 -0700 +@@ -59,7 +59,7 @@ + + mrn_dbg_func_begin(); + +- sprintf(hoststr, "[%s:%hu:%u:", ihostname, iport, irank); ++ sprintf(hoststr, "[%s:%05hu:%u:", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "looking for SubTreeRoot: '%s'\n", hoststr)); + + byte_array = sg->byte_array; +@@ -110,7 +110,7 @@ + + mrn_dbg_func_begin(); + +- len = (size_t) sprintf(hoststr, "[%s:%hu:%u:0]", ihostname, iport, irank); ++ len = (size_t) sprintf(hoststr, "[%s:%05hu:%u:0]", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "adding sub tree leaf: %s\n", hoststr)); + + len += strlen(sg->byte_array) + 1; +@@ -139,7 +139,7 @@ + + mrn_dbg_func_begin(); + +- len = (size_t) sprintf(hoststr, "[%s:%hu:%u:1", ihostname, iport, irank); ++ len = (size_t) sprintf(hoststr, "[%s:%05hu:%u:1", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "adding sub tree root: %s\n", hoststr)); + + len += strlen(sg->byte_array) + 1; +@@ -360,8 +360,8 @@ + char old_hoststr[256]; + char new_hoststr[256]; + +- sprintf(old_hoststr, "[%s:%hu:%u:", hostname, UnknownPort, irank); +- sprintf(new_hoststr, "[%s:%hu:%u:", hostname, port, irank); ++ sprintf(old_hoststr, "[%s:%05hu:%u:", hostname, UnknownPort, irank); ++ sprintf(new_hoststr, "[%s:%05hu:%u:", hostname, port, irank); + + old_byte_array = sg->byte_array; + new_byte_array = (char*) malloc( strlen(old_byte_array) + 10 ); +--- mrnet-3093918/xplat/src/lightweight/SocketUtils.c 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/xplat/src/lightweight/SocketUtils.c 2016-03-16 12:29:34.006132303 -0700 +@@ -15,7 +15,7 @@ + #else + const XPlat_Socket InvalidSocket = INVALID_SOCKET; + #endif +-const XPlat_Port InvalidPort = (XPlat_Port)-1; ++const XPlat_Port InvalidPort = (XPlat_Port)0; + + static bool_t SetTcpNoDelay( XPlat_Socket sock ) + { +--- mrnet-3093918/conf/configure.in 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/conf/configure.in 2016-03-16 12:45:54.573196781 -0700 +@@ -107,6 +107,18 @@ + AC_SUBST(PURIFY) + + ++AC_ARG_WITH(expat, ++ [AS_HELP_STRING([--with-expat=PATH], ++ [Absolute path to installation of EXPAT libraries (note: specify the path to the directory containing "include" and "lib" sub-directories)])], ++ [EXPAT_DIR="${withval}"], ++ [EXPAT_DIR=""]) ++ ++if test "x$EXPAT_DIR" = "x" ; then ++ EXPAT_LIB="" ++else ++ EXPAT_LIB="-L$EXPAT_DIR/lib" ++fi ++ + dnl === Checks for header files. + AC_CHECK_HEADERS([assert.h errno.h fcntl.h limits.h netdb.h signal.h stddef.h stdlib.h stdio.h string.h unistd.h arpa/inet.h netinet/in.h sys/ioctl.h sys/socket.h sys/sockio.h sys/time.h]) + AC_HEADER_STDBOOL +@@ -432,7 +444,7 @@ + CRAYXT_ATH_LIBS_SO="$CRAYXT_ATH_LIBS -lalps" + CRAYXT_ATH_LIBS="$CRAYXT_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc -Wl,-Bdynamic" + CRAYXE_ATH_LIBS_SO="$CRAYXE_ATH_LIBS -lalps" +- CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi -lexpat -Wl,-Bdynamic" ++ CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi $EXPAT_LIB -lexpat -Wl,-Bdynamic" + + AC_CHECK_LIB( [alps], [alps_launch_tool_helper], + [HAVE_ATH_LIBS="yes"; EXTRA_LIBS="$CRAYXT_ATH_LIBS $EXTRA_LIBS"; EXTRA_LIBS_SO="$CRAYXT_ATH_LIBS_SO $EXTRA_LIBS_SO"], +--- mrnet-3093918/configure 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/configure 2016-03-16 13:47:20.386439143 -0700 +@@ -742,6 +742,7 @@ + enable_debug + enable_ltwt_threadsafe + with_purify ++with_expat + ' + ac_precious_vars='build_alias + host_alias +@@ -1399,6 +1400,9 @@ + containing "include" and "lib" sub-directories) + --with-launchmon=PATH Absolute path to installation of LaunchMON + --with-purify Use purify for memory debugging ++ --with-expat=PATH Absolute path to installation of EXPAT libraries ++ (note: specify the path to the directory containing ++ "include" and "lib" sub-directories) + + Some influential environment variables: + CC C compiler command +@@ -3541,6 +3545,21 @@ + + + ++# Check whether --with-expat was given. ++if test "${with_expat+set}" = set; then : ++ withval=$with_expat; EXPAT_DIR="${withval}" ++else ++ EXPAT_DIR="" ++fi ++ ++ ++if test "x$EXPAT_DIR" = "x" ; then ++ EXPAT_LIB="" ++else ++ EXPAT_LIB="-L$EXPAT_DIR/lib" ++fi ++ ++ + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -5473,7 +5492,7 @@ + CRAYXT_ATH_LIBS_SO="$CRAYXT_ATH_LIBS -lalps" + CRAYXT_ATH_LIBS="$CRAYXT_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc -Wl,-Bdynamic" + CRAYXE_ATH_LIBS_SO="$CRAYXE_ATH_LIBS -lalps" +- CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi -lexpat -Wl,-Bdynamic" ++ CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi $EXPAT_LIB -lexpat -Wl,-Bdynamic" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alps_launch_tool_helper in -lalps" >&5 + $as_echo_n "checking for alps_launch_tool_helper in -lalps... " >&6; } diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index fed944e45f..b8cbb7e8f9 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -3,16 +3,25 @@ from spack import * class Mrnet(Package): """The MRNet Multi-Cast Reduction Network.""" homepage = "http://paradyn.org/mrnet" - url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz" + url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" + list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" - version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') - version('4.1.0', '5a248298b395b329e2371bf25366115c') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') + version('4.1.0', '5a248298b395b329e2371bf25366115c') + version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') + + # Add a patch that brings mrnet-5.0.1 up to date with the current development tree + # The development tree contains fixes needed for the krell based tools + variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") + patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') + + variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False - depends_on("boost") + #depends_on("boost") + depends_on("boost@1.53.0") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present -- 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 From 7d19154e1852ad43af889505e19a36873d0e9c18 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:01:28 -0400 Subject: pkg-config: use the internal glib glib requires pkg-config itself, so on machines without pkg-config, there's a bootstrapping problem. --- var/spack/repos/builtin/packages/pkg-config/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py index 9964c6ce34..a803bc3f9b 100644 --- a/var/spack/repos/builtin/packages/pkg-config/package.py +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -10,7 +10,12 @@ class PkgConfig(Package): parallel = False def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") + configure("--prefix=%s" %prefix, + "--enable-shared", + "--with-internal-glib") # There's a bootstrapping problem here; + # glib uses pkg-config as well, so + # break the cycle by using the internal + # glib. make() make("install") -- cgit v1.2.3-60-g2f50 From 6c409d6b9238199370512ff8a8d30c6b2ff67769 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:05 -0400 Subject: py-matplotlib: depend on pkg-config On OS X, freetype isn't found by default, but pkg-config can. --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 45e77dd631..19194c942e 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -26,6 +26,7 @@ class PyMatplotlib(Package): depends_on('py-pbr') depends_on('py-funcsigs') + depends_on('pkg-config') depends_on('freetype') depends_on('qt', when='+gui') depends_on('bzip2') -- cgit v1.2.3-60-g2f50 From dcd6b1934808e3700a3d1fc71e261087d9e71ae7 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:36 -0400 Subject: py-setuptools: sort versions --- var/spack/repos/builtin/packages/py-setuptools/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index c6d9be1add..38158f4d27 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -5,11 +5,11 @@ class PySetuptools(Package): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" - version('11.3.1', '01f69212e019a2420c1693fb43593930') - version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') - version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') - version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') + version('19.2', '78353b1f80375ca5e088f4b4627ffe03') + version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') + version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') + version('11.3.1', '01f69212e019a2420c1693fb43593930') extends('python') -- cgit v1.2.3-60-g2f50 From 9eaf735bcdba9f3fd8a51219d0eebb61f8b2f166 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:45 -0400 Subject: py-setuptools: add 20.6.7 --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 38158f4d27..bc3420a25e 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -5,6 +5,7 @@ class PySetuptools(Package): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" + version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') -- cgit v1.2.3-60-g2f50 From 1af88be3712d1b6090a2dde5d7a68405f7372ca7 Mon Sep 17 00:00:00 2001 From: Matthew LeGendre Date: Fri, 8 Apr 2016 11:06:14 -0700 Subject: Spack was no longer using $TMPDIR for its stage area at LLNL. Spack's directory search was unnecessarily putting candidates that contained your username at the end of its search list. --- lib/spack/spack/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index aee11f061f..9108e1d0e3 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -136,9 +136,7 @@ for path in _tmp_candidates: # don't add a second username if it's already unique by user. if not _tmp_user in path: tmp_dirs.append(join_path(path, '%u', 'spack-stage')) - -for path in _tmp_candidates: - if not path in tmp_dirs: + else: tmp_dirs.append(join_path(path, 'spack-stage')) # Whether spack should allow installation of unsafe versions of -- cgit v1.2.3-60-g2f50 From f461b9972265df09e8ff9ac5c99a3f3d96783883 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Apr 2016 14:31:40 -0400 Subject: Building OpenBLAS requires recent binutils --- var/spack/repos/builtin/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index b3a523bc45..75d13fda8f 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -20,6 +20,7 @@ class Julia(Package): # depends_on("pkg-config") # Combined build-time and run-time dependencies: + depends_on("binutils") depends_on("cmake @2.8:") depends_on("git") depends_on("openssl") -- cgit v1.2.3-60-g2f50 From 3a4aac0213f46ff233b6252be5db7c645501ab34 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:08:09 -0400 Subject: paraview: use the right cmake variables --- var/spack/repos/builtin/packages/paraview/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index c16054816c..888add3033 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -75,13 +75,13 @@ class Paraview(Package): cmake('..', '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, '-DBUILD_TESTING:BOOL=OFF', - '-DVTK_USER_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USER_SYSTEM_HDF5:BOOL=ON', - '-DVTK_USER_SYSTEM_JPEG:BOOL=ON', - '-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USER_SYSTEM_NETCDF:BOOL=ON', - '-DVTK_USER_SYSTEM_TIFF:BOOL=ON', - '-DVTK_USER_SYSTEM_ZLIB:BOOL=ON', + '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', + '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', + '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', *feature_args) make() make('install') -- cgit v1.2.3-60-g2f50 From 6e56ba9f24df62ad205006a6b7bc13ae067a6623 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:08:29 -0400 Subject: paraview: use internal netcdf VTK needs to learn to cope with netcdf being split like this. --- var/spack/repos/builtin/packages/paraview/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 888add3033..13cd076286 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -33,7 +33,8 @@ class Paraview(Package): depends_on('libpng') depends_on('libtiff') depends_on('libxml2') - depends_on('netcdf') + #depends_on('netcdf') + #depends_on('netcdf-cxx') #depends_on('protobuf') # version mismatches? #depends_on('sqlite') # external version not supported depends_on('zlib') @@ -79,7 +80,7 @@ class Paraview(Package): '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USE_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', *feature_args) -- cgit v1.2.3-60-g2f50 From 20b9f34b5c650eefb23f4118bb52985c468a9098 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:09:02 -0400 Subject: paraview: use internal hdf5 Spack's HDF5 is too new. Rather than forcing everything in a ParaView chain to use older HDF5, use the internal one until ParaView is patched properly. --- var/spack/repos/builtin/packages/paraview/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 13cd076286..60f8d3c243 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -27,8 +27,8 @@ class Paraview(Package): depends_on('bzip2') depends_on('freetype') - depends_on('hdf5+mpi', when='+mpi') - depends_on('hdf5~mpi', when='~mpi') + #depends_on('hdf5+mpi', when='+mpi') + #depends_on('hdf5~mpi', when='~mpi') depends_on('jpeg') depends_on('libpng') depends_on('libtiff') @@ -77,7 +77,7 @@ class Paraview(Package): '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, '-DBUILD_TESTING:BOOL=OFF', '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=OFF', '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', -- cgit v1.2.3-60-g2f50 From df7e3f8635530574c5190d9501f2fdf1b0aa0aff Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 9 Apr 2016 09:58:48 -0400 Subject: Correct version dependency for OpenBLAS patch --- var/spack/repos/builtin/packages/julia/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 75d13fda8f..25d782266b 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -11,8 +11,8 @@ class Julia(Package): version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch', when='@:0.5') - patch('openblas.patch') + patch('gc.patch') + patch('openblas.patch', when='@0.4:0.4.5') # Build-time dependencies: # depends_on("awk") -- cgit v1.2.3-60-g2f50 From cb6c6fb3747aafbfb0fe81803eacf2807dde301f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Apr 2016 16:28:30 -0500 Subject: Add elk package --- var/spack/repos/builtin/packages/elk/package.py | 116 +++++++++++++++++++++ var/spack/repos/builtin/packages/libxc/package.py | 18 ++++ .../repos/builtin/packages/openblas/package.py | 6 ++ 3 files changed, 140 insertions(+) create mode 100644 var/spack/repos/builtin/packages/elk/package.py create mode 100644 var/spack/repos/builtin/packages/libxc/package.py diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py new file mode 100644 index 0000000000..28ebb89db3 --- /dev/null +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -0,0 +1,116 @@ +from spack import * +import spack + +class Elk(Package): + '''An all-electron full-potential linearised augmented-plane wave + (FP-LAPW) code with many advanced features.''' + + homepage = 'http://elk.sourceforge.net/' + url = 'https://sourceforge.net/projects/elk/files/elk-3.3.17.tgz' + + version('3.3.17', 'f57f6230d14f3b3b558e5c71f62f0592') + + # Elk provides these libraries, but allows you to specify your own + variant('blas', default=True, description='Build with custom BLAS library') + variant('lapack', default=True, description='Build with custom LAPACK library') + variant('fft', default=True, description='Build with custom FFT library') + + # Elk does not provide these libraries, but allows you to use them + variant('mpi', default=True, description='Enable MPI parallelism') + variant('openmp', default=True, description='Enable OpenMP support') + variant('libxc', default=True, description='Link to Libxc functional library') + + depends_on('blas', when='+blas') + depends_on('lapack', when='+lapack') + depends_on('fftw', when='+fft') + depends_on('mpi', when='+mpi') + depends_on('libxc', when='+libxc') + + # Cannot be built in parallel + parallel = False + + + def configure(self, spec): + # Dictionary of configuration options + config = { + 'MAKE': 'make', + 'F90': join_path(spack.build_env_path, 'f90'), + 'F77': join_path(spack.build_env_path, 'f77'), + 'AR': 'ar', + 'LIB_FFT': 'fftlib.a', + 'SRC_MPI': 'mpi_stub.f90', + 'SRC_OMP': 'omp_stub.f90', + 'SRC_libxc': 'libxcifc_stub.f90', + 'SRC_FFT': 'zfftifc.f90' + } + + # Compiler-specific flags + flags = '' + if self.compiler.name == 'intel': + flags = '-O3 -ip -unroll -no-prec-div -openmp' + elif self.compiler.name == 'gcc': + flags = '-O3 -ffast-math -funroll-loops -fopenmp' + elif self.compiler.name == 'pgi': + flags = '-O3 -mp -lpthread' + elif self.compiler.name == 'g95': + flags = '-O3 -fno-second-underscore' + elif self.compiler.name == 'nag': + flags = '-O4 -kind=byte -dusty -dcfuns' + elif self.compiler.name == 'xl': + flags = '-O3 -qsmp=omp' + config['F90_OPTS'] = flags + config['F77_OPTS'] = flags + + # BLAS/LAPACK support + blas = 'blas.a' + lapack = 'lapack.a' + if '+blas' in spec: + blas = join_path(spec['blas'].prefix.lib, 'libblas.so') + if '+lapack' in spec: + lapack = join_path(spec['lapack'].prefix.lib, 'liblapack.so') + config['LIB_LPK'] = ' '.join([lapack, blas]) # lapack must come before blas + + # FFT support + if '+fft' in spec: + config['LIB_FFT'] = join_path(spec['fftw'].prefix.lib, 'libfftw3.so') + config['SRC_FFT'] = 'zfftifc_fftw.f90' + + # MPI support + if '+mpi' in spec: + config.pop('SRC_MPI') + config['F90'] = join_path(spec['mpi'].prefix.bin, 'mpif90') + config['F77'] = join_path(spec['mpi'].prefix.bin, 'mpif77') + + # OpenMP support + if '+openmp' in spec: + config.pop('SRC_OMP') + + # Libxc support + if '+libxc' in spec: + config['LIB_libxc'] = ' '.join([ + join_path(spec['libxc'].prefix.lib, 'libxcf90.so'), + join_path(spec['libxc'].prefix.lib, 'libxc.so') + ]) + config['SRC_libxc'] = ' '.join([ + 'libxc_funcs.f90', + 'libxc.f90', + 'libxcifc.f90' + ]) + + # Write configuration options to include file + with open('make.inc', 'w') as inc: + for key in config: + inc.write('{0} = {1}\n'.format(key, config[key])) + + + def install(self, spec, prefix): + self.configure(spec) + + make() + make('test') + + mkdirp(prefix.bin) + + install('src/elk', prefix.bin) + install('src/eos/eos', prefix.bin) + install('src/spacegroup/spacegroup', prefix.bin) diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py new file mode 100644 index 0000000000..010a5918c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Libxc(Package): + """Libxc is a library of exchange-correlation functionals for + density-functional theory.""" + + homepage = "http://www.tddft.org/programs/octopus/wiki/index.php/Libxc" + url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz" + + version('2.2.2', 'd9f90a0d6e36df6c1312b6422280f2ec') + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--enable-shared') + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 9f13d0690b..4522130ccc 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -12,6 +12,7 @@ class Openblas(Package): 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.") # virtual dependency provides('blas') @@ -37,6 +38,11 @@ class Openblas(Package): if spec.satisfies('@0.2.16'): make_defs += ['BUILD_LAPACK_DEPRECATED=1'] + # Add support for OpenMP + # Note: Make sure your compiler supports OpenMP + if '+openmp' in spec: + make_defs += ['USE_OPENMP=1'] + make_args = make_defs + make_targets make(*make_args) -- cgit v1.2.3-60-g2f50 From 01f2dd03d5fe092ae448ee1a234a197babf38613 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Apr 2016 16:51:27 -0500 Subject: Also install examples directory --- var/spack/repos/builtin/packages/elk/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 28ebb89db3..780c41f726 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -104,13 +104,18 @@ class Elk(Package): def install(self, spec, prefix): + # Elk only provides an interactive setup script self.configure(spec) make() make('test') + # The Elk Makefile does not provide an install target mkdirp(prefix.bin) install('src/elk', prefix.bin) install('src/eos/eos', prefix.bin) install('src/spacegroup/spacegroup', prefix.bin) + + install_tree('examples', join_path(prefix, 'examples')) + -- cgit v1.2.3-60-g2f50 From abe744c5a099fd988ff3fe5eb1d50cca7a633d74 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Apr 2016 16:53:45 -0500 Subject: Add latest version of PnetCDF --- var/spack/repos/builtin/packages/parallel-netcdf/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index 62a8f7ca0b..e6f8cf026b 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -8,6 +8,7 @@ class ParallelNetcdf(Package): homepage = "https://trac.mcs.anl.gov/projects/parallel-netcdf" url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.6.1.tar.gz" + version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0') version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34') depends_on("m4") -- cgit v1.2.3-60-g2f50 From 04392babca88089de114864cbe5ad419f6fc212b Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 12 Apr 2016 15:53:29 -0700 Subject: add setuptools version 20.7.0 --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 9338a5e157..2086d0b3fb 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -11,6 +11,7 @@ class PySetuptools(Package): version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') + version('20.7.0', '5d12b39bf3e75e80fdce54e44b255615') extends('python') -- cgit v1.2.3-60-g2f50 From 5717cb981e38979727a9340eb118e88166a9f7e3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 13 Apr 2016 15:03:03 -0500 Subject: fortran2003 option has been removed from HDF5 --- var/spack/repos/builtin/packages/hdf5/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index f26e225b83..cce609eb29 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -101,10 +101,10 @@ class Hdf5(Package): extra_args.append('--enable-cxx') if '+fortran' in spec: - extra_args.extend([ - '--enable-fortran', - '--enable-fortran2003' - ]) + extra_args.append('--enable-fortran') + # '--enable-fortran2003' no longer exists as of version 1.10.0 + if spec.satisfies('@:1.8.16'): + extra_args.append('--enable-fortran2003') if '+mpi' in spec: # The HDF5 configure script warns if cxx and mpi are enabled -- cgit v1.2.3-60-g2f50 From 2cf9ebc62c18414ddafb44bdda2b2487f72a4ec5 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Wed, 13 Apr 2016 15:00:45 -0700 Subject: Fix compile issues with new libpng versions and qt3 builds by using an older version of libpng. In libpng, make older versions available. --- var/spack/repos/builtin/packages/libpng/package.py | 3 +++ var/spack/repos/builtin/packages/qt/package.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index 73c8c62341..9d5782896e 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -8,6 +8,9 @@ class Libpng(Package): version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d') version('1.6.15', '829a256f3de9307731d4f52dc071916d') version('1.6.14', '2101b3de1d5f348925990f9aa8405660') + version('1.5.26', '3ca98347a5541a2dad55cd6d07ee60a9') + version('1.4.19', '89bcbc4fc8b31f4a403906cf4f662330') + version('1.2.56', '9508fc59d10a1ffadd9aae35116c19ee') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 8cb88e6c85..93688fb777 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -29,7 +29,8 @@ class Qt(Package): depends_on("zlib") depends_on("dbus", when='@4:') depends_on("libtiff") - depends_on("libpng") + depends_on("libpng@1.2.56", when='@3') + depends_on("libpng", when='@4:') depends_on("libmng") depends_on("jpeg") @@ -120,6 +121,8 @@ class Qt(Package): @when('@3') def configure(self): + # An user report that this was necessary to link Qt3 on ubuntu + os.environ['LD_LIBRARY_PATH'] = os.getcwd()+'/lib' configure('-prefix', self.prefix, '-v', '-thread', -- cgit v1.2.3-60-g2f50 From f9aafeee1e6a33a76dc1904e97f117194915f4d0 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Wed, 13 Apr 2016 21:58:57 -0700 Subject: Loosen the boost requirement from a specific version that was specified in my initial commit. --- var/spack/repos/builtin/packages/mrnet/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index b8cbb7e8f9..a3abb71285 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -15,13 +15,10 @@ class Mrnet(Package): variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') - - variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False - #depends_on("boost") - depends_on("boost@1.53.0") + depends_on("boost") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present -- cgit v1.2.3-60-g2f50 From 01fab24c156e82f2886b464a2474fe3474d5312a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 13 Apr 2016 14:02:25 +0200 Subject: binutils depends on flex, bison, and m4 --- var/spack/repos/builtin/packages/binutils/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 897539a439..b8064093d2 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -12,6 +12,10 @@ class Binutils(Package): version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') + depends_on('m4') + depends_on('flex') + depends_on('bison') + # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell variant('krellpatch', default=False, description="build with openspeedshop based patch.") variant('gold', default=True, description="build the gold linker") -- cgit v1.2.3-60-g2f50 From cf1914fc00bd98a1885edc4d4190f9c424b0588b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 14 Apr 2016 10:18:06 -0500 Subject: Also install species directory --- var/spack/repos/builtin/packages/elk/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 780c41f726..1d9216fd1a 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -118,4 +118,5 @@ class Elk(Package): install('src/spacegroup/spacegroup', prefix.bin) install_tree('examples', join_path(prefix, 'examples')) + install_tree('species', join_path(prefix, 'species')) -- cgit v1.2.3-60-g2f50