openshmem-org / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
50 stars 38 forks source link

Zero sized teams #320

Closed jdinan closed 4 years ago

jdinan commented 4 years ago

Clarify size == 0 behavior in shmem_team_split_strided. Should this return SHMEM_TEAM_INVALID or be undefined?

nspark commented 4 years ago

I think this case is covered by the following from shmem_team_split_strided:

If the new team cannot be created, then new_team will be assigned the value SHMEM_TEAM_INVALID and shmem_team_split_strided will return a nonzero value on all PEs in the parent team.

and from the Teams introduction:

All valid teams have at least one member.

Since the new team would, by construction, not be a valid team, creation of this team is not possible and the return behavior would be as in the first quoted section.

That said, if clarifying this specific case is important, we can do that too.

jdinan commented 4 years ago

One could also interpret this to be a case where the local PE is not a member of the team, which also outputs SHMEM_TEAM_INVALID but returns success. I think it would be helpful to clarify, so that there is consistent behavior across implementations. Do you think users would prefer the (1) invalid team or (2) not a member behavior?

agrippa commented 4 years ago

Opened PR https://github.com/jdinan/specification/pull/6