openshmem-org / specification

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

Add support for multiple quiet operations #453

Open naveen-rn opened 3 years ago

naveen-rn commented 3 years ago

Based on a RMA WG discussion, it looks like there is an interest in adding support for an operation like shmem_quiet_all, where users could pass a list of contexts on which the quiet can be performed. Also, it can be extended to support shmem_team_barrier where we could pass the list of contexts similar to shmem_quiet_all as input and perform a collective sync followed by multiple context flushes.

naveen-rn commented 3 years ago

As a proposal to start discussion, let us consider the following API changes to support this new feature:

// Option:1 - Pass the list of contexts as inputs to both quiet and barrier operation
shmem_quiet_all(shmem_ctx_t *ctx, int num_ctx);
shmem_team_barrier(shmem_team_t team, shmem_ctx_t *ctx, int num_ctx);
// Option:2 - Create an object for a group of contexts and pass it quiet and barrier operation
typedef shmem_gctx_t void*;
shmem_gctx_attach(shmem_gctx_t *gctx, shmem_ctx_t ctx);
shmem_gctx_remove(shmem_gctx_t *gctx, shmem_ctx_t ctx);
shmem_gctx_quiet(shmem_gctx_t gctx);
shmem_team_barrier(shmem_team_t team, shmem_gctx_t gctx);
// I called this group of context object as gctx - just to start the discussion. 
// We could extend this to something concrete like domains(!) or something 
// else based on the interest in adding a new object.
manjugv commented 3 years ago

@naveen-rn Are you still pursuing this ticket?