行列 A[10][10] があります。この行列の最初の行を別のプロセスに送りたいです。どうすればいいですか?
前もって感謝します..
Look at these pages:
http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Recv.html http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Send.html
....サンプルコード:
if(rank==0){
MPI_Send(&A[0][0],10,MPI_DOIBLE,rank+1,tag,MPI_COMM_WORLD);
}
if(rank==1){
MPI_Recv(&A[0][0],10,MPI_DOIBLE,rank-1,tag,MPI_COMM_WORLD,*status);
}