Skip to content

Add support for NCCL - #195

Merged
msimberg merged 158 commits into
ghex-org:masterfrom
msimberg:nccl-2
Jul 1, 2026
Merged

msimberg merged 158 commits into
ghex-org:masterfrom
msimberg:nccl-2

Conversation

@msimberg

@msimberg msimberg commented Dec 22, 2025 •

Copy link
Copy Markdown
Collaborator

This requires ghex-org/oomph#55.

Updates communication_object{,_ipr} to use the start_group/end_group functionality from oomph/NCCL, as well as taking is_stream_aware into account.

Also does a minor refactoring of packer and communication object helper functions so that the different stages are a bit easier to follow:

  • optional: sync before packing
  • pack
  • send
  • recv
  • unpack
  • optional: sync after unpacking

Comment thread cmake/ghex_external_dependencies.cmake Outdated
Comment thread include/ghex/packer.hpp Outdated
Comment thread include/ghex/packer.hpp Outdated
Comment thread include/ghex/packer.hpp Outdated
Comment thread include/ghex/packer.hpp Outdated
Comment thread test/unstructured/test_user_concepts.cpp Outdated
Comment thread include/ghex/communication_object.hpp Outdated
Comment thread .gitignore Outdated
Comment thread shell.nix Outdated
msimberg added 9 commits June 29, 2026 12:44
…cture

- Split pack() into pack() + post_sends() for communication_object_ipr;
  exchange() now does pack; start_group; post_recvs; post_sends; end_group
  (single path, no backend dispatch, no unpack since ipr receives in-place)
- communication_object: remove debugging-leftover dual-path dispatch;
  all exchange methods use the single pack/group/post/unpack path;
  delete pack_and_send() methods
- Re-enable the in_place_receive test (pre-existing segfault fixed by
  corrected pack/send ordering relative to the group)
Wrap the in_place_receive test in a try/catch block matching the pattern
used by other tests (data_descriptor, etc.) to handle the expected
'NCCL not supported with thread_safe = true' exception on the NCCL
backend. Without this, test_parallel_2_nccl fails because
test_in_place_receive_threads runs with thread_safe=true on NCCL.
Pre-existing UCX failure on CSCS CI GPU nodes: UCX CUDA IPC triggers
cuDeviceGet failure on no-GPU builds, causing 'recv message truncated'.
Passes locally with MPI and UCX, and on CSCS with MPI/NCCL. The 2-rank
path (test_in_place_receive_threads) remains enabled to validate the
NCCL thread_safe exception handling.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

include/ghex/device/cuda/event.hpp:35

  • m_recorded is read by is_ready() but never initialized in any constructor, which is undefined behavior (it can randomly appear "recorded"). Initialize it to false when creating the event so is_ready() is reliable before the first record() call.
    cuda_event()
    : cuda_event(cudaEventDisableTiming)
    {
    }
    explicit cuda_event(unsigned int flags) {

Comment thread test/util/nccl_test_helpers.hpp
Comment thread test/structured/regular/test_local_rma.cpp Outdated
Comment thread README.md Outdated
@msimberg msimberg changed the title Add support for NCCL in communication_object Add support for NCCL Jun 30, 2026
@msimberg
msimberg marked this pull request as ready for review July 1, 2026 13:32
@msimberg

msimberg commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

This caveat applies here as well: ghex-org/oomph#55 (comment). I will nevertheless merge this as "experimental support".

@msimberg
msimberg merged commit 543cf50 into ghex-org:master Jul 1, 2026
13 checks passed
@msimberg
msimberg deleted the nccl-2 branch July 1, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants