From 5850d8530ef0570e508fb1ebd53428e98cc761a3 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Thu, 28 Jan 2016 14:22:28 +0100 Subject: [PATCH 01/11] Adding the stager to checksum any url that spack can handle --- lib/spack/spack/cmd/md5.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/cmd/md5.py b/lib/spack/spack/cmd/md5.py index ef1e4f3475..b8ffb5dec7 100644 --- a/lib/spack/spack/cmd/md5.py +++ b/lib/spack/spack/cmd/md5.py @@ -30,8 +30,9 @@ from llnl.util.filesystem import * import spack.util.crypto +from spack.stage import Stage, FailedDownloadError -description = "Calculate md5 checksums for files." +description = "Calculate md5 checksums for files/urls." def setup_parser(subparser): setup_parser.parser = subparser @@ -45,9 +46,20 @@ def md5(parser, args): for f in args.files: if not os.path.isfile(f): - tty.die("Not a file: %s" % f) - if not can_access(f): - tty.die("Cannot read file: %s" % f) + stage = Stage(f) + try: + stage.fetch() + checksum = spack.util.crypto.checksum(hashlib.md5, stage.archive_file) + print "%s %s" % (checksum, f) + except FailedDownloadError, e: + tty.msg("Failed to fetch %s" % url) + continue - checksum = spack.util.crypto.checksum(hashlib.md5, f) - print "%s %s" % (checksum, f) + finally: + stage.destroy() + else: + if not can_access(f): + tty.die("Cannot read file: %s" % f) + + checksum = spack.util.crypto.checksum(hashlib.md5, f) + print "%s %s" % (checksum, f) From 824546d343917fb24c1b94af0eeaea79371efb46 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Thu, 28 Jan 2016 14:43:30 +0100 Subject: [PATCH 02/11] correcting a bug when url and files are mixed --- lib/spack/spack/cmd/md5.py | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/cmd/md5.py b/lib/spack/spack/cmd/md5.py index b8ffb5dec7..879ef9f7b7 100644 --- a/lib/spack/spack/cmd/md5.py +++ b/lib/spack/spack/cmd/md5.py @@ -23,8 +23,10 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -import hashlib import argparse +import hashlib + +from contextlib import contextmanager import llnl.util.tty as tty from llnl.util.filesystem import * @@ -34,6 +36,19 @@ description = "Calculate md5 checksums for files/urls." +@contextmanager +def stager(url): + _cwd = os.getcwd() + _stager = Stage(url) + try: + _stager.fetch() + yield _stager + except FailedDownloadError: + tty.msg("Failed to fetch %s" % url) + finally: + _stager.destroy() + os.chdir(_cwd) # the Stage class changes the current working dir so it has to be restored + def setup_parser(subparser): setup_parser.parser = subparser subparser.add_argument('files', nargs=argparse.REMAINDER, @@ -46,17 +61,9 @@ def md5(parser, args): for f in args.files: if not os.path.isfile(f): - stage = Stage(f) - try: - stage.fetch() + with stager(f) as stage: checksum = spack.util.crypto.checksum(hashlib.md5, stage.archive_file) print "%s %s" % (checksum, f) - except FailedDownloadError, e: - tty.msg("Failed to fetch %s" % url) - continue - - finally: - stage.destroy() else: if not can_access(f): tty.die("Cannot read file: %s" % f) From 06f3cc33baeb1c8a8e99b0e0e602f398b4d221bd Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 28 Jan 2016 11:41:12 -0600 Subject: [PATCH 03/11] Modify url settings for fish package --- var/spack/repos/builtin/packages/fish/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py index 1225558705..b5a4a2d209 100644 --- a/var/spack/repos/builtin/packages/fish/package.py +++ b/var/spack/repos/builtin/packages/fish/package.py @@ -7,7 +7,8 @@ class Fish(Package): homepage = "http://fishshell.com/" url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz" - list_url = homepage + list_url = "http://fishshell.com/files/" + list_depth = 2 version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a') From 0e52c30bb8fbe954bdb2f74353865317cac18b85 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Thu, 28 Jan 2016 10:42:46 -0800 Subject: [PATCH 04/11] added py-wheel package --- .../repos/builtin/packages/py-wheel/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-wheel/package.py diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py new file mode 100644 index 0000000000..3118e74519 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wheel/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyWheel(Package): + """A built-package format for Python.""" + + homepage = "https://pypi.python.org/pypi/wheel" + url = "https://pypi.python.org/packages/source/w/wheel/wheel-0.26.0.tar.gz" + + version('0.26.0', '4cfc6e7e3dc7377d0164914623922a10') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) From 7e65f4da82cb9176247c1aa9ab72f40116cc6a8e Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Thu, 28 Jan 2016 13:22:56 -0800 Subject: [PATCH 05/11] Add the Caliper package --- .../repos/builtin/packages/caliper/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/caliper/package.py diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py new file mode 100644 index 0000000000..b14a562aa8 --- /dev/null +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Caliper(Package): + """ + Caliper is a generic context annotation system. It gives programmers the + ability to provide arbitrary program context information to (performance) + tools at runtime. + """ + + homepage = "https://github.com/LLNL/Caliper" + url = "" + + version('master', git='ssh://git@cz-stash.llnl.gov:7999/piper/caliper.git') + + variant('mpi', default=False, description='Enable MPI function wrappers.') + + depends_on('libunwind') + depends_on('papi') + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + with working_dir('build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") From 4f340315341a125bd01d0c844efc83454e531ca5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 28 Jan 2016 15:41:58 -0600 Subject: [PATCH 06/11] Add PnetCDF and M4 packages --- .../repos/builtin/packages/m4/package.py | 13 ++++++++++++ .../packages/parallel-netcdf/package.py | 20 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 var/spack/repos/builtin/packages/m4/package.py create mode 100644 var/spack/repos/builtin/packages/parallel-netcdf/package.py diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py new file mode 100644 index 0000000000..5d76d8866b --- /dev/null +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -0,0 +1,13 @@ +from spack import * + +class M4(Package): + """GNU M4 is an implementation of the traditional Unix macro processor.""" + homepage = "https://www.gnu.org/software/m4/m4.html" + url = "ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz" + + version('1.4.17', 'a5e9954b1dae036762f7b13673a2cf76') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py new file mode 100644 index 0000000000..62a8f7ca0b --- /dev/null +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -0,0 +1,20 @@ +from spack import * + +class ParallelNetcdf(Package): + """Parallel netCDF (PnetCDF) is a library providing high-performance + parallel I/O while still maintaining file-format compatibility with + Unidata's NetCDF.""" + + homepage = "https://trac.mcs.anl.gov/projects/parallel-netcdf" + url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.6.1.tar.gz" + + version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34') + + depends_on("m4") + depends_on("mpi") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--with-mpi=%s" % spec['mpi'].prefix) + make() + make("install") From d9548c01afe555ee58019b2ef5cb8938cd71cee3 Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Thu, 28 Jan 2016 15:47:37 -0700 Subject: [PATCH 07/11] Correct package URL --- var/spack/repos/builtin/packages/caliper/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index b14a562aa8..d51b4a4dd5 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -10,7 +10,7 @@ class Caliper(Package): homepage = "https://github.com/LLNL/Caliper" url = "" - version('master', git='ssh://git@cz-stash.llnl.gov:7999/piper/caliper.git') + version('master', git='ssh://git@github.com:LLNL/Caliper.git') variant('mpi', default=False, description='Enable MPI function wrappers.') From 2bea7f8d69064f893a21cfc53f3d781b572e2f79 Mon Sep 17 00:00:00 2001 From: Abhishek Kulkarni Date: Fri, 29 Jan 2016 00:29:20 -0500 Subject: [PATCH 08/11] Add the HPX-5 package. --- .../repos/builtin/packages/hpx/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hpx/package.py diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py new file mode 100644 index 0000000000..665d5c7407 --- /dev/null +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -0,0 +1,27 @@ +from spack import * +import os + +class Hpx(Package): + """The HPX-5 Runtime System. HPX-5 (High Performance ParalleX) is an + open source, portable, performance-oriented runtime developed at + CREST (Indiana University). HPX-5 provides a distributed + programming model allowing programs to run unmodified on systems + from a single SMP to large clusters and supercomputers with + thousands of nodes. HPX-5 supports a wide variety of Intel and ARM + platforms. It is being used by a broad range of scientific + applications enabling scientists to write code that performs and + scales better than contemporary runtimes.""" + homepage = "http://hpx.crest.iu.edu" + url = "http://hpx.crest.iu.edu/release/hpx-2.0.0.tar.gz" + + version('2.0.0', '3d2ff3aab6c46481f9ec65c5b2bfe7a6') + version('1.3.0', '2260ecc7f850e71a4d365a43017d8cee') + version('1.2.0', '4972005f85566af4afe8b71afbf1480f') + version('1.1.0', '646afb460ecb7e0eea713a634933ce4f') + version('1.0.0', '8020822adf6090bd59ed7fe465f6c6cb') + + def install(self, spec, prefix): + os.chdir("./hpx/") + configure('--prefix=%s' % prefix) + make() + make("install") From 74225544c6ae27e3ae07d37fe15935364c665f6e Mon Sep 17 00:00:00 2001 From: Abhishek Kulkarni Date: Fri, 29 Jan 2016 10:22:52 -0500 Subject: [PATCH 09/11] Rename the hpx package to hpx-5. --- .../builtin/packages/{hpx => hpx5}/package.py | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) rename var/spack/repos/builtin/packages/{hpx => hpx5}/package.py (57%) diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx5/package.py similarity index 57% rename from var/spack/repos/builtin/packages/hpx/package.py rename to var/spack/repos/builtin/packages/hpx5/package.py index 665d5c7407..3dae3c4170 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx5/package.py @@ -1,7 +1,7 @@ from spack import * import os -class Hpx(Package): +class Hpx5(Package): """The HPX-5 Runtime System. HPX-5 (High Performance ParalleX) is an open source, portable, performance-oriented runtime developed at CREST (Indiana University). HPX-5 provides a distributed @@ -20,8 +20,33 @@ class Hpx(Package): version('1.1.0', '646afb460ecb7e0eea713a634933ce4f') version('1.0.0', '8020822adf6090bd59ed7fe465f6c6cb') + variant('debug', default=False, description='Build a debug version of HPX-5') + variant('photon', default=False, description='Enable Photon support') + variant('mpi', default=False, description='Enable MPI support') + + depends_on("mpi", when='+mpi') + depends_on("mpi", when='+photon') + def install(self, spec, prefix): + extra_args = [] + if '+debug' in spec: + extra_args.extend([ + '--enable-debug', + 'CFLAGS=-g -O0' + ]) + else: + extra_args.append('CFLAGS=-O3') + + if '+mpi' in spec: + extra_args.append('--enable-mpi') + + if '+photon' in spec: + extra_args.extend([ + '--enable-mpi', + '--enable-photon' + ]) + os.chdir("./hpx/") - configure('--prefix=%s' % prefix) + configure('--prefix=%s' % prefix, *extra_args) make() make("install") From d14d50beb6dbb71c75a53902e70601c353496e09 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 29 Jan 2016 09:47:57 -0600 Subject: [PATCH 10/11] Checksum fix for hwloc --- var/spack/repos/builtin/packages/hwloc/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 60b315119b..ab7205646e 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -17,8 +17,8 @@ class Hwloc(Package): list_url = "http://www.open-mpi.org/software/hwloc/" list_depth = 3 - version('1.11.2', '486169cbe111cdea57be12638828ebbf') - version('1.11.1', '002742efd3a8431f98d6315365a2b543') + version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23') + version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc') version('1.9', '1f9f9155682fe8946a97c08896109508') depends_on('libpciaccess') From 3bf6fed7b3536d3b38a9855c2129956b24a77529 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Fri, 29 Jan 2016 11:29:27 -0800 Subject: [PATCH 11/11] updated openssl version --- var/spack/repos/builtin/packages/openssl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index bbb169ec6b..05de35fca0 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -12,6 +12,7 @@ class Openssl(Package): version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') + version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') depends_on("zlib") parallel = False