gmegan / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
1 stars 0 forks source link

Two concurrent broadcasts from different teams on same buffers #128

Open naveen-rn opened 5 years ago

naveen-rn commented 5 years ago

Can we have two concurrent broadcasts performed through different teams and different roots on each teams but sharing the same source and dest buffer?

I vaguely remember a similar discussion a long time back for OpenSHMEM-1.3 discussions - not sure what the conclusion was. We should have a strong statement saying that both the source and dest buffers are expected to be usable only on on bcast at a time and otherwise the operation is undefined.

naveen-rn commented 5 years ago

ADD THIS ISSUE IN THE MAIN SPEC

jdinan commented 5 years ago

I think you also mentioned the teams don't overlap apart from at the root PE? This seems fine since bcast doesn't update the dest buffer at the root.

naveen-rn commented 4 years ago

I would prefer to change the semantics for broadcast to include the root PE in the update. If we are planning to break compatibility in the teams proposal, then we should prefer to the new semantics.

nspark commented 4 years ago

@naveen-rn I think it would help to give an example scenario or be more precise in what you mean by "different teams and different roots on each team". @jdinan's response makes it seem like the teams are not disjoint subsets of SHMEM_TEAM_WORLD and actually share the same root PE (w.r.t. SHMEM_TEAM_WORLD).

I think users generally favor revising the semantics so that dest on the root PE is updated at completion of the broadcast.

naveen-rn commented 4 years ago

I think users generally favor revising the semantics so that dest on the root PE is updated at completion of the broadcast.

+1

naveen-rn commented 4 years ago

@naveen-rn I think it would help to give an example scenario or be more precise in what you mean by "different teams and different roots on each team"

Consider the following two teams: TEAM:1 = {PE:0, PE:1, PE:2, PE:3} TEAM:2 = {PE:0, PE:4, PE:5, PE:6} Inside the OpenSHMEM implementation, it would be bit tricky to handle concurrent bcasts on the above two teams with dest buffer common on both the bcasts, while the root differs in the bcasts.

jdinan commented 4 years ago

I think this is resolved for OpenSHMEM 1.5 via:

  1. Broadcast updates the dest buffer at the root PE and
  2. Clarification of in-use semantic for buffers in OpenSHMEM operations