build parmetis against external metis
This commit is contained in:
parent
db61a09cf1
commit
b926d8a0cd
2 changed files with 17 additions and 20 deletions
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index ca945dd..1bf94e9 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -33,7 +33,7 @@ include_directories(${GKLIB_PATH})
|
||||||
|
include_directories(${METIS_PATH}/include)
|
||||||
|
|
||||||
|
# List of directories that cmake will look for CMakeLists.txt
|
||||||
|
-add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
|
||||||
|
+#add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
|
||||||
|
add_subdirectory(include)
|
||||||
|
add_subdirectory(libparmetis)
|
||||||
|
add_subdirectory(programs)
|
|
@ -25,9 +25,6 @@
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
# FIXME : lot of code is duplicated from packages/metis/package.py . Inheriting from there may reduce
|
|
||||||
# FIXME : the installation rules to just a few lines
|
|
||||||
|
|
||||||
|
|
||||||
class Parmetis(Package):
|
class Parmetis(Package):
|
||||||
"""
|
"""
|
||||||
|
@ -43,13 +40,11 @@ class Parmetis(Package):
|
||||||
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('double', default=False, description='Use double precision floating point types')
|
|
||||||
|
|
||||||
depends_on('cmake @2.8:') # build dependency
|
depends_on('cmake @2.8:') # build dependency
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
|
|
||||||
# FIXME : this should conflict with metis as it builds its own version internally
|
patch('enable_external_metis.patch')
|
||||||
|
depends_on('metis')
|
||||||
|
|
||||||
depends_on('gdb', when='+gdb')
|
depends_on('gdb', when='+gdb')
|
||||||
|
|
||||||
|
@ -63,8 +58,8 @@ def install(self, spec, prefix):
|
||||||
|
|
||||||
# FIXME : Once a contract is defined, MPI compilers should be retrieved indirectly via spec['mpi'] in case
|
# FIXME : Once a contract is defined, MPI compilers should be retrieved indirectly via spec['mpi'] in case
|
||||||
# FIXME : they use a non-standard name
|
# FIXME : they use a non-standard name
|
||||||
options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=metis_source),
|
options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=metis_source), # still need headers from METIS source, and they are not installed with METIS. shame...
|
||||||
'-DMETIS_PATH:PATH={metis_source}'.format(metis_source=metis_source),
|
'-DMETIS_PATH:PATH={metis_source}'.format(metis_source=spec['metis'].prefix),
|
||||||
'-DCMAKE_C_COMPILER:STRING=mpicc',
|
'-DCMAKE_C_COMPILER:STRING=mpicc',
|
||||||
'-DCMAKE_CXX_COMPILER:STRING=mpicxx'])
|
'-DCMAKE_CXX_COMPILER:STRING=mpicxx'])
|
||||||
|
|
||||||
|
@ -78,18 +73,7 @@ def install(self, spec, prefix):
|
||||||
if '+gdb' in spec:
|
if '+gdb' in spec:
|
||||||
options.append('-DGDB:BOOL=ON')
|
options.append('-DGDB:BOOL=ON')
|
||||||
|
|
||||||
metis_header = join_path(metis_source, 'include', 'metis.h')
|
|
||||||
|
|
||||||
if '+idx64' in spec:
|
|
||||||
filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header)
|
|
||||||
|
|
||||||
if '+double' in spec:
|
|
||||||
filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
|
|
||||||
|
|
||||||
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")
|
||||||
# Parmetis build system doesn't allow for an external metis to be used, but doesn't copy the required
|
|
||||||
# metis header either
|
|
||||||
install(metis_header, self.prefix.include)
|
|
||||||
|
|
Loading…
Reference in a new issue