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 2 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
9 changes: 9 additions & 0 deletions easybuild/easyblocks/t/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,15 @@ def configure_step(self):
tensorrt_root = get_software_root('TensorRT')
nccl_root = get_software_root('NCCL')

# add path to libnccl.so.2 directory provided by NCCL when both sysroot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an if block for NCCL further down, best to keep this stuff together there (and the libpath part doesn't get used until a later step anyway)

# and RPATH are used (such as in EESSI)
if build_option('sysroot') and self.toolchain.use_rpath:
system_libs_info_as_list = list(self.system_libs_info)
new_libpaths = system_libs_info_as_list[2]
new_libpaths.append(os.path.join(nccl_root, 'lib'))
system_libs_info_as_list[2] = new_libpaths
self.system_libs_info = tuple(system_libs_info_as_list)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
system_libs_info_as_list = list(self.system_libs_info)
new_libpaths = system_libs_info_as_list[2]
new_libpaths.append(os.path.join(nccl_root, 'lib'))
system_libs_info_as_list[2] = new_libpaths
self.system_libs_info = tuple(system_libs_info_as_list)
system_libs_info_as_list = list(self.system_libs_info)
system_libs_info_as_list[2].append(get_software_libdir('NCCL'))
self.system_libs_info = tuple(system_libs_info_as_list)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will test if that works incl moving the code to the if block for nccl_root.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This almost worked. get_software_libdir('NCCL') returns the directory name, not the full path. Slightly modified this, see f6a9afd The latter version worked.


self._with_cuda = bool(cuda_root)

config_env_vars = {
Expand Down
Loading