From 1891ce35459f2f402effae2d7a8094bd0df49bc1 Mon Sep 17 00:00:00 2001 From: Kelly Thompson Date: Tue, 11 Oct 2016 01:42:59 -0600 Subject: Trilinos: Use more flexible option for locating the BLAS library directory. (#1987) + This change fixes a problem that manifests when trilinos is built against a MKL installation defined as an external package. In this scenario, the MKL libraries are found one directory deeper than for the case where spack provides MKL. The extra directory is a platform name like 'intel64'. + The changes in this PR were recommended by contributor @davydden. I implemented and tested with intel@16.0.3. These changes fix the issue I reported. I did not attempt building trilinos against other BLAS implementations. + fixes #1923 --- var/spack/repos/builtin/packages/mkl/package.py | 7 ------- var/spack/repos/builtin/packages/trilinos/package.py | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py index 8a31858bf5..4a9a8785f7 100644 --- a/var/spack/repos/builtin/packages/mkl/package.py +++ b/var/spack/repos/builtin/packages/mkl/package.py @@ -66,13 +66,6 @@ class Mkl(IntelInstaller): for f in os.listdir(mkl_dir): os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f)) - # Unfortunately MKL libs are natively distrubted in prefix/lib/intel64. - # To make MKL play nice with Spack, symlink all files to prefix/lib: - mkl_lib_dir = os.path.join(prefix, "lib", "intel64") - for f in os.listdir(mkl_lib_dir): - os.symlink(os.path.join(mkl_lib_dir, f), - os.path.join(self.prefix, "lib", f)) - def setup_dependent_environment(self, spack_env, run_env, dependent_spec): # set up MKLROOT for everyone using MKL package spack_env.set('MKLROOT', self.prefix) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 203e1502d6..4c7a94ce3f 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -149,10 +149,10 @@ class Trilinos(Package): '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', '-DBLAS_LIBRARY_NAMES=%s' % ';'.join(blas.names), - '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, + '-DBLAS_LIBRARY_DIRS=%s' % ';'.join(blas.directories), '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=%s' % ';'.join(lapack.names), - '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix.lib, + '-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories), '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', -- cgit v1.2.3-60-g2f50