gmegan / specification

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

Relax error checking requirement on team handles #25

Closed gmegan closed 6 years ago

gmegan commented 6 years ago

As per the WG call today, it is high implementation overhead to require that team handles be checked for validity in the various teams calls. If handles are pointers, and the team has been destroyed, the implementation would generally just dereference the invalid pointer. There would be no way to check for valid pointers except to keep some structure of valid team handles and lookup each handle.

One way to deal with this would be to change team_destroy to take a pointer to team handle and set the handle to SHMEM_TEAM_NULL on successful destroy. Then have the various team functions which take a handle parameter to define behavior when SHMEM_TEAM_NULL is passed as argument, i.e. shmem_team_my_pe returns -1 when passed SHMEM_TEAM_NULL. Behavior for invalid team handles would be undefined.

gmegan commented 6 years ago

Merged PR for this issue.