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.
This commit is contained in:
@@ -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 @@ def install(self, spec, prefix):
|
||||
|
||||
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):
|
||||
|
Reference in New Issue
Block a user