From 30ba96e58fe699e92902ce53a87b5e1cfb756d6f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:56:18 +0100 Subject: [PATCH] same --- .../builtin/packages/trilinos/package.py | 84 ++++++++++++++++--- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 22c7ab6d61..7b913031e3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -2,8 +2,7 @@ import os class Trilinos(Package): - """ - The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented + """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. A unique design feature of Trilinos is its focus on packages. """ @@ -28,10 +27,19 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') + depends_on('metis') + depends_on('suite-sparse') + depends_on('tbb') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') + depends_on('parmetis') + depends_on('mumps+metis+parmetis') + depends_on('scalapack') + depends_on('superlu-dist') + depends_on('hypre') + depends_on('hdf5+mpi') depends_on('python') # Needs py-numpy activated @@ -49,23 +57,79 @@ def install(self, spec, prefix): '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', '-DBLAS_LIBRARY_NAMES=blas', - '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, + '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, #FIXME '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, + '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, - '-DTrilinos_ENABLE_Fortran=OFF', + '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTrilinos_CXX11_FLAGS=-std=c++11' + '-DTrilinos_CXX11_FLAGS=-std=c++11', + '-DTPL_ENABLE_Netcdf:BOOL=ON', + '-DTPL_ENABLE_HYPRE:BOOL=ON', + '-DTPL_ENABLE_HDF5:BOOL=ON', + '-DTPL_ENABLE_TBB:BOOL=ON' ]) + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) + + # suite-sparse related + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=ON', + '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + ]) + + # metis / parmetis + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=ON', + '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, + '-DMETIS_LIBRARY_NAMES=metis', + '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, + '-DTPL_ENABLE_ParMETIS:BOOL=ON', + '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_NAMES=parmetis;metis', + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + ]) + + # mumps + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=ON"', + '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! + ]) + + # scalapack + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + ]) + + # superlu_dist + options.extend([ + '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu_dist'].prefix.include + ]) + if spec.satisfies('^superlu-dist@4.0:'): + options.extend([ + '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + ]) + + # disable due to compiler / config errors: - options.extend(['-DTrilinos_ENABLE_SEACAS=OFF', - '-DTrilinos_ENABLE_Pike=OFF', - '-DTrilinos_ENABLE_STK=OFF' - ]) + options.extend([ + '-DTrilinos_ENABLE_SEACAS=OFF', + '-DTrilinos_ENABLE_Pike=OFF', + '-DTrilinos_ENABLE_STK=OFF' + ]) if self.compiler.name == "clang": os.environ['CPPFLAGS']="-Qunused-arguments"