summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/spack/env/cc4
l---------lib/spack/env/nag/nagfor1
-rw-r--r--lib/spack/spack/cmd/deactivate.py2
-rw-r--r--lib/spack/spack/cmd/location.py2
-rw-r--r--lib/spack/spack/compiler.py3
-rw-r--r--lib/spack/spack/compilers/__init__.py2
-rw-r--r--lib/spack/spack/compilers/nag.py33
-rw-r--r--lib/spack/spack/database.py2
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py68
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py84
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py8
-rw-r--r--var/spack/repos/builtin/packages/mumps/Makefile.inc38
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py139
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py50
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py24
15 files changed, 424 insertions, 36 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 0966277a91..aacba996b3 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -94,11 +94,11 @@ case "$command" in
command="$SPACK_CXX"
language="C++"
;;
- f90|fc|f95|gfortran|ifort|pgf90|xlf90)
+ f90|fc|f95|gfortran|ifort|pgf90|xlf90|nagfor)
command="$SPACK_FC"
language="Fortran 90"
;;
- f77|gfortran|ifort|pgf77|xlf)
+ f77|gfortran|ifort|pgf77|xlf|nagfor)
command="$SPACK_F77"
language="Fortran 77"
;;
diff --git a/lib/spack/env/nag/nagfor b/lib/spack/env/nag/nagfor
new file mode 120000
index 0000000000..82c2b8e90a
--- /dev/null
+++ b/lib/spack/env/nag/nagfor
@@ -0,0 +1 @@
+../cc \ No newline at end of file
diff --git a/lib/spack/spack/cmd/deactivate.py b/lib/spack/spack/cmd/deactivate.py
index a0c78bf755..d6b23d6a08 100644
--- a/lib/spack/spack/cmd/deactivate.py
+++ b/lib/spack/spack/cmd/deactivate.py
@@ -37,7 +37,7 @@ def setup_parser(subparser):
help="Run deactivation even if spec is NOT currently activated.")
subparser.add_argument(
'-a', '--all', action='store_true',
- help="Deactivate all extensions of an extendable pacakge, or "
+ help="Deactivate all extensions of an extendable package, or "
"deactivate an extension AND its dependencies.")
subparser.add_argument(
'spec', nargs=argparse.REMAINDER, help="spec of package extension to deactivate.")
diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py
index 39c225e9b2..307ee8982d 100644
--- a/lib/spack/spack/cmd/location.py
+++ b/lib/spack/spack/cmd/location.py
@@ -32,7 +32,7 @@ from llnl.util.filesystem import join_path
import spack
import spack.cmd
-description="Print out locations of various diectories used by Spack"
+description="Print out locations of various directories used by Spack"
def setup_parser(subparser):
global directories
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index a665f6062d..887e416dc5 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -24,6 +24,7 @@
##############################################################################
import os
import re
+import subprocess
import itertools
from datetime import datetime
@@ -51,7 +52,7 @@ _version_cache = {}
def get_compiler_version(compiler_path, version_arg, regex='(.*)'):
if not compiler_path in _version_cache:
compiler = Executable(compiler_path)
- output = compiler(version_arg, return_output=True, error=os.devnull)
+ output = compiler(version_arg, return_output=True, error=subprocess.STDOUT)
match = re.search(regex, output)
_version_cache[compiler_path] = match.group(1) if match else 'unknown'
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py
index facc9c338b..6159ef576c 100644
--- a/lib/spack/spack/compilers/__init__.py
+++ b/lib/spack/spack/compilers/__init__.py
@@ -51,7 +51,7 @@ _required_instance_vars = ['cc', 'cxx', 'f77', 'fc']
if platform.system() == 'Darwin':
_default_order = ['clang', 'gcc', 'intel']
else:
- _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc']
+ _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc', 'nag']
def _auto_compiler_spec(function):
diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py
new file mode 100644
index 0000000000..f1cc6be0d5
--- /dev/null
+++ b/lib/spack/spack/compilers/nag.py
@@ -0,0 +1,33 @@
+from spack.compiler import *
+
+class Nag(Compiler):
+ # Subclasses use possible names of C compiler
+ cc_names = []
+
+ # Subclasses use possible names of C++ compiler
+ cxx_names = []
+
+ # Subclasses use possible names of Fortran 77 compiler
+ f77_names = ['nagfor']
+
+ # Subclasses use possible names of Fortran 90 compiler
+ fc_names = ['nagfor']
+
+ # Named wrapper links within spack.build_env_path
+ link_paths = { # Use default wrappers for C and C++, in case provided in compilers.yaml
+ 'cc' : 'cc',
+ 'cxx' : 'cxx',
+ 'f77' : 'nag/nagfor',
+ 'fc' : 'nag/nagfor' }
+
+ @classmethod
+ def default_version(self, comp):
+ """The '-V' option works for nag compilers.
+ Output looks like this::
+
+ NAG Fortran Compiler Release 6.0(Hibiya) Build 1037
+ Product NPL6A60NA for x86-64 Linux
+ Copyright 1990-2015 The Numerical Algorithms Group Ltd., Oxford, U.K.
+ """
+ return get_compiler_version(
+ comp, '-V', r'NAG Fortran Compiler Release ([0-9.]+)')
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index 0fa18db34b..9cbe7de44a 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -489,7 +489,7 @@ class Database(object):
1. Marks the spec as not installed.
2. Removes the spec if it has no more dependents.
3. If removed, recursively updates dependencies' ref counts
- and remvoes them if they are no longer needed.
+ and removes them if they are no longer needed.
"""
# Take a lock around the entire removal.
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
new file mode 100644
index 0000000000..44ee6819f5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -0,0 +1,68 @@
+##############################################################################
+# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written by David Beckingsale, david@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 Eigen(Package):
+ """
+ Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms
+ """
+
+ homepage = 'http://eigen.tuxfamily.org/'
+ url = 'http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2'
+
+ version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184', url='http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2')
+
+ variant('debug', default=False, description='Builds the library in debug mode')
+
+ variant('metis', default=True, description='Enables metis backend')
+ variant('scotch', default=True, description='Enables scotch backend')
+ variant('fftw', default=True, description='Enables FFTW backend')
+
+ # TODO : dependency on SuiteSparse, googlehash, superlu, adolc missing
+
+ depends_on('metis', when='+metis')
+ depends_on('scotch', when='+scotch')
+ depends_on('fftw', when='+fftw')
+
+ depends_on('mpfr@2.3.0:') # Eigen 3.2.7 requires at least 2.3.0
+ depends_on('gmp')
+
+ def install(self, spec, prefix):
+
+ options = []
+ options.extend(std_cmake_args)
+
+ build_directory = join_path(self.stage.path, 'spack-build')
+ source_directory = self.stage.source_path
+
+ if '+debug' in spec:
+ options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
+
+ with working_dir(build_directory, create=True):
+ cmake(source_directory, *options)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 9a40164341..ac78d8e961 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -1,5 +1,31 @@
+##############################################################################
+# 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 Hdf5(Package):
"""HDF5 is a data model, library, and file format for storing and managing
data. It supports an unlimited variety of datatypes, and is designed for
@@ -7,7 +33,7 @@ class Hdf5(Package):
"""
homepage = "http://www.hdfgroup.org/HDF5/"
- url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz"
+ url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz"
list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3
@@ -15,26 +41,53 @@ class Hdf5(Package):
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
version('1.8.13', 'c03426e9e77d7766944654280b467289')
+ variant('debug', default=False, description='Builds a debug version of the library')
+
variant('cxx', default=True, description='Enable C++ support')
variant('fortran', default=True, description='Enable Fortran support')
+ variant('unsupported', default=False, description='Enables unsupported configuration options')
+
variant('mpi', default=False, description='Enable MPI support')
- variant('threadsafe', default=False, description='Enable multithreading')
+ variant('threadsafe', default=False, description='Enable thread-safe capabilities')
depends_on("mpi", when='+mpi')
depends_on("zlib")
- # TODO: currently hard-coded to use OpenMPI
+ def validate(self, spec):
+ """
+ Checks if incompatible variants have been activated at the same time
+
+ :param spec: spec of the package
+ :raises RuntimeError: in case of inconsistencies
+ """
+ if '+fortran' in spec and not self.compiler.fc:
+ msg = 'cannot build a fortran variant without a fortran compiler'
+ raise RuntimeError(msg)
+
+ if '+threadsafe' in spec and ('+cxx' in spec or '+fortran' in spec):
+ raise RuntimeError("cannot use variant +threadsafe with either +cxx or +fortran")
+
def install(self, spec, prefix):
+ self.validate(spec)
+ # Handle compilation after spec validation
extra_args = []
+ if '+debug' in spec:
+ extra_args.append('--enable-debug=all')
+ else:
+ extra_args.append('--enable-production')
+
+ if '+unsupported' in spec:
+ extra_args.append("--enable-unsupported")
+
if '+cxx' in spec:
- extra_args.extend([
- '--enable-cxx'
- ])
+ extra_args.append('--enable-cxx')
+
if '+fortran' in spec:
extra_args.extend([
'--enable-fortran',
'--enable-fortran2003'
])
+
if '+mpi' in spec:
# The HDF5 configure script warns if cxx and mpi are enabled
# together. There doesn't seem to be a real reason for this, except
@@ -43,27 +96,26 @@ class Hdf5(Package):
# this is not actually a problem.
extra_args.extend([
"--enable-parallel",
- "--enable-unsupported",
"CC=%s" % spec['mpi'].prefix.bin + "/mpicc",
- "CXX=%s" % spec['mpi'].prefix.bin + "/mpic++",
- "FC=%s" % spec['mpi'].prefix.bin + "/mpifort",
])
- if '+threads' in spec:
- if '+cxx' in spec or '+fortran' in spec:
- die("Cannot use variant +threads with either +cxx or +fortran")
+
+ if '+cxx' in spec:
+ extra_args.append("CXX=%s" % spec['mpi'].prefix.bin + "/mpic++")
+
+ if '+fortran' in spec:
+ extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort")
+
+ if '+threadsafe' in spec:
extra_args.extend([
'--enable-threadsafe',
'--disable-hl',
- 'CPPFLAGS=-DHDatexit=""',
- 'CFLAGS=-DHDatexit=""'
])
configure(
"--prefix=%s" % prefix,
"--with-zlib=%s" % spec['zlib'].prefix,
- "--enable-shared",
+ "--enable-shared", # TODO : this should be enabled by default, remove it?
*extra_args)
-
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 00b7dfda75..c856cfe277 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -41,6 +41,8 @@ class Mpich(Package):
version('3.1', '5643dd176499bfb7d25079aaff25f2ec')
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
+ variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
+
provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:')
@@ -56,6 +58,12 @@ class Mpich(Package):
config_args = ["--prefix=" + prefix,
"--enable-shared"]
+ # Variants
+ if '+verbs' in spec:
+ config_args.append("--with-ibverbs")
+ else:
+ config_args.append("--without-ibverbs")
+
# TODO: Spack should make it so that you can't actually find
# these compilers if they're "disabled" for the current
# compiler configuration.
diff --git a/var/spack/repos/builtin/packages/mumps/Makefile.inc b/var/spack/repos/builtin/packages/mumps/Makefile.inc
new file mode 100644
index 0000000000..2e6a041878
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mumps/Makefile.inc
@@ -0,0 +1,38 @@
+LPORDDIR = $(topdir)/PORD/lib/
+IPORD = -I$(topdir)/PORD/include/
+LPORD = -L$(LPORDDIR) -lpord
+
+ORDERINGSC = $(ORDERINGSF)
+LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
+IORDERINGSF = $(ISCOTCH)
+IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
+
+PLAT =
+LIBEXT = .a
+OUTC = -o
+OUTF = -o
+RM = /bin/rm -f
+AR = ar vr
+RANLIB = ranlib
+
+INCSEQ = -I$(topdir)/libseq
+LIBSEQ = -L$(topdir)/libseq -lmpiseq
+
+INCPAR =
+LIBPAR = $(SCALAP)
+
+LIBOTHERS = -lpthread
+
+#Sequential:
+ifeq ($(MUMPS_TYPE),seq)
+INCS = $(INCSEQ)
+LIBS = $(LIBSEQ)
+LIBSEQNEEDED = libseqneeded
+endif
+
+#Parallel:
+ifeq ($(MUMPS_TYPE),par)
+INCS = $(INCPAR)
+LIBS = $(LIBPAR)
+LIBSEQNEEDED =
+endif
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
new file mode 100644
index 0000000000..44a37903cc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -0,0 +1,139 @@
+from spack import *
+import os
+
+
+class Mumps(Package):
+ """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver"""
+
+ homepage = "http://mumps.enseeiht.fr"
+ url = "http://mumps.enseeiht.fr/MUMPS_5.0.1.tar.gz"
+
+ version('5.0.1', 'b477573fdcc87babe861f62316833db0')
+
+ variant('mpi', default=True, description='Activate the compilation of MUMPS with the MPI support')
+ variant('scotch', default=False, description='Activate Scotch as a possible ordering library')
+ variant('ptscotch', default=False, description='Activate PT-Scotch as a possible ordering library')
+ variant('metis', default=False, description='Activate Metis as a possible ordering library')
+ variant('parmetis', default=False, description='Activate Parmetis as a possible ordering library')
+ variant('double', default=True, description='Activate the compilation of dmumps')
+ 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')
+
+
+ depends_on('scotch + esmumps', when='~ptscotch+scotch')
+ depends_on('scotch + esmumps + mpi', when='+ptscotch')
+ depends_on('metis', when='~parmetis+metis')
+ depends_on('parmetis', when="+parmetis")
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('scalapack', when='+mpi')
+ depends_on('mpi', when='+mpi')
+
+ # this function is not a patch function because in case scalapack
+ # is needed it uses self.spec['scalapack'].fc_link set by the
+ # setup_dependent_environment in scalapck. This happen after patch
+ # end before install
+ # def patch(self):
+ def write_makefile_inc(self):
+ if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec:
+ raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi')
+
+ makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib]
+
+ orderings = ['-Dpord']
+
+ if '+ptscotch' in self.spec or '+scotch' in self.spec:
+ join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '')
+ makefile_conf.extend(
+ ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
+ "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
+ join_lib,
+ join_lib.join(['esmumps', 'scotch', 'scotcherr']))])
+ orderings.append('-Dscotch')
+ if '+ptscotch' in self.spec:
+ orderings.append('-Dptscotch')
+
+ if '+parmetis' in self.spec or '+metis' in self.spec:
+ libname = 'parmetis' if '+parmetis' in self.spec else 'metis'
+ makefile_conf.extend(
+ ["IMETIS = -I%s" % self.spec[libname].prefix.include,
+ "LMETIS = -L%s -l%s" % (self.spec[libname].prefix.lib, libname)])
+
+ orderings.append('-Dmetis')
+ if '+parmetis' in self.spec:
+ orderings.append('-Dparmetis')
+
+ makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings)))
+
+ # TODO: test this part, it needs a full blas, scalapack and
+ # partitionning environment with 64bit integers
+ if '+idx64' in self.spec:
+ makefile_conf.extend(
+ # 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'])
+ else:
+ makefile_conf.extend(
+ ['OPTF = -O -DALLOW_NON_INIT',
+ 'OPTL = -O ',
+ 'OPTC = -O '])
+
+
+ if '+mpi' in self.spec:
+ makefile_conf.extend(
+ ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'),
+ "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
+ "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
+ "SCALAP = %s" % self.spec['scalapack'].fc_link,
+ "MUMPS_TYPE = par"])
+ else:
+ makefile_conf.extend(
+ ["CC = cc",
+ "FC = fc",
+ "FL = fc",
+ "MUMPS_TYPE = seq"])
+
+ # TODO: change the value to the correct one according to the
+ # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
+ makefile_conf.append("CDEFS = -DAdd_")
+
+
+ makefile_inc_template = join_path(os.path.dirname(self.module.__file__),
+ 'Makefile.inc')
+ with open(makefile_inc_template, "r") as fh:
+ makefile_conf.extend(fh.read().split('\n'))
+
+ with working_dir('.'):
+ with open("Makefile.inc", "w") as fh:
+ makefile_inc = '\n'.join(makefile_conf)
+ fh.write(makefile_inc)
+
+
+
+ def install(self, spec, prefix):
+ make_libs = []
+
+ # the coice to compile ?examples is to have kind of a sanity
+ # check on the libraries generated.
+ if '+float' in spec:
+ make_libs.append('sexamples')
+ if '+complex' in spec:
+ make_libs.append('cexamples')
+
+ if '+double' in spec:
+ make_libs.append('dexamples')
+ if '+complex' in spec:
+ make_libs.append('zexamples')
+
+ self.write_makefile_inc()
+
+ make(*make_libs)
+
+ install_tree('lib', prefix.lib)
+ install_tree('include', prefix.include)
+ if '~mpi' in spec:
+ install('libseq/libmpiseq.a', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
new file mode 100644
index 0000000000..5be91c4a40
--- /dev/null
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -0,0 +1,50 @@
+from spack import *
+
+class NetlibScalapack(Package):
+ """ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines"""
+
+ homepage = "http://www.netlib.org/scalapack/"
+ url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
+
+ version('2.0.2', '2f75e600a2ba155ed9ce974a1c4b536f')
+ version('2.0.1', '17b8cde589ea0423afe1ec43e7499161')
+ version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe')
+ # versions before 2.0.0 are not using cmake and requires blacs as
+ # a separated package
+
+ variant('shared', default=True, description='Build the shared library version')
+ variant('fpic', default=False, description="Build with -fpic compiler option")
+
+ provides('scalapack')
+
+ depends_on('mpi')
+ depends_on('lapack')
+
+ def install(self, spec, prefix):
+ options = [
+ "-DBUILD_SHARED_LIBS:BOOL=%s" % 'ON' if '+shared' in spec else 'OFF',
+ "-DBUILD_STATIC_LIBS:BOOL=%s" % 'OFF' if '+shared' in spec else 'ON',
+ "-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", # forces scalapack to use find_package(LAPACK)
+ ]
+
+ if '+fpic' in spec:
+ options.extend([
+ "-DCMAKE_C_FLAGS=-fPIC",
+ "-DCMAKE_Fortran_FLAGS=-fPIC"
+ ])
+
+ options.extend(std_cmake_args)
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
+ make()
+ make("install")
+
+ def setup_dependent_environment(self, module, spec, dependent_spec):
+ # TODO treat OS that are not Linux...
+ lib_suffix = '.so' if '+shared' in spec['scalapack'] else '.a'
+
+ spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib
+ spec['scalapack'].cc_link = spec['scalapack'].fc_link
+ spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib,
+ 'libscalapack%s' % lib_suffix)]
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 463719f9db..1b7f1c2011 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -19,43 +19,44 @@ class Openmpi(Package):
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
version('1.10.0', '280cf952de68369cebaca886c5ce0304')
- version('1.8.8', '0dab8e602372da1425e9242ae37faf8c')
- version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475')
+ version('1.8.8', '0dab8e602372da1425e9242ae37faf8c')
+ version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475')
patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5")
patch('llnl-platforms.patch', when="@1.6.5")
patch('configure.patch', when="@1.10.0:")
- variant('psm', default=False, description='Build support for the PSM library.')
+ variant('psm', default=False, description='Build support for the PSM library.')
variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
+ # TODO : variant support for other schedulers is missing
+ variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support')
+
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)
-
def setup_dependent_environment(self, module, spec, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
- os.environ['OMPI_CC'] = 'cc'
+ os.environ['OMPI_CC'] = 'cc'
os.environ['OMPI_CXX'] = 'c++'
os.environ['OMPI_FC'] = 'f90'
os.environ['OMPI_F77'] = 'f77'
-
def install(self, spec, prefix):
config_args = ["--prefix=%s" % prefix,
"--with-hwloc=%s" % spec['hwloc'].prefix,
- "--with-tm", # necessary for Torque support
"--enable-shared",
"--enable-static"]
# Variants
+ if '+tm' in spec:
+ config_args.append("--with-tm") # necessary for Torque support
+
if '+psm' in spec:
config_args.append("--with-psm")
@@ -85,7 +86,6 @@ class Openmpi(Package):
self.filter_compilers()
-
def filter_compilers(self):
"""Run after install to make the MPI compilers use the
compilers that Spack built the package with.
@@ -94,7 +94,7 @@ class Openmpi(Package):
to Spack's generic cc, c++ and f90. We want them to
be bound to whatever compiler they were built with.
"""
- kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : False }
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
dir = os.path.join(self.prefix, 'share/openmpi/')
cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt',
@@ -132,5 +132,3 @@ class Openmpi(Package):
if not os.path.islink(path):
filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
path, **kwargs)
-
-