主题:奇怪的问题,困扰多日
所作的问题是三维问题,沿着一个方向分区程序能运行,多个方向分区通信时有问题:程序部分代码如下:
call MPI_Type_vector(mysizey,mysizex,asizex,MPI_Integer1,TT,ierr)
call MPI_Type_Hvector(mysizez,1,asizex*asizey*1,TT,TTT,ierr)
call MPI_Type_Commit(TTT,ierr)
call MPI_Type_free(TT,ierr)
call MPI_Barrier(MPI_Comm_world,ierr)
do i=0, npx-1
do j=0,npy-1
do k=0,npz-1
n=k*npx*npy+j*npx+i
if(n>0)then
if(myid==n)then
call MPI_send(c(1,1,1),mysizex*mysizey*mysizez &
& ,MPI_Integer1,0,11,MPI_Comm_world,ierr)
endif
if(myid==0)then
Irow=locatex(i)
Jrow=locatey(j)
Krow=locatez(k)
call MPI_Recv(b(irow,jrow,Krow),1,TTT,n,11,MPI_Comm_world,status,ierr)
endif
call MPI_Barrier(MPI_Comm_world,ierr)
endif
enddo
enddo
enddo
call MPI_Type_free(TTT,ierr)
程序中断,问题如下:
job aborted:
rank: node: exit code[: error message]
0: 20081016-0757: 1: Fatal error in MPI_Recv: Message truncated, error stack:
MPI_Recv(186).......................: MPI_Recv(buf=00F301BD, count=1, dtype=USER<hvector>, src=5, tag=11, MPI_COMM_WORLD, status=007B0C30) failed
MPIDI_CH3U_Request_unpack_uebuf(590): Message truncated; 320 bytes received but buffer size is 200
1: 20081016-0757: 1
2: 20081016-0757: 1
3: 20081016-0757: 1
4: 20081016-0757: 1
5: 20081016-0757: 1
可是我的 mysizex*mysizey*mysizez 就是200了,怎么会报这样的问题呢?
call MPI_Type_vector(mysizey,mysizex,asizex,MPI_Integer1,TT,ierr)
call MPI_Type_Hvector(mysizez,1,asizex*asizey*1,TT,TTT,ierr)
call MPI_Type_Commit(TTT,ierr)
call MPI_Type_free(TT,ierr)
call MPI_Barrier(MPI_Comm_world,ierr)
do i=0, npx-1
do j=0,npy-1
do k=0,npz-1
n=k*npx*npy+j*npx+i
if(n>0)then
if(myid==n)then
call MPI_send(c(1,1,1),mysizex*mysizey*mysizez &
& ,MPI_Integer1,0,11,MPI_Comm_world,ierr)
endif
if(myid==0)then
Irow=locatex(i)
Jrow=locatey(j)
Krow=locatez(k)
call MPI_Recv(b(irow,jrow,Krow),1,TTT,n,11,MPI_Comm_world,status,ierr)
endif
call MPI_Barrier(MPI_Comm_world,ierr)
endif
enddo
enddo
enddo
call MPI_Type_free(TTT,ierr)
程序中断,问题如下:
job aborted:
rank: node: exit code[: error message]
0: 20081016-0757: 1: Fatal error in MPI_Recv: Message truncated, error stack:
MPI_Recv(186).......................: MPI_Recv(buf=00F301BD, count=1, dtype=USER<hvector>, src=5, tag=11, MPI_COMM_WORLD, status=007B0C30) failed
MPIDI_CH3U_Request_unpack_uebuf(590): Message truncated; 320 bytes received but buffer size is 200
1: 20081016-0757: 1
2: 20081016-0757: 1
3: 20081016-0757: 1
4: 20081016-0757: 1
5: 20081016-0757: 1
可是我的 mysizex*mysizey*mysizez 就是200了,怎么会报这样的问题呢?