From 1d760e79a63eed01e6cdb2ecaf8f9f3bc8e4aa4e Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 27 Oct 2019 22:24:06 -0500 Subject: Libbeagle fixes (#13463) * Fixes for libbeagle This PR fixes a couple of issues with the libbeagle package. - Use args.append('--with-cuda=%s' % self.spec['cuda'].prefix) - Disable the default of compiling with -march=native as Spack now inserts architecture specific flags - Set BEAST_LIB in the beast1 package not in libbeagle. * Use new setup_run_environment method --- var/spack/repos/builtin/packages/beast1/package.py | 5 +++-- var/spack/repos/builtin/packages/libbeagle/package.py | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/beast1/package.py b/var/spack/repos/builtin/packages/beast1/package.py index 2361dd95c0..e5d528b60f 100644 --- a/var/spack/repos/builtin/packages/beast1/package.py +++ b/var/spack/repos/builtin/packages/beast1/package.py @@ -24,8 +24,9 @@ class Beast1(Package): base = 'https://github.com/beast-dev/beast-mcmc/releases/download' return '{0}/v{1}/BEASTv{1}.tgz'.format(base, ver.dotted) - def setup_environment(self, spack_env, run_env): - run_env.set('BEAST1', self.prefix) + def setup_run_environment(self, env): + env.set('BEAST1', self.prefix) + env.set('BEAST_LIB', self.prefix.lib) def install(self, spec, prefix): install_tree('bin', prefix.bin) diff --git a/var/spack/repos/builtin/packages/libbeagle/package.py b/var/spack/repos/builtin/packages/libbeagle/package.py index 0c21905a0a..edae048df5 100644 --- a/var/spack/repos/builtin/packages/libbeagle/package.py +++ b/var/spack/repos/builtin/packages/libbeagle/package.py @@ -44,15 +44,15 @@ class Libbeagle(AutotoolsPackage, CudaPackage): 'configure.ac', string=True) def configure_args(self): - args = [] + args = [ + # Since spack will inject architecture flags turn off -march=native + # when building libbeagle. + '--disable-march-native', + ] if '+cuda' in self.spec: - args.append('--with-cuda=%s' % spec['cuda'].prefix) + args.append('--with-cuda=%s' % self.spec['cuda'].prefix) else: args.append('--without-cuda') return args - - def setup_environment(self, spack_env, run_env): - prefix = self.prefix - run_env.prepend_path('BEAST_LIB', prefix.lib) -- cgit v1.2.3-70-g09d2