IBM Books

Hitchhiker's Guide


Collective communications

BROADCAST


MPI/MPL Description
MPL mpc_bcast(&buf,msglen,root,gid)
MPI MPI_Bcast(&buf,count,datatype,root,comm)

COMBINE


MPI/MPL Description
MPL mpc_combine(&sendbuf,&recvbuf,msglen,func,gid)
MPI MPI_Allreduce(&sendbuf,&recvbuf,count,datatype,op,comm)

See Reduction functions.

CONCAT


MPI/MPL Description
MPL mpc_concat(&sendbuf,&recvbuf,blklen,gid)
MPI MPI_Allgather(&sendbuf,sendcount,sendtype,&recvbuf,recvcount,recvtype,comm)

GATHER


MPI/MPL Description
MPL mpc_gather(&sendbuf,&recvbuf,blklen,root,gid)
MPI MPI_Gather(&sendbuf,count,datatype,&recvbuf,count,datatype,root,comm)

INDEX


MPI/MPL Description
MPL mpc_index(&sendbuf,&recvbuf,blklen,gid)
MPI MPI_Alltoall(&sendbuf,count,datatype,&recvbuf,count,datatype,comm)

PREFIX


MPI/MPL Description
MPL mpc_prefix(&sendbuf,&recvbuf,msglen,func,gid)
MPI MPI_Scan(&sendbuf,&recvbuf,count,datatype,op,comm)

Note: See Reduction functions.

REDUCE


MPI/MPL Description
MPL mpc_reduce(&sendbuf,&recvbuf,msglen,root,func,gid)
MPI MPI_Reduce(&sendbuf,&recvbuf,count,datatype,op,root,comm)

Note: See Reduction functions.

SCATTER


MPI/MPL Description
MPL mpc_scatter(&sendbuf,&recvbuf,blklen,root,gid)
MPI MPI_Scatter(&sendbuf,count,datatype,&recvbuf,count,datatype,root,comm)

SHIFT


MPI/MPL Description
MPL mpc_shift(&sendbuf,&recvbuf,msglen,step,flag,gid)
MPI MPI_Cart_shift(comm,direction,step,&source,&dest)
MPI_Sendrecv(&sendbuf,count,datatype,dest,tag,&recvbuf,count,datatype,
source,tag,comm,&status);

Note: comm must be a communicator with a cartesian topology. See MPI_CART_CREATE in IBM Parallel Environment for AIX: MPI Subroutine Reference

SYNC


MPI/MPL Description
MPL mpc_sync(gid)
MPI MPI_Barrier(comm)

GETLABEL


MPI/MPL Description
MPL mpc_getlabel(&label,gid)
MPI No MPI equivalent. Can be simulated by creating a label attribute key with MPI_Keyval_create, attaching a label attribute to a communicator with MPI_Attr_put, and retrieving it with MPI_Attr_get.

GETMEMBERS


MPI/MPL Description
MPL mpc_getmembers(&glist,gid)
MPI MPI_Comm_group(MPI_COMM_WORLD,&group_world)
MPI_Group_size(group_world,&gsize)
for(i=0;i<gsize;i++) ranks ]i[ = i;
MPI_Group_translate_ranks(group,gsize,&ranks,group_world,&glist)

GETRANK


MPI/MPL Description
MPL mpc_getrank(&rank,taskid,gid)
MPI MPI_Comm_group(MPI_COMM_WORLD,&group_world)
MPI_Group_translate_ranks(group_world,1,&taskid,group2,&rank)

GETSIZE


MPI/MPL Description
MPL mpc_getsize(&gsize,gid)
MPI MPI_Group_size(group,&gsize)

GETTASKID


MPI/MPL Description
MPL mpc_gettaskid(rank,&taskid,gid)
MPI MPI_Comm_group(MPI_COMM_WORLD,&group_world)
MPI_Group_translate_ranks(group1,1,&rank,group_world,&taskid)

GROUP


MPI/MPL Description
MPL mpc_group(gsize,&glist,label,&gid)
MPI MPI_Comm_group(MPI_COMM_WORLD,&group_world)
MPI_Group_incl(group_world,gsize,&glist,&gid)

PARTITION


MPI/MPL Description
MPL mpc_partition(parent_gid,key,label,&gid)
MPI MPI_Comm_split(comm,label,key,&newcomm)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]