From 1acb2a1a09a25a042e30426a70bf96bdb8c489fa Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 19 Apr 2016 16:45:05 -0400 Subject: Add some qthreads patches --- var/spack/repos/builtin/packages/qthreads/ldflags.patch | 11 +++++++++++ var/spack/repos/builtin/packages/qthreads/package.py | 7 ++++++- var/spack/repos/builtin/packages/qthreads/restrict.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/qthreads/trap.patch | 11 +++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/qthreads/ldflags.patch create mode 100644 var/spack/repos/builtin/packages/qthreads/restrict.patch create mode 100644 var/spack/repos/builtin/packages/qthreads/trap.patch diff --git a/var/spack/repos/builtin/packages/qthreads/ldflags.patch b/var/spack/repos/builtin/packages/qthreads/ldflags.patch new file mode 100644 index 0000000000..0c15eab386 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/ldflags.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -40456,7 +40456,7 @@ + hwloc_saved_LDFLAGS="$LDFLAGS" + if test "x$with_hwloc" != x; then + CPPFLAGS="-I$with_hwloc/include $CPPFLAGS" +- LDFLAGS="-L$with_hwloc/lib $CPPFLAGS" ++ LDFLAGS="-L$with_hwloc/lib $LDFLAGS" + fi + + diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index dacdb71524..5da9340927 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -16,7 +16,12 @@ class Qthreads(Package): version('1.10', '5af8c8bbe88c2a6d45361643780d1671') + patch("ldflags.patch") + patch("restrict.patch") + patch("trap.patch") + def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure("--prefix=%s" % prefix, + "--enable-guard-pages") make() make("install") diff --git a/var/spack/repos/builtin/packages/qthreads/restrict.patch b/var/spack/repos/builtin/packages/qthreads/restrict.patch new file mode 100644 index 0000000000..4c95714f6b --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/restrict.patch @@ -0,0 +1,12 @@ +--- a/include/qthread/common.h.in ++++ b/include/qthread/common.h.in +@@ -84,7 +84,9 @@ + /* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ ++#ifndef restrict + #undef restrict ++#endif + /* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the diff --git a/var/spack/repos/builtin/packages/qthreads/trap.patch b/var/spack/repos/builtin/packages/qthreads/trap.patch new file mode 100644 index 0000000000..7aa94d82d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/trap.patch @@ -0,0 +1,11 @@ +--- a/include/qthread/qthread.hpp ++++ b/include/qthread/qthread.hpp +@@ -236,7 +236,7 @@ + return qthread_incr64((uint64_t *)operand, incr); + + default: +- *(int *)(0) = 0; ++ __builtin_trap(); + } + return T(0); // never hit - keep compiler happy + } -- cgit v1.2.3-60-g2f50 From e92da6a6ba02bdc3c879f9df8be6ee4aac2583d3 Mon Sep 17 00:00:00 2001 From: Adam Lyon Date: Mon, 8 Feb 2016 02:34:24 -0600 Subject: Handle c++11 and c++14 correctly --- lib/spack/spack/compiler.py | 3 +++ lib/spack/spack/compilers/gcc.py | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index d38c0b00b1..20896f9eec 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -97,6 +97,9 @@ class Compiler(object): # argument used to get C++11 options cxx11_flag = "-std=c++11" + # argument used to get C++14 options + cxx14_flag = "-std=c++1y" + def __init__(self, cspec, cc, cxx, f77, fc): def check(exe): diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 64214db32d..2e57e44856 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -54,9 +54,16 @@ class Gcc(Compiler): if self.version < ver('4.3'): tty.die("Only gcc 4.3 and above support c++11.") elif self.version < ver('4.7'): - return "-std=gnu++0x" + return "-std=c++0x" else: - return "-std=gnu++11" + return "-std=c++11" + + @property + def cxx14_flag(self): + if self.version < ver('4.8'): + tty.die("Only gcc 4.8 and above support c++14.") + else: + return "-std=c++14" @classmethod def fc_version(cls, fc): -- cgit v1.2.3-60-g2f50 From 55d339194d59f78b001ad939aae2e67f6ebae5ad Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 26 Apr 2016 15:29:16 -0400 Subject: Update hwloc to 1.11.3 --- var/spack/repos/builtin/packages/hwloc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index ab7205646e..a461a7482c 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -17,6 +17,7 @@ class Hwloc(Package): list_url = "http://www.open-mpi.org/software/hwloc/" list_depth = 3 + version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f') version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23') version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc') version('1.9', '1f9f9155682fe8946a97c08896109508') -- cgit v1.2.3-60-g2f50 From 3ad71700dd61d41841a581dc4f59f390dfd112b6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:52:49 +0200 Subject: the_silver_searcher: add missing dependency --- var/spack/repos/builtin/packages/the_silver_searcher/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/the_silver_searcher/package.py b/var/spack/repos/builtin/packages/the_silver_searcher/package.py index e4020b6766..30f06354bf 100644 --- a/var/spack/repos/builtin/packages/the_silver_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py @@ -9,6 +9,7 @@ class TheSilverSearcher(Package): depends_on('pcre') depends_on('xz') + depends_on('pkg-config') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-60-g2f50 From 8fc43046ebfaa41410c28ba6d3d27fffed25ee4e Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 30 Apr 2016 12:11:10 +0200 Subject: Add missing dependency for glm --- var/spack/repos/builtin/packages/glm/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py index d00c301b4c..ecae89f1e8 100644 --- a/var/spack/repos/builtin/packages/glm/package.py +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -11,6 +11,8 @@ class Glm(Package): url = "https://github.com/g-truc/glm/archive/0.9.7.1.tar.gz" version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8') + + depends_on ("cmake") def install(self, spec, prefix): with working_dir('spack-build', create=True): -- cgit v1.2.3-60-g2f50 From c33ffbae043dbc5b8f0dfe1b1e3d6532af20042e Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 30 Apr 2016 21:58:39 +0200 Subject: Add extra dependencies for Paradiseo. --- var/spack/repos/builtin/packages/paradiseo/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py index c254234b32..34766099da 100644 --- a/var/spack/repos/builtin/packages/paradiseo/package.py +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -20,15 +20,20 @@ class Paradiseo(Package): #variant('tests', default=False, description='Compile with build tests') #variant('doc', default=False, description='Compile with documentation') variant('debug', default=False, description='Builds a debug version of the libraries') + variant('openmp', default=False, description='Enable OpenMP support') + variant('gnuplot', default=False, description='Enable GnuPlot support') # Required dependencies depends_on ("cmake") - depends_on ("eigen") # Optional dependencies depends_on ("mpi", when="+mpi") depends_on ("doxygen", when='+doc') - + depends_on ("gnuplot", when='+gnuplot') + depends_on ("eigen", when='+edo') + depends_on ("boost~mpi", when='+edo~mpi') + depends_on ("boost+mpi", when='+edo+mpi') + # Patches patch('enable_eoserial.patch') patch('fix_osx_detection.patch') @@ -45,7 +50,9 @@ class Paradiseo(Package): '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), - '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE') + '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE'), + '-DENABLE_OPENMP:BOOL=%s' % ('TRUE' if '+openmp' in spec else 'FALSE'), + '-DENABLE_GNUPLOT:BOOL=%s' % ('TRUE' if '+gnuplot' in spec else 'FALSE') ]) with working_dir('spack-build', create=True): -- cgit v1.2.3-60-g2f50 From 631e235ef3907916335f965fa179b94455295f31 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sun, 1 May 2016 11:05:51 +0200 Subject: Added Adol-C package --- var/spack/repos/builtin/packages/adol-c/package.py | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 var/spack/repos/builtin/packages/adol-c/package.py diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py new file mode 100644 index 0000000000..a65ec7dd7c --- /dev/null +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -0,0 +1,69 @@ +from spack import * +import sys + +class AdolC(Package): + """A package for the automatic differentiation of first and higher derivatives of vector functions in C and C++ programs by operator overloading.""" + homepage = "https://projects.coin-or.org/ADOL-C" + url = "http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.6.1.tgz" + + version('head', svn='https://projects.coin-or.org/svn/ADOL-C/trunk/') + version('2.6.1', '1032b28427d6e399af4610e78c0f087b') + + variant('doc', default=True, description='Install documentation') + variant('openmp', default=False, description='Enable OpenMP support') + variant('sparse', default=False, description='Enable sparse drivers') + variant('tests', default=True, description='Build all included examples as a test case') + + def install(self, spec, prefix): + make_args = ['--prefix=%s' % prefix] + + # --with-cflags=FLAGS use CFLAGS=FLAGS (default: -O3 -Wall -ansi) + # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) + + if '+openmp' in spec: + make_args.extend([ + '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L + ]) + + if '+sparse' in spec: + make_args.extend([ + '--enable-sparse' + ]) + + # We can simply use the bundled examples to check + # whether Adol-C works as expected + if '+tests' in spec: + make_args.extend([ + '--enable-docexa', # Documeted examples + '--enable-addexa' # Additional examples + ]) + if '+openmp' in spec: + make_args.extend([ + '--enable-parexa' # Parallel examples + ]) + + configure(*make_args) + make() + make("install") + + # Copy the config.h file, as some packages might require it + source_directory = self.stage.source_path + config_h = join_path(source_directory,'ADOL-C/src/config.h') + install(config_h, join_path(prefix.include,'adolc')) + + # Install documentation to {prefix}/share + if '+doc' in spec: + install_tree('ADOL-C/doc',join_path(prefix.share,'doc')) + + # Install examples to {prefix}/share + if '+tests' in spec: + install_tree('ADOL-C/examples',join_path(prefix.share,'examples')) + + # Run some examples that don't require user input + # TODO: Check that bundled examples produce the correct results + with working_dir(join_path(source_directory,'ADOL-C/examples')): + Executable('tapeless_scalar') + Executable('tapeless_vector') + + with working_dir(join_path(source_directory,'ADOL-C/examples/additional_examples')): + Executable('checkpointing/checkpointing') -- cgit v1.2.3-60-g2f50 From 5ae727668235f8a226cdac9e714d9daa004af64c Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Mon, 2 May 2016 11:01:14 +0200 Subject: Fixes to installation with OpenMP (tested) and execution of test-suite --- .../builtin/packages/adol-c/openmp_exam.patch | 13 +++++++++ var/spack/repos/builtin/packages/adol-c/package.py | 33 ++++++++++++++-------- 2 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 var/spack/repos/builtin/packages/adol-c/openmp_exam.patch diff --git a/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch b/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch new file mode 100644 index 0000000000..8e21c72d92 --- /dev/null +++ b/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch @@ -0,0 +1,13 @@ +diff --git a/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp b/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp +index fc6fc28..14103d2 100644 +--- a/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp ++++ b/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp +@@ -27,7 +27,7 @@ using namespace std; + #include + #include + +-#include "adolc.h" ++#include + + #ifdef _OPENMP + #include diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index a65ec7dd7c..70933542ca 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -13,6 +13,8 @@ class AdolC(Package): variant('openmp', default=False, description='Enable OpenMP support') variant('sparse', default=False, description='Enable sparse drivers') variant('tests', default=True, description='Build all included examples as a test case') + + patch('openmp_exam.patch') def install(self, spec, prefix): make_args = ['--prefix=%s' % prefix] @@ -21,9 +23,12 @@ class AdolC(Package): # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) if '+openmp' in spec: - make_args.extend([ - '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L - ]) + if spec.satisfies('%gcc'): + make_args.extend([ + '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L + ]) + else: + raise InstallError("OpenMP flags for compilers other than GCC are not implemented.") if '+sparse' in spec: make_args.extend([ @@ -48,22 +53,28 @@ class AdolC(Package): # Copy the config.h file, as some packages might require it source_directory = self.stage.source_path - config_h = join_path(source_directory,'ADOL-C/src/config.h') + config_h = join_path(source_directory,'ADOL-C','src','config.h') install(config_h, join_path(prefix.include,'adolc')) # Install documentation to {prefix}/share if '+doc' in spec: - install_tree('ADOL-C/doc',join_path(prefix.share,'doc')) + install_tree(join_path('ADOL-C','doc'), + join_path(prefix.share,'doc')) # Install examples to {prefix}/share if '+tests' in spec: - install_tree('ADOL-C/examples',join_path(prefix.share,'examples')) + install_tree(join_path('ADOL-C','examples'), + join_path(prefix.share,'examples')) # Run some examples that don't require user input # TODO: Check that bundled examples produce the correct results - with working_dir(join_path(source_directory,'ADOL-C/examples')): - Executable('tapeless_scalar') - Executable('tapeless_vector') + with working_dir(join_path(source_directory,'ADOL-C','examples')): + Executable('./tapeless_scalar')() + Executable('./tapeless_vector')() - with working_dir(join_path(source_directory,'ADOL-C/examples/additional_examples')): - Executable('checkpointing/checkpointing') + with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + Executable('./checkpointing/checkpointing')() + + if '+openmp' in spec: + with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + Executable('./checkpointing/checkpointing')() -- cgit v1.2.3-60-g2f50 From e111add17f885866e997e7483a0ac32235d9c497 Mon Sep 17 00:00:00 2001 From: Vishal Boddu Date: Mon, 2 May 2016 14:31:02 +0200 Subject: missing dependencies (m4) added for netcdf and autoconf --- var/spack/repos/builtin/packages/autoconf/package.py | 2 ++ var/spack/repos/builtin/packages/netcdf/package.py | 1 + 2 files changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index 6412e810a6..b5e29b8a27 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -8,6 +8,8 @@ class Autoconf(Package): version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b') version('2.62', '6c1f3b3734999035d77da5024aab4fbd') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index b60a2c4e9a..a4d9e5213c 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -21,6 +21,7 @@ class Netcdf(Package): depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support depends_on("zlib") # required for NetCDF-4 support + depends_on("m4") def install(self, spec, prefix): # Environment variables -- cgit v1.2.3-60-g2f50 From 9c3d8dae574560f805f430b042b16821fabcf4ed Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 18 Apr 2016 14:54:38 -0500 Subject: Add latest jpeg version --- var/spack/repos/builtin/packages/jpeg/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py index 87820467db..2f15e59ad4 100644 --- a/var/spack/repos/builtin/packages/jpeg/package.py +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -1,14 +1,19 @@ from spack import * class Jpeg(Package): - """jpeg library""" + """libjpeg is a widely used free library with functions for handling the + JPEG image data format. It implements a JPEG codec (encoding and decoding) + alongside various utilities for handling JPEG data.""" + homepage = "http://www.ijg.org" - url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz" + url = "http://www.ijg.org/files/jpegsrc.v9b.tar.gz" + version('9b', '6a9996ce116ec5c52b4870dbcd6d3ddb') version('9a', '3353992aecaee1805ef4109aadd433e7') def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() + make("test") make("install") -- cgit v1.2.3-60-g2f50 From 61e5ee5d6368a829f6dd32bca6ca3f97625177aa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 14:14:44 -0500 Subject: Prevent use of system GTK+ --- var/spack/repos/builtin/packages/qt/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 93688fb777..ac68b5792e 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -101,7 +101,7 @@ class Qt(Package): @property def common_config_args(self): - return [ + config_args = [ '-prefix', self.prefix, '-v', '-opensource', @@ -115,7 +115,16 @@ class Qt(Package): '-no-openvg', '-no-pch', # NIS is deprecated in more recent glibc - '-no-nis'] + '-no-nis' + ] + + if '+gtk' in self.spec: + config_args.append('-gtkstyle') + else: + config_args.append('-no-gtkstyle') + + return config_args + # Don't disable all the database drivers, but should # really get them into spack at some point. @@ -128,8 +137,8 @@ class Qt(Package): '-thread', '-shared', '-release', - '-fast' - ) + '-fast', + *self.common_config_args) @when('@4') def configure(self): -- cgit v1.2.3-60-g2f50 From 17fa1b5007355e0c0453b2f6d0213f81586b1756 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 14:21:34 -0500 Subject: Un-fix version 3 --- var/spack/repos/builtin/packages/qt/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index ac68b5792e..1e1d6302f3 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -137,8 +137,7 @@ class Qt(Package): '-thread', '-shared', '-release', - '-fast', - *self.common_config_args) + '-fast') @when('@4') def configure(self): -- cgit v1.2.3-60-g2f50 From cde1d183994363cbb70a72bd180999a0ce151e16 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 30 Apr 2016 17:53:17 +0200 Subject: dealii: add new dependency -- gsl --- var/spack/repos/builtin/packages/dealii/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 674fe3150a..f0e9b8f967 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,6 +12,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('doc', default=False, description='Compile with documentation') + variant('gsl' , default=True, description='Compile with GSL') 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)') @@ -39,6 +40,8 @@ class Dealii(Package): depends_on ("mpi", when="+mpi") depends_on ("arpack-ng+mpi", when='+arpack+mpi') depends_on ("doxygen", when='+doc') + depends_on ("gsl", when='@8.5.0:+gsl') + depends_on ("gsl", when='@dev+gsl') depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis@5:", when='+metis') depends_on ("netcdf+mpi", when="+netcdf+mpi") @@ -100,7 +103,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'): + for library in ('gsl','hdf5','p4est','petsc','slepc','trilinos','metis'): if library in spec: options.extend([ '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), -- cgit v1.2.3-60-g2f50 From 2eb4248f90650f83b7fca7587d59e8fc16bb5305 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 2 May 2016 18:52:44 +0200 Subject: dealii: fix a bug where P4EST_DIR was unconditionally requested --- var/spack/repos/builtin/packages/dealii/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index f0e9b8f967..df8330384d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -83,7 +83,6 @@ class Dealii(Package): (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, - '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, '-DZLIB_DIR=%s' % spec['zlib'].prefix -- cgit v1.2.3-60-g2f50 From 179d308fe06c30b184f37ae91c5bcf1fc77bb536 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 14:32:57 -0700 Subject: Added a package for the RAJA system --- var/spack/repos/builtin/packages/raja/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/raja/package.py diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py new file mode 100644 index 0000000000..f807ab71af --- /dev/null +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Raja(Package): + """RAJA Parallel Framework.""" + homepage = "http://software.llnl.gov/RAJA/" + + version('git', git='https://github.com/LLNL/RAJA.git', branch="master") + + def install(self, spec, prefix): + cmake('.',*std_cmake_args) + make() + make('install') -- cgit v1.2.3-60-g2f50 From afef04bb54c6a9db37f84d6babe077ee2e862c84 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 15:49:37 -0700 Subject: Added cnmem package` --- var/spack/repos/builtin/packages/cnmem/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cnmem/package.py diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py new file mode 100644 index 0000000000..f65838d195 --- /dev/null +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Cnmem(Package): + """RAJA Parallel Framework.""" + homepage = "https://github.com/NVIDIA/cnmem" + + version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") + + def install(self, spec, prefix): + cmake('.',*std_cmake_args) + make() + make('install') -- cgit v1.2.3-60-g2f50 From e74cc0df275cb7d7b31f5744f3a72b6b65685613 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 15:53:43 -0700 Subject: Updated docstring --- var/spack/repos/builtin/packages/cnmem/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py index f65838d195..0a83e8fc20 100644 --- a/var/spack/repos/builtin/packages/cnmem/package.py +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -1,7 +1,7 @@ from spack import * class Cnmem(Package): - """RAJA Parallel Framework.""" + """CNMem mempool for CUDA devices""" homepage = "https://github.com/NVIDIA/cnmem" version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") -- cgit v1.2.3-60-g2f50 From 89621faaea762538bbfa26bd54baff49539b8f47 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 2 May 2016 20:21:03 -0600 Subject: + Add version 5.0 download for SuperLU_DIST. --- 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 5cf5e129b4..b4c0759d7c 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -6,6 +6,7 @@ class SuperluDist(Package): homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" + version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') -- cgit v1.2.3-60-g2f50 From 98f8192bde22ad973d126de677566a3f9852a64a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 15:15:55 +0200 Subject: libtool: add a missing dependency --- var/spack/repos/builtin/packages/libtool/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 82a54953b2..c804f5ab5d 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -8,6 +8,8 @@ class Libtool(Package): version('2.4.6' , 'addf44b646ddb4e3919805aa88fa7c5e') version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') + depends_on('m4') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-60-g2f50 From 0583bc98598d5c868e7ca402cbdf80bb4557c8cf Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 16:20:38 +0200 Subject: p4est: put back +tests variant --- var/spack/repos/builtin/packages/p4est/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 017c4e3fbf..c059632079 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -7,6 +7,8 @@ class P4est(Package): version('1.1', '37ba7f4410958cfb38a2140339dbf64f') + variant('tests', default=True, description='Run small tests') + # build dependencies depends_on('automake') depends_on('autoconf') @@ -33,5 +35,11 @@ class P4est(Package): configure('--prefix=%s' % prefix, *options) make() - make("check") + # Make tests optional as sometimes mpiexec can't be run with an error: + # mpiexec has detected an attempt to run as root. + # Running at root is *strongly* discouraged as any mistake (e.g., in + # defining TMPDIR) or bug can result in catastrophic damage to the OS + # file system, leaving your system in an unusable state. + if '+tests' in self.spec: + make("check") make("install") -- cgit v1.2.3-60-g2f50 From 40d578be958b7bc0269f2f6f92cc2b6e70a43353 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 3 May 2016 10:38:05 -0400 Subject: Disable OpenBLAS's overriding of our "make -jN" option --- .../repos/builtin/packages/openblas/make.patch | 35 ++++++++++++++++++++++ .../repos/builtin/packages/openblas/package.py | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/openblas/make.patch diff --git a/var/spack/repos/builtin/packages/openblas/make.patch b/var/spack/repos/builtin/packages/openblas/make.patch new file mode 100644 index 0000000000..851214211a --- /dev/null +++ b/var/spack/repos/builtin/packages/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/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 61250fb310..14d4c89b19 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -19,13 +19,15 @@ class Openblas(Package): provides('blas') provides('lapack') + patch('make.patch') def install(self, spec, prefix): # 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)] + 'FC=%s' % os.path.basename(spack_f77), + 'MAKE_NO_J=1'] make_targets = ['libs', 'netlib'] -- cgit v1.2.3-60-g2f50 From 51c6867f72e91bb061e8bd021b64fa12706c0f33 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 10:30:35 -0500 Subject: Re-add hwloc as a dependency of openmpi --- var/spack/repos/builtin/packages/openmpi/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..74f0a7bfd1 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -34,6 +34,8 @@ class Openmpi(Package): provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') + depends_on('hwloc') + def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) @@ -48,6 +50,7 @@ class Openmpi(Package): def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, + "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] -- cgit v1.2.3-60-g2f50 From f4260da1c262731f9287db4f972e7eae6399135d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 3 May 2016 12:05:35 -0600 Subject: Mark SuperLU_DIST version 4.3 as the preferred version since petsc and trilinos are not tested with 5.0. --- var/spack/repos/builtin/packages/superlu-dist/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index b4c0759d7c..3420d9b90a 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -7,7 +7,8 @@ class SuperluDist(Package): url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') - version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') + # default to version 4.3 since petsc and trilinos are not tested with 5.0. + version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True) version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') version('4.0', 'c0b98b611df227ae050bc1635c6940e0') -- cgit v1.2.3-60-g2f50 From eaa45d8a9a8cd26379ea7bd3bcee99cbab08d9e7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 13:28:38 -0500 Subject: Remove hdf5 ~cxx constraint on netcdf --- var/spack/repos/builtin/packages/netcdf/package.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index a4d9e5213c..4aad0f6f3c 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -12,16 +12,19 @@ class Netcdf(Package): version('4.4.0', 'cffda0cbd97fdb3a06e9274f7aef438e') version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') - variant('mpi', default=True, description='Enables MPI parallelism') - variant('hdf4', default=False, description="Enable HDF4 support") + variant('mpi', default=True, description='Enables MPI parallelism') + variant('hdf4', default=False, description='Enable HDF4 support') - # Dependencies: - depends_on("curl") # required for DAP support - depends_on("hdf", when='+hdf4') - depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support - depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support - depends_on("zlib") # required for NetCDF-4 support depends_on("m4") + depends_on("hdf", when='+hdf4') + + # Required for DAP support + depends_on("curl") + + # Required for NetCDF-4 support + depends_on("zlib") + depends_on("hdf5+mpi", when='+mpi') + depends_on("hdf5~mpi", when='~mpi') def install(self, spec, prefix): # Environment variables @@ -49,7 +52,7 @@ class Netcdf(Package): # /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) + LDFLAGS.append( "-L%s" % spec['curl'].prefix.lib) if '+mpi' in spec: config_args.append('--enable-parallel4') -- cgit v1.2.3-60-g2f50 From a3d2d0cd22efef3fa24fce3a92b579d8cc938805 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 15:44:23 -0500 Subject: Add latest OpenSSL versions --- var/spack/repos/builtin/packages/openssl/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 9e3109bfed..d0c95731a2 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -15,10 +15,12 @@ class Openssl(Package): version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') version('1.0.1r', '1abd905e079542ccae948af37e393d28') + version('1.0.1t', '9837746fcf8a6727d46d22ca35953da1') version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa') + version('1.0.2h', '9392e65072ce4b614c1392eefc1f23d0') depends_on("zlib") parallel = False -- cgit v1.2.3-60-g2f50 From 88fa9084e2846008238a3136933a16d0ab6b413c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 15:58:14 -0500 Subject: Add latest version of GCC --- var/spack/repos/builtin/packages/gcc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 6043b62279..8f90757232 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -38,6 +38,7 @@ class Gcc(Package): list_url = 'http://open-source-box.org/gcc/' list_depth = 2 + version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1') version('5.3.0', 'c9616fd448f980259c31de613e575719') version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467') version('4.9.3', '6f831b4d251872736e8e9cc09746f327') -- cgit v1.2.3-60-g2f50 From c3317819cb89abdcd9fe1cb9431436c4e4ef8702 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 10:37:52 +0200 Subject: mpi: add self.spec.[mpicc|mpicxx|mpifc|mpif77] to avoid hardcoding MPI wrappers names --- lib/spack/docs/packaging_guide.rst | 17 +++++++++++++++++ var/spack/repos/builtin/packages/mpich/package.py | 5 +++++ var/spack/repos/builtin/packages/openmpi/package.py | 5 +++++ 3 files changed, 27 insertions(+) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 519c0da232..34d11308f5 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1831,6 +1831,23 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on the command line. +Message Parsing Interface (MPI) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +It is common for high performance computing software/packages to use ``MPI``. +As a result of conretization, a given package can be built using different +implementations of MPI such as ``Openmpi``, ``MPICH`` or ``IntelMPI``. +In some scenarios to configure a package one have to provide it with appropriate MPI +compiler wrappers such as ``mpicc``, ``mpic++``. +However different implementations of ``MPI`` may have different names for those +wrappers. In order to make package's ``install()`` method indifferent to the +choice ``MPI`` implementation, each package which implements ``MPI`` sets up +``self.spec.mpicc``, ``self.spec.mpicxx``, ``self.spec.mpifc`` and ``self.spec.mpif77`` +to point to ``C``, ``C++``, ``Fortran 90`` and ``Fortran 77`` ``MPI`` wrappers. +Package developers are advised to use these variables, for example ``self.spec['mpi'].mpicc`` +instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for +the reasons outlined above. + + Forking ``install()`` ~~~~~~~~~~~~~~~~~~~~~ diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b317ec6651..aaa6386df7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,6 +54,11 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..89a21e869c 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,11 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, -- cgit v1.2.3-60-g2f50 From f417b1cf904d99b4fb81ab31ec3ddd6da362d286 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 11:01:52 +0200 Subject: p4est: use mpicc,mpicxx,mpifc,mpif77 compiler variables instead of hardcoding names --- var/spack/repos/builtin/packages/p4est/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 017c4e3fbf..5b2474a067 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -24,10 +24,10 @@ class P4est(Package): '--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'), + 'CC=%s' % self.spec['mpi'].mpicc, + 'CXX=%s' % self.spec['mpi'].mpicxx, + 'FC=%s' % self.spec['mpi'].mpifc, + 'F77=%s' % self.spec['mpi'].mpif77 ] configure('--prefix=%s' % prefix, *options) -- cgit v1.2.3-60-g2f50 From 796bf5f85cd22039f6131b15d401ef4a82bf7f86 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 17:33:19 +0200 Subject: mvapich2: add self.spec.[mpicc|mpicxx|mpifc|mpif77] --- var/spack/repos/builtin/packages/mvapich2/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3e60b517db..3d4f2d0c68 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -146,6 +146,10 @@ class Mvapich2(Package): spack_env.set('MPICH_F77', spack_f77) spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') def install(self, spec, prefix): # we'll set different configure flags depending on our environment -- cgit v1.2.3-60-g2f50 From bfe009f98d8f468c839ed75f12d881c246dd2ceb Mon Sep 17 00:00:00 2001 From: "Robert.French" Date: Wed, 4 May 2016 15:26:10 +0000 Subject: Subversion uses serf for http repos Add Scons package Add serf package Subversion uses serf for http repos --- var/spack/repos/builtin/packages/scons/package.py | 13 ++++++ var/spack/repos/builtin/packages/serf/package.py | 51 ++++++++++++++++++++++ .../repos/builtin/packages/subversion/package.py | 2 + 3 files changed, 66 insertions(+) create mode 100644 var/spack/repos/builtin/packages/scons/package.py create mode 100644 var/spack/repos/builtin/packages/serf/package.py diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py new file mode 100644 index 0000000000..594aeced88 --- /dev/null +++ b/var/spack/repos/builtin/packages/scons/package.py @@ -0,0 +1,13 @@ +from spack import * + +class Scons(Package): + """SCons is a software construction tool""" + homepage = "http://scons.org" + url = "http://downloads.sourceforge.net/project/scons/scons/2.5.0/scons-2.5.0.tar.gz" + + version('2.5.0', '9e00fa0df8f5ca5c5f5975b40e0ed354') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py new file mode 100644 index 0000000000..a5c9057b99 --- /dev/null +++ b/var/spack/repos/builtin/packages/serf/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 Serf(Package): + """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library""" + homepage = 'https://serf.apache.org/' + url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2' + + version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446') + + depends_on('apr') + depends_on('apr-util') + depends_on('scons') + depends_on('expat') + depends_on('openssl') + + def install(self, spec, prefix): + scons = which("scons") + + options = ['PREFIX=%s' % prefix] + options.append('APR=%s' % spec['apr'].prefix) + options.append('APU=%s' % spec['apr-util'].prefix) + options.append('OPENSSL=%s' % spec['openssl'].prefix) + options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix) + options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix) + + scons(*options) + scons('install') diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 5db1c3eb92..04cde94aad 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -37,6 +37,7 @@ class Subversion(Package): depends_on('apr-util') depends_on('zlib') depends_on('sqlite') + depends_on('serf') # Optional: We need swig if we want the Perl, Python or Ruby # bindings. @@ -54,6 +55,7 @@ class Subversion(Package): 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-serf=%s' % spec['serf'].prefix) #options.append('--with-swig=%s' % spec['swig'].prefix) configure(*options) -- cgit v1.2.3-60-g2f50 From 514a8c737a69f8176ccd5531a87b5042ff847ddc Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Wed, 4 May 2016 16:38:43 -0700 Subject: added git commit for clang support --- var/spack/repos/builtin/packages/mrnet/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index a3abb71285..b52233be4a 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -6,6 +6,7 @@ class Mrnet(Package): url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" + version('5.0.1-2', git='https://github.com/dyninst/mrnet.git', commit='20b1eacfc6d680d9f6472146d2dfaa0f900cc2e9') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') version('4.1.0', '5a248298b395b329e2371bf25366115c') version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') -- cgit v1.2.3-60-g2f50 From 27de2a42d9d3b0f572c37a6ce1612b7df9855240 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 4 May 2016 20:27:58 -0400 Subject: Update Flex to 2.6.0 --- var/spack/repos/builtin/packages/flex/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index b065904912..e4795893e0 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -6,6 +6,7 @@ class Flex(Package): homepage = "http://flex.sourceforge.net/" url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" + version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') def install(self, spec, prefix): -- cgit v1.2.3-60-g2f50 From b12fb7ebc845313d404e4448c145cda4e00517f3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:24:32 +0200 Subject: mpi: move mpicc/mpicxx/mpifc/mpif77 to setup_dependent_package() --- var/spack/repos/builtin/packages/mpich/package.py | 2 +- var/spack/repos/builtin/packages/mvapich2/package.py | 2 ++ var/spack/repos/builtin/packages/openmpi/package.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index aaa6386df7..4b84f44bd7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,12 +54,12 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? module.mpicc = join_path(self.prefix.bin, 'mpicc') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3d4f2d0c68..c68a04d251 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -146,6 +146,8 @@ class Mvapich2(Package): 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): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 89a21e869c..92a5018886 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,7 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') -- cgit v1.2.3-60-g2f50 From c3bc4d6195a7f84525f117acfb68e2df5149d1ff Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:28:04 +0200 Subject: mpich: remove module.mpicc as no formula is using it and it is a duplicate of self.spec.mpicc --- var/spack/repos/builtin/packages/mpich/package.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 4b84f44bd7..5d68f20351 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -60,10 +60,6 @@ class Mpich(Package): self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - """For dependencies, make mpicc's use spack wrapper.""" - # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? - module.mpicc = join_path(self.prefix.bin, 'mpicc') - def install(self, spec, prefix): config_args = ["--prefix=" + prefix, "--enable-shared"] -- cgit v1.2.3-60-g2f50 From 18d2b28c498026828aab4fc2ece62b2e062d74c2 Mon Sep 17 00:00:00 2001 From: "Robert D. French" Date: Thu, 5 May 2016 10:38:35 -0400 Subject: Build and install BBCP Build and install BBCP Use correct destination for install --- var/spack/repos/builtin/packages/bbcp/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bbcp/package.py diff --git a/var/spack/repos/builtin/packages/bbcp/package.py b/var/spack/repos/builtin/packages/bbcp/package.py new file mode 100644 index 0000000000..e9baa5ccf4 --- /dev/null +++ b/var/spack/repos/builtin/packages/bbcp/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Bbcp(Package): + """Securely and quickly copy data from source to target""" + homepage = "http://www.slac.stanford.edu/~abh/bbcp/" + + version('git', git='http://www.slac.stanford.edu/~abh/bbcp/bbcp.git', branch="master") + + def install(self, spec, prefix): + cd("src") + make() + # BBCP wants to build the executable in a directory whose name depends on the system type + makesname = Executable("../MakeSname") + bbcp_executable_path = "../bin/%s/bbcp" % makesname(output=str).rstrip("\n") + destination_path = "%s/bin/" % prefix + mkdirp(destination_path) + install(bbcp_executable_path, destination_path) -- cgit v1.2.3-60-g2f50 From 1203a14563ff8589a65def3bd99dc6a9cc399e92 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 5 May 2016 14:01:21 -0500 Subject: Remove tutorial comments --- var/spack/repos/builtin/packages/xerces-c/package.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index e36fb936e0..bd02ddcd4b 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/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 xerces-c -# -# You can always get back here to change things with: -# -# spack edit xerces-c -# -# See the spack documentation for more information on building -# packages. -# from spack import * class XercesC(Package): -- cgit v1.2.3-60-g2f50