adding environment to OneMKL packages so that examples will build (#21377)
This commit is contained in:
parent
61641ecff2
commit
8be833b242
@ -31,3 +31,25 @@ def __init__(self, spec):
|
||||
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'))
|
||||
|
@ -27,3 +27,23 @@ def __init__(self, spec):
|
||||
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'))
|
||||
|
Loading…
Reference in New Issue
Block a user