Skip to content

Conversation

@lterrac
Copy link
Collaborator

@lterrac lterrac commented Oct 8, 2025

Description

Variable size SPSC channel:

  • the payload is not split into chunks. We require the user to provide a bigger buffer (ideally double the capacity of the channel), and we use part of it to store entire tokens. The channel logic remains unchanged and it allows you to push only MAX_TOKENS * TOKEN_SIZE
  • channels take into account both how many tokens are in the channel and the available space
  • extended the isFull function to take a size_t and compute whether a push with such size can be made.
  • add MPI tests for channel testing the following:
    - a single push that fills the payload buffer
    - a series of push that fills the payload buffer
    - a series of push that fills the coordination buffer
    - push-pop-push with a buffer big enough to force the second push to use the excess buffer

Type of change

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

Added mpi test for variable size spsc channel

- the payload is not split into chunks. We require the user to provide a bigger buffer and we use part of it as excess to store entire tokens. The channel logic remains unchanged and it allows you to push only MAX_TOKENS * TOKEN_SIZE
- channels take into account both how many tokens are in the channel and the available space
- extended the isFull function to take a size_t and compute whether the channel is full
- add extensive testing
@lterrac lterrac force-pushed the feat/channelExcessBuffer branch from 25df1a7 to 7c09f5a Compare October 8, 2025 13:20
@lterrac lterrac force-pushed the feat/channelExcessBuffer branch from 51bd5d5 to 50a4d4e Compare October 8, 2025 13:41
@lterrac lterrac merged commit acb3fac into master Oct 8, 2025
13 checks passed
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Coverage arm64

Code Coverage

Package Line Rate Branch Rate Health
include.hicr.backends.boost 75% 43%
include.hicr.backends.hwloc 77% 37%
include.hicr.backends.mpi 92% 52%
include.hicr.backends.nosv 71% 45%
include.hicr.backends.pthreads 89% 49%
include.hicr.core 73% 45%
include.hicr.frontends.RPCEngine 100% 48%
include.hicr.frontends.channel 95% 62%
include.hicr.frontends.channel.fixedSize 100% 50%
include.hicr.frontends.channel.fixedSize.mpsc.locking 92% 62%
include.hicr.frontends.channel.fixedSize.mpsc.nonlocking 94% 55%
include.hicr.frontends.channel.fixedSize.spsc 95% 68%
include.hicr.frontends.channel.variableSize 95% 50%
include.hicr.frontends.channel.variableSize.mpsc.locking 84% 52%
include.hicr.frontends.channel.variableSize.mpsc.nonlocking 95% 48%
include.hicr.frontends.channel.variableSize.spsc 92% 60%
include.hicr.frontends.objectStore 63% 41%
include.hicr.frontends.tasking 80% 56%
Summary 83% (1952 / 2340) 48% (1133 / 2371)

Minimum allowed line rate is 60%

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Coverage amd64

Code Coverage

Package Line Rate Branch Rate Health
include.hicr.backends.boost 75% 43%
include.hicr.backends.hwloc 77% 37%
include.hicr.backends.mpi 92% 52%
include.hicr.backends.nosv 71% 45%
include.hicr.backends.pthreads 89% 49%
include.hicr.core 73% 45%
include.hicr.frontends.RPCEngine 100% 49%
include.hicr.frontends.channel 95% 62%
include.hicr.frontends.channel.fixedSize 100% 50%
include.hicr.frontends.channel.fixedSize.mpsc.locking 92% 65%
include.hicr.frontends.channel.fixedSize.mpsc.nonlocking 96% 57%
include.hicr.frontends.channel.fixedSize.spsc 95% 68%
include.hicr.frontends.channel.variableSize 95% 50%
include.hicr.frontends.channel.variableSize.mpsc.locking 84% 50%
include.hicr.frontends.channel.variableSize.mpsc.nonlocking 95% 48%
include.hicr.frontends.channel.variableSize.spsc 92% 60%
include.hicr.frontends.objectStore 63% 41%
include.hicr.frontends.tasking 80% 56%
Summary 83% (1952 / 2339) 48% (1133 / 2367)

Minimum allowed line rate is 60%

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