summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/apex/package.py34
-rw-r--r--var/spack/packages/binutils/package.py1
-rw-r--r--var/spack/packages/ompt-openmp/package.py23
-rw-r--r--var/spack/packages/openmpi/package.py64
-rw-r--r--var/spack/packages/xz/package.py8
5 files changed, 128 insertions, 2 deletions
diff --git a/var/spack/packages/apex/package.py b/var/spack/packages/apex/package.py
new file mode 100644
index 0000000000..6404d5208a
--- /dev/null
+++ b/var/spack/packages/apex/package.py
@@ -0,0 +1,34 @@
+from spack import *
+from spack.util.environment import *
+
+class Apex(Package):
+ homepage = "http://github.com/khuck/xpress-apex"
+ #url = "http://github.com/khuck/xpress-apex/archive/v0.1-release-candidate.tar.gz"
+ url = "http://github.com/khuck/xpress-apex"
+
+ #version('0.1', '6e039c224387348296739f6bf360d081')
+ #version('master', branch='master', git='https://github.com/khuck/xpress-apex.git')
+ version('2015-10-21', git='https://github.com/khuck/xpress-apex.git', commit='d2e66ddde689120472fc57fc546d8cd80aab745c')
+
+ depends_on("binutils+libiberty")
+ depends_on("boost@1.54:")
+ depends_on("cmake@2.8.12:")
+ depends_on("activeharmony@4.5:")
+ depends_on("ompt-openmp")
+
+ def install(self, spec, prefix):
+
+ path=get_path("PATH")
+ path.remove(spec["binutils"].prefix.bin)
+ path_set("PATH", path)
+ with working_dir("build", create=True):
+ cmake('-DBOOST_ROOT=%s' % spec['boost'].prefix,
+ '-DUSE_BFD=TRUE',
+ '-DBFD_ROOT=%s' % spec['binutils'].prefix,
+ '-DUSE_ACTIVEHARMONY=TRUE',
+ '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix,
+ '-DUSE_OMPT=TRUE',
+ '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix,
+ '..', *std_cmake_args)
+ make()
+ make("install")
diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py
index 0c33bf0426..cac0a0407f 100644
--- a/var/spack/packages/binutils/package.py
+++ b/var/spack/packages/binutils/package.py
@@ -18,6 +18,7 @@ class Binutils(Package):
'--disable-dependency-tracking',
'--enable-interwork',
'--enable-multilib',
+ '--enable-shared',
'--enable-64-bit-bfd',
'--enable-targets=all']
diff --git a/var/spack/packages/ompt-openmp/package.py b/var/spack/packages/ompt-openmp/package.py
new file mode 100644
index 0000000000..5d380ebd77
--- /dev/null
+++ b/var/spack/packages/ompt-openmp/package.py
@@ -0,0 +1,23 @@
+from spack import *
+
+class OmptOpenmp(Package):
+ """LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP mirror. This library provides a drop-in replacement of the OpenMP runtimes for GCC, Intel and LLVM/Clang."""
+ homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp"
+ url = "http://github.com/khuck/LLVM-openmp/archive/v0.1-spack.tar.gz"
+
+ version('spack', '35227b2726e377faa433fc841226e036')
+
+ # depends_on("foo")
+
+ def install(self, spec, prefix):
+ with working_dir("runtime/build", create=True):
+
+ # FIXME: Modify the configure line to suit your build system here.
+ cmake('-DCMAKE_C_COMPILER=%s' % self.compiler.cc,
+ '-DCMAKE_CXX_COMPILER=%s' % self.compiler.cxx,
+ '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
+ '..', *std_cmake_args)
+
+ # FIXME: Add logic to build and install here
+ make()
+ make("install")
diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py
index f9d0034878..5e429dedf5 100644
--- a/var/spack/packages/openmpi/package.py
+++ b/var/spack/packages/openmpi/package.py
@@ -1,5 +1,8 @@
+import os
+
from spack import *
+
class Openmpi(Package):
"""Open MPI is a project combining technologies and resources from
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI)
@@ -25,6 +28,15 @@ class Openmpi(Package):
provides('mpi@:3.0', when='@1.8.8') # Open MPI 1.8.8 supports MPI-3.0
provides('mpi@:3.0', when='@1.10.0') # Open MPI 1.10.0 supports MPI-3.0
+
+ 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_CXX'] = 'c++'
+ os.environ['OMPI_FC'] = 'f90'
+ os.environ['OMPI_F77'] = 'f77'
+
+
def install(self, spec, prefix):
config_args = ["--prefix=%s" % prefix]
@@ -43,3 +55,55 @@ class Openmpi(Package):
configure(*config_args)
make()
make("install")
+
+ self.filter_compilers()
+
+
+ def filter_compilers(self):
+ """Run after install to make the MPI compilers use the
+ compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC, CXX and FC set
+ 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 }
+ dir = os.path.join(self.prefix, 'share/openmpi/')
+
+ cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt',
+ 'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt']
+
+ cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt',
+ 'ortec++-wrapper-data.txt']
+
+ fc_wrappers = ['mpifort-vt-wrapper-data.txt',
+ 'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt']
+
+ for wrapper in cc_wrappers:
+ filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc,
+ os.path.join(dir, wrapper), **kwargs)
+
+ for wrapper in cxx_wrappers:
+ filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx,
+ os.path.join(dir, wrapper), **kwargs)
+
+ for wrapper in fc_wrappers:
+ filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
+ os.path.join(dir, wrapper), **kwargs)
+
+ # These are symlinks in newer versions, so check that here
+ f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt']
+ f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt']
+
+ for wrapper in f77_wrappers:
+ path = os.path.join(dir, wrapper)
+ if not os.path.islink(path):
+ filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77,
+ path, **kwargs)
+ for wrapper in f90_wrappers:
+ path = os.path.join(dir, wrapper)
+ if not os.path.islink(path):
+ filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
+ path, **kwargs)
+
+
diff --git a/var/spack/packages/xz/package.py b/var/spack/packages/xz/package.py
index 88c5793018..ba6c9733a7 100644
--- a/var/spack/packages/xz/package.py
+++ b/var/spack/packages/xz/package.py
@@ -8,9 +8,13 @@ class Xz(Package):
homepage = "http://tukaani.org/xz/"
url = "http://tukaani.org/xz/xz-5.2.0.tar.bz2"
- version('5.2.0', '867cc8611760240ebf3440bd6e170bb9')
-
+ version('5.2.0', '867cc8611760240ebf3440bd6e170bb9',
+ url = 'http://tukaani.org/xz/xz-5.2.0.tar.bz2')
+ version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af',
+ url = 'http://tukaani.org/xz/xz-5.2.2.tar.bz2')
+
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")
+