Merge branch 'features/fileutils-deps' into develop
This commit is contained in:
commit
e46e1d51c2
@ -144,9 +144,17 @@ def set_build_environment_variables(pkg):
|
|||||||
os.environ[SPACK_DEBUG_LOG_DIR] = spack.spack_working_dir
|
os.environ[SPACK_DEBUG_LOG_DIR] = spack.spack_working_dir
|
||||||
|
|
||||||
# Add dependencies to CMAKE_PREFIX_PATH
|
# Add dependencies to CMAKE_PREFIX_PATH
|
||||||
dep_prefixes = [d.package.prefix for d in pkg.spec.dependencies.values()]
|
|
||||||
path_set("CMAKE_PREFIX_PATH", dep_prefixes)
|
path_set("CMAKE_PREFIX_PATH", dep_prefixes)
|
||||||
|
|
||||||
|
# Add any pkgconfig directories to PKG_CONFIG_PATH
|
||||||
|
pkg_config_dirs = []
|
||||||
|
for p in dep_prefixes:
|
||||||
|
for libdir in ('lib', 'lib64'):
|
||||||
|
pcdir = join_path(p, libdir, 'pkgconfig')
|
||||||
|
if os.path.isdir(pcdir):
|
||||||
|
pkg_config_dirs.append(pcdir)
|
||||||
|
path_set("PKG_CONFIG_PATH", pkg_config_dirs)
|
||||||
|
|
||||||
|
|
||||||
def set_module_variables_for_package(pkg):
|
def set_module_variables_for_package(pkg):
|
||||||
"""Populate the module scope of install() with some useful functions.
|
"""Populate the module scope of install() with some useful functions.
|
||||||
|
@ -494,7 +494,7 @@ def installed_dependents(self):
|
|||||||
on this one."""
|
on this one."""
|
||||||
dependents = []
|
dependents = []
|
||||||
for spec in spack.db.installed_package_specs():
|
for spec in spack.db.installed_package_specs():
|
||||||
if self.spec != spec and self.spec in spec:
|
if self.name != spec.name and self.spec in spec:
|
||||||
dependents.append(spec)
|
dependents.append(spec)
|
||||||
return dependents
|
return dependents
|
||||||
|
|
||||||
|
@ -69,7 +69,10 @@ def get(self, spec):
|
|||||||
|
|
||||||
if not spec in self.instances:
|
if not spec in self.instances:
|
||||||
package_class = self.get_class_for_package_name(spec.name)
|
package_class = self.get_class_for_package_name(spec.name)
|
||||||
|
try:
|
||||||
self.instances[spec.copy()] = package_class(spec)
|
self.instances[spec.copy()] = package_class(spec)
|
||||||
|
except Exception, e:
|
||||||
|
raise FailedConstructorError(spec.name, e)
|
||||||
|
|
||||||
return self.instances[spec]
|
return self.instances[spec]
|
||||||
|
|
||||||
@ -232,3 +235,12 @@ class UnknownPackageError(spack.error.SpackError):
|
|||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
super(UnknownPackageError, self).__init__("Package %s not found." % name)
|
super(UnknownPackageError, self).__init__("Package %s not found." % name)
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
|
|
||||||
|
class FailedConstructorError(spack.error.SpackError):
|
||||||
|
"""Raised when a package's class constructor fails."""
|
||||||
|
def __init__(self, name, reason):
|
||||||
|
super(FailedConstructorError, self).__init__(
|
||||||
|
"Class constructor failed for package '%s'." % name,
|
||||||
|
str(reason))
|
||||||
|
self.name = name
|
||||||
|
20
var/spack/packages/dtcmp/package.py
Normal file
20
var/spack/packages/dtcmp/package.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import os
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
class Dtcmp(Package):
|
||||||
|
"""The Datatype Comparison Library provides comparison operations and
|
||||||
|
parallel sort algorithms for MPI applications."""
|
||||||
|
|
||||||
|
homepage = "https://github.com/hpc/dtcmp"
|
||||||
|
url = "https://github.com/hpc/dtcmp/releases/download/v1.0.3/dtcmp-1.0.3.tar.gz"
|
||||||
|
|
||||||
|
version('1.0.3', 'cdd8ccf71e8ff67de2558594a7fcd317')
|
||||||
|
|
||||||
|
depends_on('mpi')
|
||||||
|
depends_on('lwgrp')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
configure("--prefix=" + prefix,
|
||||||
|
"--with-lwgrp=" + spec['lwgrp'].prefix)
|
||||||
|
make()
|
||||||
|
make("install")
|
16
var/spack/packages/libarchive/package.py
Normal file
16
var/spack/packages/libarchive/package.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from spack import *
|
||||||
|
|
||||||
|
class Libarchive(Package):
|
||||||
|
"""libarchive: C library and command-line tools for reading and
|
||||||
|
writing tar, cpio, zip, ISO, and other archive formats."""
|
||||||
|
homepage = "http://www.libarchive.org"
|
||||||
|
url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"
|
||||||
|
|
||||||
|
version('3.1.2', 'efad5a503f66329bb9d2f4308b5de98a')
|
||||||
|
version('3.1.1', '1f3d883daf7161a0065e42a15bbf168f')
|
||||||
|
version('3.1.0', '095a287bb1fd687ab50c85955692bf3a')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
configure("--prefix=%s" % prefix)
|
||||||
|
make()
|
||||||
|
make("install")
|
18
var/spack/packages/libcircle/package.py
Normal file
18
var/spack/packages/libcircle/package.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import os
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
class Libcircle(Package):
|
||||||
|
"""libcircle provides an efficient distributed queue on a cluster,
|
||||||
|
using self-stabilizing work stealing."""
|
||||||
|
|
||||||
|
homepage = "https://github.com/hpc/libcircle"
|
||||||
|
|
||||||
|
version('0.2.1-rc.1', '2b1369a5736457239f908abf88143ec2',
|
||||||
|
url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz')
|
||||||
|
|
||||||
|
depends_on('mpi')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
configure("--prefix=" + prefix)
|
||||||
|
make()
|
||||||
|
make("install")
|
18
var/spack/packages/lwgrp/package.py
Normal file
18
var/spack/packages/lwgrp/package.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import os
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
class Lwgrp(Package):
|
||||||
|
"""Thie light-weight group library provides process group
|
||||||
|
representations using O(log N) space and time."""
|
||||||
|
|
||||||
|
homepage = "https://github.com/hpc/lwgrp"
|
||||||
|
url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz"
|
||||||
|
|
||||||
|
version('1.0.2', 'ab7ba3bdd8534a651da5076f47f27d8a')
|
||||||
|
|
||||||
|
depends_on('mpi')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
configure("--prefix=" + prefix)
|
||||||
|
make()
|
||||||
|
make("install")
|
@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
class Mvapich2(Package):
|
class Mvapich2(Package):
|
||||||
@ -6,21 +7,98 @@ class Mvapich2(Package):
|
|||||||
|
|
||||||
version('1.9', '5dc58ed08fd3142c260b70fe297e127c',
|
version('1.9', '5dc58ed08fd3142c260b70fe297e127c',
|
||||||
url="http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz")
|
url="http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz")
|
||||||
|
patch('ad_lustre_rwcontig_open_source.patch', when='@1.9')
|
||||||
|
|
||||||
version('2.0', '9fbb68a4111a8b6338e476dc657388b4',
|
version('2.0', '9fbb68a4111a8b6338e476dc657388b4',
|
||||||
url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz')
|
url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz')
|
||||||
|
|
||||||
provides('mpi@:1', when='@1.9:')
|
provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2
|
||||||
|
provides('mpi@:3.0', when='@2.0') # MVAPICH2-2.0 supports MPI 3.0
|
||||||
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
# we'll set different configure flags depending on our environment
|
||||||
|
configure_args = []
|
||||||
|
|
||||||
|
# TODO: The MPICH*_FLAGS have a different name for 1.9
|
||||||
|
|
||||||
|
if '+debug' in spec:
|
||||||
|
# set configure flags for debug build
|
||||||
|
configure_args.append("--disable-fast")
|
||||||
|
configure_args.append("--enable-g=dbg")
|
||||||
|
configure_args.append("--enable-error-checking=runtime")
|
||||||
|
configure_args.append("--enable-error-messages=all")
|
||||||
|
configure_args.append("--enable-nmpi-as-mpi")
|
||||||
|
|
||||||
|
if "%gnu" in spec:
|
||||||
|
# set variables for GNU compilers
|
||||||
|
os.environ['MPICHLIB_CFLAGS'] = "-g -O0"
|
||||||
|
os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0"
|
||||||
|
os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fno-second-underscore"
|
||||||
|
os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fno-second-underscore"
|
||||||
|
elif "%intel" in spec:
|
||||||
|
# set variables for Inel compilers
|
||||||
|
os.environ['MPICHLIB_CFLAGS'] = "-g -O0"
|
||||||
|
os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0"
|
||||||
|
os.environ['MPICHLIB_FFLAGS'] = "-g -O0"
|
||||||
|
os.environ['MPICHLIB_F90FLAGS'] = "-g -O0"
|
||||||
|
elif "%pgi" in spec:
|
||||||
|
# set variables for PGI compilers
|
||||||
|
os.environ['MPICHLIB_CFLAGS'] = "-g -O0 -fPIC"
|
||||||
|
os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0 -fPIC"
|
||||||
|
os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fPIC"
|
||||||
|
os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fPIC"
|
||||||
|
|
||||||
|
else:
|
||||||
|
# set configure flags for normal optimizations
|
||||||
|
configure_args.append("--enable-fast=all")
|
||||||
|
configure_args.append("--enable-g=dbg")
|
||||||
|
configure_args.append("--enable-nmpi-as-mpi")
|
||||||
|
|
||||||
|
if "%gnu" in spec:
|
||||||
|
# set variables for what compilers
|
||||||
|
os.environ['MPICHLIB_CFLAGS'] = "-g -O2"
|
||||||
|
os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2"
|
||||||
|
os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fno-second-underscore"
|
||||||
|
os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fno-second-underscore"
|
||||||
|
elif "%intel" in spec:
|
||||||
|
# set variables for Inel compilers
|
||||||
|
os.environ['MPICHLIB_CFLAGS'] = "-g -O2"
|
||||||
|
os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2"
|
||||||
|
os.environ['MPICHLIB_FFLAGS'] = "-g -O2"
|
||||||
|
os.environ['MPICHLIB_F90FLAGS'] = "-g -O2"
|
||||||
|
elif "%pgi" in spec:
|
||||||
|
# set variables for PGI compilers
|
||||||
|
os.environ['MPICHLIB_CFLAGS'] = "-g -O2 -fPIC"
|
||||||
|
os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2 -fPIC"
|
||||||
|
os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fPIC"
|
||||||
|
os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fPIC"
|
||||||
|
|
||||||
|
# determine network type by variant
|
||||||
|
if "+psm" in spec:
|
||||||
|
# throw this flag on QLogic systems to use PSM
|
||||||
|
configure_args.append("--with-device=ch3:psm")
|
||||||
|
else:
|
||||||
|
# throw this flag on IB systems
|
||||||
|
configure_args.append("--with-device=ch3:mrail", "--with-rdma=gen2")
|
||||||
|
|
||||||
|
# TODO: shared-memory build
|
||||||
|
|
||||||
|
# TODO: CUDA
|
||||||
|
|
||||||
|
# TODO: other file systems like panasis
|
||||||
|
|
||||||
configure(
|
configure(
|
||||||
"--prefix=" + prefix,
|
"--prefix=" + prefix,
|
||||||
"--enable-f77", "--enable-fc", "--enable-cxx",
|
"--enable-f77", "--enable-fc", "--enable-cxx",
|
||||||
"--enable-fast=all", "--enable-g=dbg", "--enable-nmpi-as-mpi",
|
|
||||||
"--enable-shared", "--enable-sharedlibs=gcc",
|
"--enable-shared", "--enable-sharedlibs=gcc",
|
||||||
"--enable-debuginfo",
|
"--enable-debuginfo",
|
||||||
"--with-pm=no", "--with-pmi=slurm",
|
"--with-pm=no", "--with-pmi=slurm",
|
||||||
"--with-device=ch3:psm",
|
|
||||||
"--enable-romio", "--with-file-system=lustre+nfs+ufs",
|
"--enable-romio", "--with-file-system=lustre+nfs+ufs",
|
||||||
"--disable-mpe", "--without-mpe")
|
"--disable-mpe", "--without-mpe",
|
||||||
|
"--disable-silent-rules",
|
||||||
|
*configure_args)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
|
|
||||||
make("install")
|
make("install")
|
||||||
|
Loading…
Reference in New Issue
Block a user