Open naveen-rn opened 5 years ago
I thought the Teams API was going to provide something like shmem_team_translate_pe
. Since it's the team that is the object that encapsulates the PE reindexing scheme, I think that should be the "object" for such a "method". I wouldn't add an equivalent method on a context just because the context is mapped to a team.
We have the routine: shmem_team_translate_pe(src_team, src_pe, dest_team)
So, I would think that a shmem_ctx_translate_pe would look like this:
int shmem_ctx_translate_pe(shmem_ctx_t src_ctx, int src_pe, shmem_ctx_t dest_ctx)
{
shmem_team_t src_team, dest_team;
shmem_ctx_get_team(src_ctx, &src_team);
shmem_ctx_get_team(dest_ctx, &dest_team)
return shmem_team_translate(src_team, src_pe, dest_pe);
}
Does it seem worth it to add this to the specification? I advocate not adding to spec and just letting the programmer add this to their library of functions since it is pretty straightforward to implement.
If we add it to the spec we have to decide if there is supposed to be some error checking, like do we return -1 if shmem_ctx_get_team
fails for some reason? Maybe better to just let the user decide on what error check they want. Also, the semantics of combining team and context still seem like they need to be field tested more before adding more routines to re-enforce the current solution.
Cray SHMEM had
shmem_team_translate_pe
because we considered that teams would be used for all RMA/AMO operations. With the change in the proposal and adding context - we are performing all comms on a context. A context is internally mapped to a team. So, do we need a context-based translate operation.EDIT: changed
shmemx_pe_team_translate
toshmem_team_translate_pe