openshmem-org / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
51 stars 40 forks source link

Add shmem_signal_{add,set} #489

Closed nspark closed 12 months ago

nspark commented 2 years ago

Closes #382

manjugv commented 2 years ago

The difference between atomic operations and these {add, set} operations is their atomicity guarantees, correct?

nspark commented 2 years ago

Yes. AMOs are only guaranteed atomicity of updates w.r.t. other AMOs of the same data type (but for all operation types; e.g., set, add, xor). Signal operations are only guaranteed atomicity of updates w.r.t. other signal operations of the same operation type (i.e., add or set).

I think the intent was that, for performance reasons, shmem_signal_set and shmem_put_signal(SET) can provide (for example) single-copy atomic writes without needing the full strength of atomicity required by AMOs.

shamisp commented 2 years ago

I think this adds quite a bit API bloat, while the semantical difference is very nuanced. I would suggest to add a parameter to shmalloc that lets you define desired AMO semantics, so you can reuse all existing AMO operations.

manjugv commented 1 year ago

May spec meeting: Please add change log entry

jdinan commented 1 year ago

Special ballot: 1c254ce