diff options
author | Joseph Ciurej <ciurej1@llnl.gov> | 2016-05-02 16:41:55 -0700 |
---|---|---|
committer | Joseph Ciurej <ciurej1@llnl.gov> | 2016-05-24 12:28:05 -0700 |
commit | 9c95ec0b299f7f0eb83362318f77e31701708902 (patch) | |
tree | 772a813c1cf68c30827297b2be1238b606209d24 | |
parent | 3ab56a188e83054420d9004be1c6d07276c91375 (diff) | |
download | spack-9c95ec0b299f7f0eb83362318f77e31701708902.tar.gz spack-9c95ec0b299f7f0eb83362318f77e31701708902.tar.bz2 spack-9c95ec0b299f7f0eb83362318f77e31701708902.tar.xz spack-9c95ec0b299f7f0eb83362318f77e31701708902.zip |
Updated and added new versions to the METIS/ParMETIS packages.
- Added a 'url_for_version' function to the METIS/ParMETIS packages.
- Added installation support for METIS@5.0.2 and ParMETIS@4.0.2.
- Changed the 'double' variant to 'real64' to make it more consistent
with the 'idx64' variant naming.
- Removed an unnecessary dependency on gdb.
-rw-r--r-- | var/spack/repos/builtin/packages/metis/package.py | 35 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/parmetis/package.py | 18 |
2 files changed, 24 insertions, 29 deletions
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 061179b78e..daeaf6245b 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -33,30 +33,30 @@ class Metis(Package): recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes. """ - homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" + homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" + base_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis" - version('5.1.0', '5465e67079419a69e0116de24fce58fe', - url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz') - version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55', - url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz') + version('5.1.0', '5465e67079419a69e0116de24fce58fe') + version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5') + version('4.0.3', 'd3848b454532ef18dc83e4fb160d1e10') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') variant('gdb', default=False, description='Enables gdb support') variant('idx64', default=False, description='Use int64_t as default index type') - variant('double', default=False, description='Use double precision floating point types') + variant('real64', default=False, description='Use double precision floating point types') depends_on('cmake @2.8:', when='@5:') # build-time dependency - depends_on('gdb', when='+gdb') patch('install_gklib_defs_rename.patch', when='@5:') + def url_for_version(self, version): + version_dir = 'OLD/' if version < Version('4.0.3') else '' + return '%s/%smetis-%s.tar.gz' % (Metis.base_url, version_dir, version) @when('@4:4.0.3') def install(self, spec, prefix): - if '+gdb' in spec: raise InstallError('gdb support not implemented in METIS 4!') if '+idx64' in spec: @@ -128,7 +128,6 @@ class Metis(Package): @when('@5:') def install(self, spec, prefix): - options = [] options.extend(std_cmake_args) @@ -140,20 +139,15 @@ class Metis(Package): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') - if '+debug' in spec: - options.extend(['-DDEBUG:BOOL=ON', - '-DCMAKE_BUILD_TYPE:STRING=Debug']) - + options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) if '+gdb' in spec: options.append('-DGDB:BOOL=ON') metis_header = join_path(source_directory, 'include', 'metis.h') - if '+idx64' in spec: filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header) - - if '+double' in spec: + if '+real64' in spec: filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) # Make clang 7.3 happy. @@ -166,9 +160,10 @@ class Metis(Package): with working_dir(build_directory, create=True): cmake(source_directory, *options) make() - make("install") + make('install') + # now run some tests: - for f in ["4elt", "copter2", "mdual"]: + for f in ['4elt', 'copter2', 'mdual']: graph = join_path(source_directory,'graphs','%s.graph' % f) Executable(join_path(prefix.bin,'graphchk'))(graph) Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') @@ -182,6 +177,6 @@ class Metis(Package): # install GKlib headers, which will be needed for ParMETIS GKlib_dist = join_path(prefix.include,'GKlib') mkdirp(GKlib_dist) - fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) + fs = glob.glob(join_path(source_directory,'GKlib','*.h')) for f in fs: install(f, GKlib_dist) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 2dead4a76a..a8456083b4 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -31,10 +31,12 @@ class Parmetis(Package): ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. """ + homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' - url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz' + base_url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis' version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') + version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') @@ -42,17 +44,18 @@ class Parmetis(Package): depends_on('cmake @2.8:') # build dependency depends_on('mpi') - - patch('enable_external_metis.patch') depends_on('metis@5:') + patch('enable_external_metis.patch') # bug fixes from PETSc developers # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch') # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') - depends_on('gdb', when='+gdb') + def url_for_version(self, version): + version_dir = 'OLD/' if version < Version('3.2.0') else '' + return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, version_dir, version) def install(self, spec, prefix): options = [] @@ -71,18 +74,15 @@ class Parmetis(Package): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') - if '+debug' in spec: - options.extend(['-DDEBUG:BOOL=ON', - '-DCMAKE_BUILD_TYPE:STRING=Debug']) - + options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) if '+gdb' in spec: options.append('-DGDB:BOOL=ON') with working_dir(build_directory, create=True): cmake(source_directory, *options) make() - make("install") + make('install') # The shared library is not installed correctly on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): |