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 (limited to 'var') 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 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(-) (limited to 'var') 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 (limited to 'var') 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(+) (limited to 'var') 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(-) (limited to 'var') 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(+) (limited to 'var') 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 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 (limited to 'var') 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 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(-) (limited to 'var') 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(-) (limited to 'var') 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 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(-) (limited to 'var') 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