From c1cea7ebcfdcb2573439c8185dae35ce5e55c43f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 24 May 2017 14:20:13 -0500 Subject: [PATCH 1/7] Add latest version of CONVERGE (#4337) * Add latest version of CONVERGE * Flake8 fixes --- .../builtin/packages/converge/package.py | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/converge/package.py b/var/spack/repos/builtin/packages/converge/package.py index 429be8542d2..c1d039132dd 100644 --- a/var/spack/repos/builtin/packages/converge/package.py +++ b/var/spack/repos/builtin/packages/converge/package.py @@ -24,7 +24,6 @@ ############################################################################## from spack import * from distutils.dir_util import copy_tree -import os class Converge(Package): @@ -37,25 +36,30 @@ class Converge(Package): parameters. This grid generation method completely eliminates the need to manually generate a grid. In addition, CONVERGE offers many other features to expedite the setup process and to ensure that your simulations are as - computationally efficient as possible. - - Note: CONVERGE is licensed software. You will need to create an account on - the CONVERGE homepage and download CONVERGE yourself. Spack will search - your current directory for the download file. Alternatively, add this file - to a mirror so that Spack can find it. For instructions on how to set up a - mirror, see http://spack.readthedocs.io/en/latest/mirrors.html""" + computationally efficient as possible.""" homepage = "https://www.convergecfd.com/" - url = "file://%s/converge_install_2.3.16.tar.gz" % os.getcwd() + url = "https://download.convergecfd.com/download/CONVERGE_2.4/Full_Solver_Packages/converge_install_2.4.10.tar.gz" + # In order to view available versions, you need to register for an account: + # https://download.convergecfd.com/wp-login.php?action=register + + version('2.4.10', '53f5bd4bfb39005bebae46b8d6ee3ce6') version('2.3.16', '8b80f1e73a63181c427c7732ad279986') variant('mpi', default=True, description='Build with MPI support') - # The Converge Getting Started Guide recommends: - # MPICH: 3.1.4 - # HP-MPI: 2.0.3+ - # OpenMPI: 1.6.* + # The CONVERGE Getting Started Guide recommends: + # + # +--------------+--------+---------+---------+ + # | MPI Packages | v2.2 | v2.3 | v2.4 | + # +--------------+--------+---------+---------+ + # | MPICH | 1.2.1 | 3.1.4 | | + # | HP-MPI | 2.0.3+ | 2.0.3+ | | + # | Platform MPI | | 9.1.2 | 9.1.2 | + # | Open MPI | 1.6+ | 1.6+ | 1.10.1+ | + # | Intel MPI | | 17.0.98 | 17.0.98 | + # +--------------+--------+---------+---------+ depends_on('mpi', when='+mpi') # Licensing @@ -67,3 +71,7 @@ class Converge(Package): def install(self, spec, prefix): copy_tree('.', prefix) + + def setup_environment(self, spack_env, run_env): + run_env.set('CONVERGE_ROOT', self.prefix) + run_env.prepend_path('PATH', join_path(self.prefix, 'l_x86_64', 'bin')) From 12ab882eba1631f85f4ebd2acfe1a9c41857ca79 Mon Sep 17 00:00:00 2001 From: becker33 Date: Wed, 24 May 2017 17:13:18 -0700 Subject: [PATCH 2/7] Fix issues parsing multiple anonymous specs (#4199) * fix parser * Removed xfails * cleaned up debug print statements * make use of these changes in gcc * Added comment explaining unreachable line, line left for added protection --- lib/spack/spack/spec.py | 31 +++++++++++++------ lib/spack/spack/test/spec_syntax.py | 11 ++----- .../repos/builtin/packages/gcc/package.py | 19 +++++------- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index ff213c59866..9e89feb1483 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2958,16 +2958,23 @@ def do_parse(self): # We're parsing an anonymous spec beginning with a # key-value pair. if not specs: + self.push_tokens([self.previous, self.token]) + self.previous = None specs.append(self.spec(None)) - self.expect(VAL) - # Raise an error if the previous spec is already - # concrete (assigned by hash) - if specs[-1]._hash: - raise RedundantSpecError(specs[-1], - 'key-value pair') - specs[-1]._add_flag( - self.previous.value, self.token.value) - self.previous = None + else: + if specs[-1].concrete: + # Trying to add k-v pair to spec from hash + raise RedundantSpecError(specs[-1], + 'key-value pair') + # We should never end up here. + # This requires starting a new spec with ID, EQ + # After another spec that is not concrete + # If the previous spec is not concrete, this is + # handled in the spec parsing loop + # If it is concrete, see the if statement above + # If there is no previous spec, we don't land in + # this else case. + self.unexpected_token() else: # We're parsing a new spec by name self.previous = None @@ -3151,7 +3158,11 @@ def version(self): if self.accept(COLON): if self.accept(ID): - end = self.token.value + if self.next and self.next.type is EQ: + # This is a start: range followed by a key=value pair + self.push_tokens([self.token]) + else: + end = self.token.value elif start: # No colon, but there was a version. return Version(start) diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 2ee9ef486ce..906aa77bb2e 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -140,10 +140,9 @@ def test_anonymous_specs(self): self.check_parse("arch=test-None-None", "platform=test") self.check_parse('@2.7:') - @pytest.mark.xfail() def test_anonymous_specs_with_multiple_parts(self): # Parse anonymous spec with multiple tokens - self.check_parse('languages=go @4.2:') + self.check_parse('@4.2: languages=go', 'languages=go @4.2:') self.check_parse('@4.2: languages=go') def test_simple_dependence(self): @@ -551,12 +550,8 @@ def test_kv_with_spaces(self): @pytest.mark.parametrize('spec,anon_spec,spec_name', [ ('openmpi languages=go', 'languages=go', 'openmpi'), ('openmpi @4.6:', '@4.6:', 'openmpi'), - pytest.mark.xfail( - ('openmpi languages=go @4.6:', 'languages=go @4.6:', 'openmpi') - ), - pytest.mark.xfail( - ('openmpi @4.6: languages=go', '@4.6: languages=go', 'openmpi') - ), + ('openmpi languages=go @4.6:', 'languages=go @4.6:', 'openmpi'), + ('openmpi @4.6: languages=go', '@4.6: languages=go', 'openmpi'), ]) def test_parse_anonymous_specs(spec, anon_spec, spec_name): diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 1bdee43e831..3d42bb98b5b 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -97,17 +97,14 @@ class Gcc(AutotoolsPackage): # depends_on('guile@1.4.1:', type='test') # See https://golang.org/doc/install/gccgo#Releases - provides('golang', when='languages=go') - # 'when' does not currently support multiple parts of a spec. - # See https://github.com/LLNL/spack/pull/4151 - # provides('golang', when='languages=go @4.6:') - # provides('golang@:1', when='languages=go @4.7.1:') - # provides('golang@:1.1', when='languages=go @4.8:') - # provides('golang@:1.1.2', when='languages=go @4.8.2:') - # provides('golang@:1.2', when='languages=go @4.9:') - # provides('golang@:1.4', when='languages=go @5:') - # provides('golang@:1.6.1', when='languages=go @6:') - # provides('golang@:1.8', when='languages=go @7:') + provides('golang', when='languages=go @4.6:') + provides('golang@:1', when='languages=go @4.7.1:') + provides('golang@:1.1', when='languages=go @4.8:') + provides('golang@:1.1.2', when='languages=go @4.8.2:') + provides('golang@:1.2', when='languages=go @4.9:') + provides('golang@:1.4', when='languages=go @5:') + provides('golang@:1.6.1', when='languages=go @6:') + provides('golang@:1.8', when='languages=go @7:') # For a list of valid languages for a specific release, # run the following command in the GCC source directory: From 8e9d9057940bc3ed092530c6d2e6835e84ab0574 Mon Sep 17 00:00:00 2001 From: Andrey Prokopenko Date: Thu, 25 May 2017 10:41:11 -0400 Subject: [PATCH 3/7] Trilinos: add DTK external package (#4304) * trilinos: add DTK external package * Making +dtk and ~tpetra conflict --- .../builtin/packages/trilinos/package.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0d90ae4e1e6..66dc4f0e642 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -87,14 +87,23 @@ class Trilinos(CMakePackage): description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') - variant('boost', default=True, description='Compile with Boost') - variant('tpetra', default=True, description='Compile with Tpetra') - variant('exodus', default=False, description='Compile with Exodus from SEACAS') + variant('boost', default=True, description='Compile with Boost') + variant('tpetra', default=True, description='Compile with Tpetra') + variant('exodus', default=False, description='Compile with Exodus from SEACAS') + + variant('dtk', default=False, description='Enable DataTransferKit') + resource(name='dtk', + git='https://github.com/ornl-cees/DataTransferKit', + tag='master', + placement='DataTransferKit', + when='+dtk') + conflicts('+dtk', when='~tpetra') # Everything should be compiled with -fpic depends_on('blas') depends_on('lapack') depends_on('boost', when='+boost') + depends_on('boost', when='+dtk') depends_on('matio') depends_on('glm') depends_on('metis@5:', when='+metis') @@ -386,6 +395,13 @@ def cmake_args(self): '-DTrilinos_ENABLE_STK=OFF' ]) + if '+dtk' in spec: + options.extend([ + '-DTrilinos_EXTRA_REPOSITORIES:STRING=DataTransferKit', + '-DTpetra_INST_INT_UNSIGNED_LONG:BOOL=ON', + '-DTrilinos_ENABLE_DataTransferKit:BOOL=ON' + ]) + # exodus if '+exodus' in spec: options.extend([ From f8a7549f513586c5399d243e23e05f01e6339c98 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 25 May 2017 09:49:00 -0500 Subject: [PATCH 4/7] Add missing dependency to py-entrypoints (#4330) --- .../builtin/packages/py-configparser/package.py | 13 +++++-------- .../builtin/packages/py-entrypoints/package.py | 11 +++++++++-- .../builtin/packages/py-ordereddict/package.py | 4 +++- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-configparser/package.py b/var/spack/repos/builtin/packages/py-configparser/package.py index 0a8660aa719..a489c893273 100644 --- a/var/spack/repos/builtin/packages/py-configparser/package.py +++ b/var/spack/repos/builtin/packages/py-configparser/package.py @@ -29,16 +29,13 @@ class PyConfigparser(PythonPackage): """This library brings the updated configparser from Python 3.5 to Python 2.6-3.5.""" - homepage = "https://pypi.python.org/pypi/configparser" - url = "https://pypi.python.org/packages/source/c/configparser/configparser-3.5.0.tar.gz" + homepage = "https://docs.python.org/3/library/configparser.html" + url = "https://pypi.io/packages/source/c/configparser/configparser-3.5.0.tar.gz" - version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538', - url="https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz") + version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538') - depends_on('python@2.6:2.8,3.4:') + depends_on('py-setuptools', type='build') # This dependency breaks concretization # See https://github.com/LLNL/spack/issues/2793 - # depends_on('py-ordereddict', when='^python@2.6:2.6.999', type=('build', 'run')) # noqa - - depends_on('py-setuptools', type='build') + # depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-entrypoints/package.py b/var/spack/repos/builtin/packages/py-entrypoints/package.py index 944999d69b8..76f6b37b743 100644 --- a/var/spack/repos/builtin/packages/py-entrypoints/package.py +++ b/var/spack/repos/builtin/packages/py-entrypoints/package.py @@ -25,15 +25,22 @@ from spack import * -class PyEntrypoints(Package): +class PyEntrypoints(PythonPackage): """Discover and load entry points from installed packages.""" homepage = "https://pypi.python.org/pypi/entrypoints" - url = "https://files.pythonhosted.org/packages/f8/ad/0e77a853c745a15981ab51fa9a0cb4eca7a7a007b4c1970106ee6ba01e0c/entrypoints-0.2.2-py2.py3-none-any.whl" + url = "https://pypi.python.org/packages/f8/ad/0e77a853c745a15981ab51fa9a0cb4eca7a7a007b4c1970106ee6ba01e0c/entrypoints-0.2.2-py2.py3-none-any.whl" + + import_modules = ['entrypoints'] version('0.2.2', '73bd7ce92c19b25dc5a20aff41be996a', expand=False) + depends_on('python@2.7:', type=('build', 'run')) + depends_on('py-pip', type='build') + depends_on('py-configparser', when='^python@:2.8', type=('build', 'run')) + + phases = ['install'] def install(self, spec, prefix): pip = which('pip') diff --git a/var/spack/repos/builtin/packages/py-ordereddict/package.py b/var/spack/repos/builtin/packages/py-ordereddict/package.py index b560990f00c..29d57862372 100644 --- a/var/spack/repos/builtin/packages/py-ordereddict/package.py +++ b/var/spack/repos/builtin/packages/py-ordereddict/package.py @@ -30,6 +30,8 @@ class PyOrdereddict(PythonPackage): OrderedDict that works in Python 2.4-2.6.""" homepage = "https://pypi.python.org/pypi/ordereddict" - url = "https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz" + url = "https://pypi.io/packages/source/o/ordereddict/ordereddict-1.1.tar.gz" + + import_modules = ['ordereddict'] version('1.1', 'a0ed854ee442051b249bfad0f638bbec') From 53713d57c92a82d8aac7c1447d08b3b2b95420cf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 25 May 2017 11:29:54 -0500 Subject: [PATCH 5/7] Add older version of CONVERGE (#4346) --- var/spack/repos/builtin/packages/converge/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/converge/package.py b/var/spack/repos/builtin/packages/converge/package.py index c1d039132dd..c62f4bd5d15 100644 --- a/var/spack/repos/builtin/packages/converge/package.py +++ b/var/spack/repos/builtin/packages/converge/package.py @@ -46,6 +46,8 @@ class Converge(Package): version('2.4.10', '53f5bd4bfb39005bebae46b8d6ee3ce6') version('2.3.16', '8b80f1e73a63181c427c7732ad279986') + version('2.1.0', '327a917d46aa3bc8dee9511375ce112c', + url="https://download.convergecfd.com/download/CONVERGE_2.1/Full_Solver_Packages/converge_install_2.1.0_111615.tar.gz") variant('mpi', default=True, description='Build with MPI support') From 26440accabc68d441b759f448ac0e76736fb3b3c Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Thu, 25 May 2017 11:00:58 -0700 Subject: [PATCH 6/7] Touch up string expansion. (#4344) * Touch up string expansion. I'm chasing this: ``` $ (module purge; spack install perl %gcc/5.4.0) ==> Error: No installed spec matches the hash: '%s' ``` There's something deeper going on, but the error message isn't helpful. After this change it tells me this: ``` $ (module purge; spack install perl %gcc/5.4.0) ==> Error: No installed spec matches the hash: '5.4.0' ``` Which is weird because `5.4.0` is not a hash... Whatever is going on here, the error message needs to be fixed. * Flake8 whitespace --- lib/spack/spack/spec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9e89feb1483..c757e6b0d6f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3395,7 +3395,8 @@ def __init__(self, spec, hash): class NoSuchHashError(SpecError): def __init__(self, hash): super(NoSuchHashError, self).__init__( - "No installed spec matches the hash: '%s'") + "No installed spec matches the hash: '%s'" + % hash) class RedundantSpecError(SpecError): From d9892c629cf6ebd185affd2d681d289c6dec4e8d Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Thu, 25 May 2017 11:31:46 -0700 Subject: [PATCH 7/7] Add ant@1.9.6 info (#4350) --- var/spack/repos/builtin/packages/ant/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ant/package.py b/var/spack/repos/builtin/packages/ant/package.py index 5267b4ee0d8..cbd05c7dec1 100644 --- a/var/spack/repos/builtin/packages/ant/package.py +++ b/var/spack/repos/builtin/packages/ant/package.py @@ -39,6 +39,7 @@ class Ant(Package): version('1.9.9', '22c9d40dabafbec348aaada226581239') version('1.9.8', '16253d516d5c33c4af9ef8fafcf1004b') version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1') + version('1.9.6', '29b7507c9053e301d2b85091f2aec6f0') depends_on('jdk')