0
我希望使用MPI在兩個節點之間發送連續內存陣列。爲此,我使用以下非阻塞發送/接收命令(MPI_Isend,MPI_Irecv)。當執行run命令,我看到兩個警告聲明如下:MPI警告:程序以未完成的接收請求退出
Warning: Program exiting with outstanding receive requests
基本上,我希望看到,從「NorthEdge1」數組數據傳遞到「NorthofNorthEdge3」。我怎麼能解決這個問題?我還可以嘗試檢查此通信嗎?
這是從源代碼的摘錄:
#define Rows 48
...
double *northedge1 = new double[Rows];
double *northofnorthedge3 = new double[Rows];
...
...
int main (int argc, char *argv[])
{
....
....
MPI_Request send_request, recv_request;
...
...
{
MPI_Isend(northedge1, Rows, MPI_DOUBLE, my_rank+1, 0, MPI_COMM_WORLD, &send_request);
MPI_Irecv(northofnorthedge3, Rows, MPI_DOUBLE, my_rank+1, MPI_ANY_TAG, MPI_COMM_WORLD,
&recv_request);
}