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 5 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
11 changes: 11 additions & 0 deletions easybuild/easyblocks/t/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ def configure_step(self):
})
else:
raise EasyBuildError("TensorFlow has a strict dependency on cuDNN if CUDA is enabled")

if nccl_root:
nccl_version = get_software_version('NCCL')
# Ignore the PKG_REVISION identifier if it exists (i.e., report 2.4.6 for 2.4.6-1 or 2.4.6-2)
Expand Down Expand Up @@ -883,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