File collectives.h¶
Functions
-
int GpuArray_reduce_from(const GpuArray *src, int opcode, int root, gpucomm *comm)¶
Reduce collective operation for non root participant ranks in a communicator world.
Note
Root rank of reduce operation must call GpuArray_reduce().
Note
Must be called separately for each rank in
comm, except root rank.- Parameters
src – array to be reduced
opcode – reduce operation code, see gpucomm_reduce_ops
root – rank in
commwhich will collect resultcomm – gpu communicator
- Returns
error code or GA_NO_ERROR if success
-
int GpuArray_reduce(const GpuArray *src, GpuArray *dest, int opcode, int root, gpucomm *comm)¶
Reduce collective operation for ranks in a communicator world.
Note
Can be used by root and non root ranks alike.
Note
Non root ranks can call this, using a NULL
dest.Note
Must be called separately for each rank in
comm(non root can call GpuArray_reduce_from() instead).- Parameters
src – array to be reduced
dest – array to collect reduce operation result
opcode – reduce operation code, see gpucomm_reduce_ops
root – rank in
commwhich will collect resultcomm – gpu communicator
- Returns
error code or GA_NO_ERROR if success
-
int GpuArray_all_reduce(const GpuArray *src, GpuArray *dest, int opcode, gpucomm *comm)¶
AllReduce collective operation for ranks in a communicator world.
Reduces
srcusing op operation and leaves identical copies of result indeston each rank ofcomm.Note
Must be called separately for each rank in
comm.- Parameters
src – array to be reduced
dest – array to collect reduce operation result
opcode – reduce operation code, see gpucomm_reduce_ops
comm – gpu communicator
- Returns
error code or GA_NO_ERROR if success
-
int GpuArray_reduce_scatter(const GpuArray *src, GpuArray *dest, int opcode, gpucomm *comm)¶
ReduceScatter collective operation for ranks in a communicator world.
Reduces data in
srcusingopcodeoperation and leaves reduced result scattered overdestin the user-defined rank order incomm.Note
Must be called separately for each rank in
comm.- Parameters
src – array to be reduced
dest – array to collect reduce operation scattered result
opcode – reduce operation code, see gpucomm_reduce_ops
comm – gpu communicator
- Returns
error code or GA_NO_ERROR if success
-
int GpuArray_broadcast(GpuArray *array, int root, gpucomm *comm)¶
Broadcast collective operation for ranks in a communicator world.
Copies
arrayto all ranks incomm.Note
Must be called separately for each rank in
comm.- Parameters
array – array to be broadcasted, if root rank, else to receive
root – rank in
commwhich broadcasts its arraycomm – gpu communicator
- Returns
error code or GA_NO_ERROR if success
-
int GpuArray_all_gather(const GpuArray *src, GpuArray *dest, gpucomm *comm)¶
AllGather collective operation for ranks in a communicator world.
Each rank receives all
srcarrays from every rank in the user-defined rank order incomm.Note
Must be called separately for each rank in
comm.- Parameters
src – array to be gathered
dest – array to receive all gathered arrays from ranks in
commcomm – gpu communicator
- Returns
error code or GA_NO_ERROR if success