Skip to content

Conversation

fknorr
Copy link
Contributor

@fknorr fknorr commented Nov 7, 2022

Current Celerity has a race condition on worker nodes between submission of collective host tasks and the submission of their kernels to the host queue. Choosing a non-default collective group creates an additional worker thread from the main thread, and kernel submission requires that thread to be up and running.

  • The executor busy-waits for the task definition to be available, but the collective group thread was created after task insertion into the ringbuffer. This has been reversed to ensure the worker thread is ready when the task becomes available to the executor.
  • Even though the set of worker threads in host_queue was accessed by both main and executor thread, it was left unsynchronized. The class member is now protected by a mutex.

@fknorr fknorr requested review from psalz and BlackMark29A November 7, 2022 17:51
@fknorr fknorr self-assigned this Nov 7, 2022
Copy link
Member

@psalz psalz left a comment

Choose a reason for hiding this comment

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

LGTM!

@fknorr fknorr force-pushed the fix-collective-submit-race branch from 09a62e2 to ecc4344 Compare November 8, 2022 15:12
@fknorr fknorr merged commit 0a4fca5 into master Nov 8, 2022
@fknorr fknorr deleted the fix-collective-submit-race branch November 10, 2022 13:51
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