diff options
-rw-r--r-- | var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py | 22 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py | 20 |
2 files changed, 42 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index 388969c068..a92981bafc 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -31,3 +31,25 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): releases=releases, url_name='onemkl') super(IntelOneapiMkl, self).__init__(spec) + + def _join_prefix(self, path): + return join_path(self.prefix, 'mkl', 'latest', path) + + def _ld_library_path(self): + dirs = ['lib/intel64'] + for dir in dirs: + yield self._join_prefix(dir) + + def _library_path(self): + dirs = ['lib/intel64'] + for dir in dirs: + yield self._join_prefix(dir) + + def setup_run_environment(self, env): + env.prepend_path('PATH', self._join_prefix('bin/intel64')) + env.prepend_path('CPATH', self._join_prefix('include')) + for dir in self._library_path(): + env.prepend_path('LIBRARY_PATH', dir) + for dir in self._ld_library_path(): + env.prepend_path('LD_LIBRARY_PATH', dir) + env.set('MKLROOT', join_path(self.prefix, 'mkl', 'latest')) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py index 357f15b525..d80afbb020 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py @@ -27,3 +27,23 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage): releases=releases, url_name='tbb_oneapi') super(IntelOneapiTbb, self).__init__(spec) + + def _join_prefix(self, path): + return join_path(self.prefix, 'tbb', 'latest', path) + + def _ld_library_path(self): + dirs = ['lib/intel64/gcc4.8'] + for dir in dirs: + yield self._join_prefix(dir) + + def _library_path(self): + dirs = ['lib/intel64/gcc4.8'] + for dir in dirs: + yield self._join_prefix(dir) + + def setup_run_environment(self, env): + for dir in self._library_path(): + env.prepend_path('LIBRARY_PATH', dir) + for dir in self._ld_library_path(): + env.prepend_path('LD_LIBRARY_PATH', dir) + env.set('TBBROOT', join_path(self.prefix, 'tbb', 'latest')) |