gmegan / specification

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

Handling invalid team_pe index in all RMA and AMOs #67

Closed naveen-rn closed 5 years ago

naveen-rn commented 5 years ago

I'm not sure where we have captured this condition in the current specification - pe argument in all RMA and AMO operations should be a valid index representing the remote PE. With the introduction of team-based context, we should modify this to specify that it should be a valid index representing a PE which is in the team attached to a context.

If not used correctly and say the PE index is not available in the team PE-subset - should be error out and abort or handle something?

gmegan commented 5 years ago

This would have the same result as passing a pe number to an RMA that is greater than the total number of pe in the program.

In the descriptors for the other team based operations, it is states that any pe number used in a team operation is relative to the team. All teams define a contiguous range of pe numbers from 0 to the size of the team, N. The pe numbering within the team is ordered the same as the pe numbering in SHMEM_TEAM_WORLD.

So, say we have SHMEM_TEAM_WORLD with pes [0-31]. Then we make a strided team, my_team of all even pes. The pe numbers in my_team are [0-15], where translations to SHMEM_TEAM_WORLD are: [0->0], [1->2], [2->4], ... [15->30].

Say I make a context for my_team called my_ctx

So if I make any call like: shmem_put(dest, src, 1, 32) shmem_put(dest, src, 1, -1) shmem_put(dest, src, 1, 1024) This is an error because the only valid pe for SHMEM_TEAM_WORLD are [0-31]

The calls: shmem_put(my_ctx, dest, src, 1, 16) shmem_put(my_ctx, dest, src, 1, -1) Would have exactly the same error behavior under the current description, since the only valid pe numbers here are [0-15].

We can add more specific text to that effect in either the teams intro or RMA/AMO intro if that seems useful.

naveen-rn commented 5 years ago

We can add more specific text to that effect in either the teams intro or RMA/AMO intro if that seems useful.

+1

gmegan commented 5 years ago

Resolve with PR #78