ucc: Wrong data received when sharing a team with multiple threads

Hi, I have the following setup.

  • UCC lib initialized with UCC_THREAD_MULTIPLE
  • UCC ctx created with UCC_CONTEXT_SHARED
  • 1 team created with UCC_COLLECTIVE_INIT_AND_POST_UNORDERED and UCC_NO_SYNC_COLLECTIVES (IINM these configs are not used underneath)
  • Separate thread for ucc ctx progress

I have multiple threads issuing a set of tagged allgather operations (with callbacks) to the team. I am keeping the send and receive buffers alive in the data object of the callback. It seems the receive buffers are receiving wrong data from the parallel allgather operations. It’s working fine for a single thread.

Can someone please help me out here?

Is sharing a team with multiple threads, an anti-pattern? I checked the allgather test code, and it seemed to me that there was a separate team for every test proc.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 22 (3 by maintainers)

Most upvoted comments

@janjust I think the tags have not been propagated properly until this PR. 🙂

@Sergei-Lebedev it turned out it was the latest PR that fixed the problem. #926

I think this change might be the fix. https://github.com/openucx/ucc/pull/926/files#diff-cd0947a917169a44f349c3331aace588a31757bdcc4d555f717048318719a09aR376

@janjust yes it does