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:
parent
3ab56a188e
commit
9c95ec0b29
@ -33,30 +33,30 @@ class Metis(Package):
|
|||||||
recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.
|
recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview'
|
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"
|
base_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis"
|
||||||
|
|
||||||
version('5.1.0', '5465e67079419a69e0116de24fce58fe',
|
version('5.1.0', '5465e67079419a69e0116de24fce58fe')
|
||||||
url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz')
|
version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5')
|
||||||
version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55',
|
version('4.0.3', 'd3848b454532ef18dc83e4fb160d1e10')
|
||||||
url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz')
|
|
||||||
|
|
||||||
variant('shared', default=True, description='Enables the build of shared libraries')
|
variant('shared', default=True, description='Enables the build of shared libraries')
|
||||||
variant('debug', default=False, description='Builds the library in debug mode')
|
variant('debug', default=False, description='Builds the library in debug mode')
|
||||||
variant('gdb', default=False, description='Enables gdb support')
|
variant('gdb', default=False, description='Enables gdb support')
|
||||||
|
|
||||||
variant('idx64', default=False, description='Use int64_t as default index type')
|
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('cmake @2.8:', when='@5:') # build-time dependency
|
||||||
depends_on('gdb', when='+gdb')
|
|
||||||
|
|
||||||
patch('install_gklib_defs_rename.patch', when='@5:')
|
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')
|
@when('@4:4.0.3')
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
|
||||||
if '+gdb' in spec:
|
if '+gdb' in spec:
|
||||||
raise InstallError('gdb support not implemented in METIS 4!')
|
raise InstallError('gdb support not implemented in METIS 4!')
|
||||||
if '+idx64' in spec:
|
if '+idx64' in spec:
|
||||||
@ -128,7 +128,6 @@ def install(self, spec, prefix):
|
|||||||
|
|
||||||
@when('@5:')
|
@when('@5:')
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
|
||||||
options = []
|
options = []
|
||||||
options.extend(std_cmake_args)
|
options.extend(std_cmake_args)
|
||||||
|
|
||||||
@ -140,20 +139,15 @@ def install(self, spec, prefix):
|
|||||||
|
|
||||||
if '+shared' in spec:
|
if '+shared' in spec:
|
||||||
options.append('-DSHARED:BOOL=ON')
|
options.append('-DSHARED:BOOL=ON')
|
||||||
|
|
||||||
if '+debug' in spec:
|
if '+debug' in spec:
|
||||||
options.extend(['-DDEBUG:BOOL=ON',
|
options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug'])
|
||||||
'-DCMAKE_BUILD_TYPE:STRING=Debug'])
|
|
||||||
|
|
||||||
if '+gdb' in spec:
|
if '+gdb' in spec:
|
||||||
options.append('-DGDB:BOOL=ON')
|
options.append('-DGDB:BOOL=ON')
|
||||||
|
|
||||||
metis_header = join_path(source_directory, 'include', 'metis.h')
|
metis_header = join_path(source_directory, 'include', 'metis.h')
|
||||||
|
|
||||||
if '+idx64' in spec:
|
if '+idx64' in spec:
|
||||||
filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header)
|
filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header)
|
||||||
|
if '+real64' in spec:
|
||||||
if '+double' in spec:
|
|
||||||
filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
|
filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
|
||||||
|
|
||||||
# Make clang 7.3 happy.
|
# Make clang 7.3 happy.
|
||||||
@ -166,9 +160,10 @@ def install(self, spec, prefix):
|
|||||||
with working_dir(build_directory, create=True):
|
with working_dir(build_directory, create=True):
|
||||||
cmake(source_directory, *options)
|
cmake(source_directory, *options)
|
||||||
make()
|
make()
|
||||||
make("install")
|
make('install')
|
||||||
|
|
||||||
# now run some tests:
|
# 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)
|
graph = join_path(source_directory,'graphs','%s.graph' % f)
|
||||||
Executable(join_path(prefix.bin,'graphchk'))(graph)
|
Executable(join_path(prefix.bin,'graphchk'))(graph)
|
||||||
Executable(join_path(prefix.bin,'gpmetis'))(graph,'2')
|
Executable(join_path(prefix.bin,'gpmetis'))(graph,'2')
|
||||||
@ -182,6 +177,6 @@ def install(self, spec, prefix):
|
|||||||
# install GKlib headers, which will be needed for ParMETIS
|
# install GKlib headers, which will be needed for ParMETIS
|
||||||
GKlib_dist = join_path(prefix.include,'GKlib')
|
GKlib_dist = join_path(prefix.include,'GKlib')
|
||||||
mkdirp(GKlib_dist)
|
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:
|
for f in fs:
|
||||||
install(f, GKlib_dist)
|
install(f, GKlib_dist)
|
||||||
|
@ -31,10 +31,12 @@ class Parmetis(Package):
|
|||||||
ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured
|
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.
|
graphs, meshes, and for computing fill-reducing orderings of sparse matrices.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview'
|
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.3', 'f69c479586bf6bb7aff6a9bc0c739628')
|
||||||
|
version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce')
|
||||||
|
|
||||||
variant('shared', default=True, description='Enables the build of shared libraries')
|
variant('shared', default=True, description='Enables the build of shared libraries')
|
||||||
variant('debug', default=False, description='Builds the library in debug mode')
|
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('cmake @2.8:') # build dependency
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
|
|
||||||
patch('enable_external_metis.patch')
|
|
||||||
depends_on('metis@5:')
|
depends_on('metis@5:')
|
||||||
|
|
||||||
|
patch('enable_external_metis.patch')
|
||||||
# bug fixes from PETSc developers
|
# bug fixes from PETSc developers
|
||||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
|
# https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
|
||||||
patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch')
|
patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch')
|
||||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
|
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
|
||||||
patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch')
|
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):
|
def install(self, spec, prefix):
|
||||||
options = []
|
options = []
|
||||||
@ -71,18 +74,15 @@ def install(self, spec, prefix):
|
|||||||
|
|
||||||
if '+shared' in spec:
|
if '+shared' in spec:
|
||||||
options.append('-DSHARED:BOOL=ON')
|
options.append('-DSHARED:BOOL=ON')
|
||||||
|
|
||||||
if '+debug' in spec:
|
if '+debug' in spec:
|
||||||
options.extend(['-DDEBUG:BOOL=ON',
|
options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug'])
|
||||||
'-DCMAKE_BUILD_TYPE:STRING=Debug'])
|
|
||||||
|
|
||||||
if '+gdb' in spec:
|
if '+gdb' in spec:
|
||||||
options.append('-DGDB:BOOL=ON')
|
options.append('-DGDB:BOOL=ON')
|
||||||
|
|
||||||
with working_dir(build_directory, create=True):
|
with working_dir(build_directory, create=True):
|
||||||
cmake(source_directory, *options)
|
cmake(source_directory, *options)
|
||||||
make()
|
make()
|
||||||
make("install")
|
make('install')
|
||||||
|
|
||||||
# The shared library is not installed correctly on Darwin; correct this
|
# The shared library is not installed correctly on Darwin; correct this
|
||||||
if (sys.platform == 'darwin') and ('+shared' in spec):
|
if (sys.platform == 'darwin') and ('+shared' in spec):
|
||||||
|
Loading…
Reference in New Issue
Block a user