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

tweak libpaths in TensorFlow easyblock by adding directory containing libnccl.so.2 #3497

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
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: 10 additions & 10 deletions easybuild/easyblocks/t/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,16 +709,6 @@ def configure_step(self):
config_env_vars.update({
'NCCL_INSTALL_PATH': nccl_root,
})

# add absolute path to libnccl.so.2 directory provided by NCCL
# when LD_LIBRARY_PATH is filtered and LIBRARY_PATH is not
# filtered, e.g., in an environment such as EESSI
filtered_env_vars = build_option('filter_env_vars') or []
if 'LD_LIBRARY_PATH' in filtered_env_vars and 'LIBRARY_PATH' not in filtered_env_vars:
system_libs_info_as_list = list(self.system_libs_info)
system_libs_info_as_list[2].append(os.path.join(nccl_root, get_software_libdir('NCCL')))
self.system_libs_info = tuple(system_libs_info_as_list)

else:
nccl_version = '1.3' # Use simple downloadable version
config_env_vars.update({
Expand Down Expand Up @@ -894,6 +884,16 @@ def build_step(self):

# Make TF find our modules. LD_LIBRARY_PATH gets automatically added by configure.py
cpaths, libpaths = self.system_libs_info[1:]

# add absolute path to libnccl.so.2 directory provided by NCCL
# when LD_LIBRARY_PATH is filtered and LIBRARY_PATH is not
# filtered, e.g., in an environment such as EESSI
trz42 marked this conversation as resolved.
Show resolved Hide resolved
nccl_root = get_software_root('NCCL')
if nccl_root:
filtered_env_vars = build_option('filter_env_vars') or []
if 'LD_LIBRARY_PATH' in filtered_env_vars and 'LIBRARY_PATH' not in filtered_env_vars:
libpaths.append(os.path.join(nccl_root, get_software_libdir('NCCL')))

if cpaths:
action_env['CPATH'] = ':'.join(cpaths)
if libpaths:
Expand Down
Loading