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

Update ELSI easyblock to support two new external dependencies #2602

Merged
Merged
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
20 changes: 19 additions & 1 deletion easybuild/easyblocks/e/elsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, *args, **kwargs):
"""Initialize ELSI-specific variables."""
super(EB_ELSI, self).__init__(*args, **kwargs)
self.enable_sips = False
self.internal_ntpoly = True
self.env_suff = '_MT' if self.toolchain.options.get('openmp', None) else ''

@staticmethod
Expand Down Expand Up @@ -115,6 +116,21 @@ def configure_step(self):
else:
raise EasyBuildError("Could not find FFTW library or interface.")

ntpoly = get_software_root('NTPoly')
if ntpoly:
self.internal_ntpoly = False
self.log.info("Using external NTPoly.")
self.cfg.update('configopts', "-DUSE_EXTERNAL_NTPOLY=ON")
external_libs.append('NTPoly')
else:
self.log.info("No external NTPoly specified as dependency, building internal NTPoly.")

bsepack = get_software_root('bsepack')
if bsepack:
self.log.info("Using external BSEPACK.")
self.cfg.update('configopts', "-DENABLE_BSEPACK=ON -DUSE_EXTERNAL_BSEPACK=ON")
external_libs.extend(['bsepack', 'sseig'])

if get_software_root('imkl') or get_software_root('ScaLAPACK'):
external_libs.extend(re.findall(r'lib(.*?)\.a', os.environ['SCALAPACK%s_STATIC_LIBS' % self.env_suff]))
else:
Expand All @@ -131,7 +147,9 @@ def configure_step(self):
def sanity_check_step(self):
"""Custom sanity check for ELSI."""

libs = ['elsi', 'fortjson', 'MatrixSwitch', 'NTPoly', 'OMM']
libs = ['elsi', 'fortjson', 'MatrixSwitch', 'OMM']
if self.internal_ntpoly:
libs.append('NTPoly')
modules = [lib.lower() for lib in libs if lib != 'OMM']
modules.extend(['omm_ops', 'omm_params', 'omm_rand'])

Expand Down