Skip to content

set LDFLAGS instead of LIBRARY_PATH and add new required keyword to _get_software_root for Fujitsu toolchain #3704

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

Merged
merged 2 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
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
14 changes: 5 additions & 9 deletions easybuild/toolchains/compiler/fujitsu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"""
import os

import easybuild.tools.environment as env
import easybuild.tools.systemtools as systemtools
from easybuild.tools.toolchain.compiler import Compiler, DEFAULT_OPT_LEVEL

Expand Down Expand Up @@ -86,18 +85,15 @@ class FujitsuCompiler(Compiler):
(systemtools.AARCH64, systemtools.ARM): '-mcpu=generic -mtune=generic',
}

def prepare(self, *args, **kwargs):
super(FujitsuCompiler, self).prepare(*args, **kwargs)

# make sure the fujitsu module libraries are found (and added to rpath by wrapper)
libdir = os.path.join(os.getenv(TC_CONSTANT_MODULE_VAR), 'lib64')
self.log.debug("Adding %s to $LIBRARY_PATH" % libdir)
env.setvar('LIBRARY_PATH', os.pathsep.join([os.getenv('LIBRARY_PATH'), libdir]))

def _set_compiler_vars(self):
super(FujitsuCompiler, self)._set_compiler_vars()

# enable clang compatibility mode
# moved to compiler constants to make sure it is always used
# self.variables.nappend('CFLAGS', ['Nclang'])
# self.variables.nappend('CXXFLAGS', ['Nclang'])

# make sure the fujitsu module libraries are found (and added to rpath by wrapper)
libdir = os.path.join(os.getenv(TC_CONSTANT_MODULE_VAR), 'lib64')
self.log.debug("Adding %s to $LDFLAGS" % libdir)
self.variables.nappend('LDFLAGS', [libdir])
4 changes: 2 additions & 2 deletions easybuild/toolchains/linalg/fujitsussl.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FujitsuSSL(LinAlg):
SCALAPACK_INCLUDE_DIR = ['']
SCALAPACK_FAMILY = TC_CONSTANT_FUJITSU_SSL

def _get_software_root(self, name):
def _get_software_root(self, name, required=True):
"""Get install prefix for specified software name; special treatment for Fujitsu modules."""
if name == TC_CONSTANT_MODULE_NAME:
env_var = TC_CONSTANT_MODULE_VAR
Expand All @@ -78,7 +78,7 @@ def _get_software_root(self, name):
else:
self.log.debug("Obtained install prefix for %s via $%s: %s", name, env_var, root)
else:
root = super(FujitsuSSL, self)._get_software_root(name)
root = super(FujitsuSSL, self)._get_software_root(name, required=required)

return root

Expand Down