Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adopt module_load_environment: imkl #3555

Open
wants to merge 1 commit into
base: 5.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions easybuild/easyblocks/i/imkl.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,44 +434,45 @@ def sanity_check_step(self):

super(EB_imkl, self).sanity_check_step(custom_paths=custom_paths)

def make_module_req_guess(self):
def make_module_step(self, *args, **kwargs):
"""
A dictionary of possible directories to look for
Set paths for module load environment based on the actual installation files
"""
guesses = super(EB_imkl, self).make_module_req_guess()

if LooseVersion(self.version) >= LooseVersion('2021'):
compiler_subdir = os.path.join(self.get_versioned_subdir('compiler'), self.compiler_libdir)
pkg_config_path = [os.path.join(self.mkl_basedir, 'tools', 'pkgconfig'),
os.path.join(self.mkl_basedir, 'lib', 'pkgconfig')]
pkg_config_path = [
os.path.join(self.mkl_basedir, 'tools', 'pkgconfig'),
os.path.join(self.mkl_basedir, 'lib', 'pkgconfig'),
]
else:
compiler_subdir = os.path.join('lib', 'intel64')
pkg_config_path = [os.path.join(self.mkl_basedir, 'bin', 'pkgconfig')]
guesses['MANPATH'] = ['man', os.path.join('man', 'en_US')]
guesses['MIC_LD_LIBRARY_PATH'] = [
os.path.join('lib', 'intel64_lin_mic'),
os.path.join(self.mkl_basedir, 'lib', 'mic'),
]
library_path = [

self.module_load_environment.PATH = []
self.module_load_environment.LD_LIBRARY_PATH = [
compiler_subdir,
os.path.join(self.mkl_basedir, 'lib', 'intel64'),
]
cpath = [
self.module_load_environment.CPATH = [
os.path.join(self.mkl_basedir, 'include'),
os.path.join(self.mkl_basedir, 'include', 'fftw'),
]
cmake_prefix_path = [self.mkl_basedir]
guesses.update({
'PATH': [],
'LD_LIBRARY_PATH': library_path,
'LIBRARY_PATH': library_path,
'CPATH': cpath,
'CMAKE_PREFIX_PATH': cmake_prefix_path,
'PKG_CONFIG_PATH': pkg_config_path,
})
self.module_load_environment.CMAKE_PREFIX_PATH = [self.mkl_basedir]
self.module_load_environment.PKG_CONFIG_PATH = pkg_config_path

if LooseVersion(self.version) < LooseVersion('2021'):
self.module_load_environment.MANPATH = ['man', os.path.join('man', 'en_US')]
self.module_load_environment.MIC_LD_LIBRARY_PATH = [
os.path.join('lib', 'intel64_lin_mic'),
os.path.join(self.mkl_basedir, 'lib', 'mic'),
]

if self.cfg['flexiblas']:
guesses['FLEXIBLAS_LIBRARY_PATH'] = os.path.join(library_path[1], 'flexiblas')
return guesses
self.module_load_environment.FLEXIBLAS_LIBRARY_PATH = os.path.join(
self.mkl_basedir, 'lib', 'intel64', 'flexiblas'
)

return super().make_module_step(*args, **kwargs)

def make_module_extra(self):
"""Overwritten from Application to add extra txt"""
Expand Down
Loading