openshmem-org / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
49 stars 32 forks source link

Missing note for shmem_team_ptr #478

Open kholland-intel opened 2 years ago

kholland-intel commented 2 years ago

It came up during the special ballot reading for #475 that teams with overlapping PE's should not expect the same pointer return value when calling shmem_team_ptr.

We decided that we can merge #475 as-is and open a new PR for this issue.

jdinan commented 2 years ago

Does this mean that querying symmetric address X for PE Y in SHMEM_TEAM_WORLD can return a different result than the same query performed on a duplicate of SHMEM_TEAM_WORLD?

kholland-intel commented 2 years ago

Yes, we tentatively decided that we would allow different results on two different teams even when the PEs overlap. The idea was that this is less restrictive on implementations that, for example, don't exactly duplicate a team. Also, OpenSHMEM currently only has a split API, not a duplicate API.

jdinan commented 2 years ago

Sorry, I'm not sure my question came across clearly -- If you query the address of same symmetric object on the same OpenSHMEM process (i.e. has exactly the same PE ID in the world team) should you get the same address back? I would think the answer must be yes, since today allocation is done at the world scope.

davidozog commented 2 years ago

@jdinan - I think it's reasonable to expect that we'd get the same address back for OpenSHMEM v1.5, but with the introduction of spaces we might want to be careful with that requirement. With spaces, every team will have a local space and our hope is that this API is still useful / backwards-compatible in that context (but maybe that's not possible?). So if the 2 teams have different local spaces, then we may not want to require the same result from shmem_team_ptr. This example may be a question of getting back a null versus a non-null pointer, but it's similar to the question about the same address.

At least that's my understanding of the concern - @naveen-rn should correct me if I'm wrong.

jdinan commented 2 years ago

Doesn't "same symmetric object" already address this concern?

davidozog commented 2 years ago

@jdinan - Yeah probably. Even if teams inherent spaces from their parent team, it makes sense to me that the inherited symmetric objects have the same address when loads/stores are possible, regardless of the PE ID w.r.t teams.

I might be off with the spaces arguments above - I seem to recall @naveen-rn and/or @manjugv raised the original concern.