主题:MPI并行,从输入文件读取数组的问题,请高手指导,谢谢
读取文件部分代码如下:
读取数组最终赋值给CBC数组,编译没有任何问题,但是计算时自动停止了
***********************************************************************************
ALLOCATE(TEMP(N))
MMM = 1234
DIR = "./"//TRIM(INPDIR)//"/"//trim(casename)//"_cbc.dat"
OPEN(unit=MMM,FILE=DIR,form='formatted')
REWIND(MMM)
IF(MSR) THEN
DO I=1,N
READ(MMM,*) XX,TEMP(I)
ENDDO
ENDIF
# if defined (MULTIPROCESSOR)
IF(PAR) CALL MPI_BCAST(TEMP,N,MPI_F,0,MPI_COMM_WORLD,IERR)
# endif
if(serial) CBC(1:N) = TEMP(1:N)
# if defined (MULTIPROCESSOR)
if(par)then
do i=1,N
CBC(I)=TEMP(I)
enddo
endif
# endif
! IF(MSR) WRITE(IPT,*) '!CBC READING :: FINISHED'
if(msr) then
write(IPT,"(1X,i8)") N
write(IPT,"(1x,a20,f15.7)") 'CBC(130518)=',CBC(130518)
write(IPT,"(1x,a20,f15.7)") 'TEMP(130518)=',TEMP(130518)
endif
DEALLOCATE(TEMP)
CLOSE(MMM)
*******************************************************************************
报错文件报错信息::
1 - MPI_BCAST : Message truncated
5 - MPI_BCAST : Message truncated
2 - MPI_BCAST : Message truncated
16 - MPI_BCAST : Message truncated
9 - MPI_BCAST : Message truncated
7 - MPI_BCAST : Message truncated
10 - MPI_BCAST : Message truncated
15 - MPI_BCAST : Message truncated
14 - MPI_BCAST : Message truncated
Abort on node c0109 due to MPI_Abort (type 2)
this script pid is 27670
Working directory is /export/home/xw0210/XW_FVCOM27
= /export/home/xw0210/XW_FVCOM27
Runing on host c0109
Time is Wed Feb 23 19:49:24 CST 2011
Directory is /export/home/xw0210/XW_FVCOM27
This jobs runs on the following processors:
$LJRS_NODEFILE=/usr/local/spool/ljrs/aux//5918.console
c0109 c0109 c0109 c0109 c0109 c0109 c0108 c0108 c0108 c0108 c0108 c0108 c0107 c0107 c0107 c0107 c0107 c0107 c0106 c0106 c0106 c0106 c0106 c0106
c0109:1.MPID_Abort: c0109:1. Aborting program !
c0109:5.MPID_Abort: c0109:5. Aborting program !
c0109:2.MPID_Abort: c0109:2. Aborting program !
c0107:16.MPID_Abort: c0107:16. Aborting program !
c0108:9.MPID_Abort: c0108:9. Aborting program !
c0109:1.MPID_CH_Abort: c0109:1.Aborting program!
c0109:5.MPID_CH_Abort: c0109:5.Aborting program!
c0109:2.MPID_CH_Abort: c0109:2.Aborting program!
c0108:10.MPID_Abort: c0108:10. Aborting program !
c0108:7.MPID_Abort: c0108:7. Aborting program !
c0108:7.MPID_CH_Abort: c0108:7.Aborting program!
c0108:9.MPID_CH_Abort: c0108:9.Aborting program!
c0108:10.MPID_CH_Abort: c0108:10.Aborting program!
c0107:15.MPID_Abort: c0107:15. Aborting program !
c0107:14.MPID_Abort: c0107:14. Aborting program !
c0107:16.MPID_CH_Abort: c0107:16.Aborting program!
c0107:14.MPID_CH_Abort: c0107:14.Aborting program!
c0107:15.MPID_CH_Abort: c0107:15.Aborting program!
Wed Feb 23 19:49:38 CST 2011
读取数组最终赋值给CBC数组,编译没有任何问题,但是计算时自动停止了
***********************************************************************************
ALLOCATE(TEMP(N))
MMM = 1234
DIR = "./"//TRIM(INPDIR)//"/"//trim(casename)//"_cbc.dat"
OPEN(unit=MMM,FILE=DIR,form='formatted')
REWIND(MMM)
IF(MSR) THEN
DO I=1,N
READ(MMM,*) XX,TEMP(I)
ENDDO
ENDIF
# if defined (MULTIPROCESSOR)
IF(PAR) CALL MPI_BCAST(TEMP,N,MPI_F,0,MPI_COMM_WORLD,IERR)
# endif
if(serial) CBC(1:N) = TEMP(1:N)
# if defined (MULTIPROCESSOR)
if(par)then
do i=1,N
CBC(I)=TEMP(I)
enddo
endif
# endif
! IF(MSR) WRITE(IPT,*) '!CBC READING :: FINISHED'
if(msr) then
write(IPT,"(1X,i8)") N
write(IPT,"(1x,a20,f15.7)") 'CBC(130518)=',CBC(130518)
write(IPT,"(1x,a20,f15.7)") 'TEMP(130518)=',TEMP(130518)
endif
DEALLOCATE(TEMP)
CLOSE(MMM)
*******************************************************************************
报错文件报错信息::
1 - MPI_BCAST : Message truncated
5 - MPI_BCAST : Message truncated
2 - MPI_BCAST : Message truncated
16 - MPI_BCAST : Message truncated
9 - MPI_BCAST : Message truncated
7 - MPI_BCAST : Message truncated
10 - MPI_BCAST : Message truncated
15 - MPI_BCAST : Message truncated
14 - MPI_BCAST : Message truncated
Abort on node c0109 due to MPI_Abort (type 2)
this script pid is 27670
Working directory is /export/home/xw0210/XW_FVCOM27
= /export/home/xw0210/XW_FVCOM27
Runing on host c0109
Time is Wed Feb 23 19:49:24 CST 2011
Directory is /export/home/xw0210/XW_FVCOM27
This jobs runs on the following processors:
$LJRS_NODEFILE=/usr/local/spool/ljrs/aux//5918.console
c0109 c0109 c0109 c0109 c0109 c0109 c0108 c0108 c0108 c0108 c0108 c0108 c0107 c0107 c0107 c0107 c0107 c0107 c0106 c0106 c0106 c0106 c0106 c0106
c0109:1.MPID_Abort: c0109:1. Aborting program !
c0109:5.MPID_Abort: c0109:5. Aborting program !
c0109:2.MPID_Abort: c0109:2. Aborting program !
c0107:16.MPID_Abort: c0107:16. Aborting program !
c0108:9.MPID_Abort: c0108:9. Aborting program !
c0109:1.MPID_CH_Abort: c0109:1.Aborting program!
c0109:5.MPID_CH_Abort: c0109:5.Aborting program!
c0109:2.MPID_CH_Abort: c0109:2.Aborting program!
c0108:10.MPID_Abort: c0108:10. Aborting program !
c0108:7.MPID_Abort: c0108:7. Aborting program !
c0108:7.MPID_CH_Abort: c0108:7.Aborting program!
c0108:9.MPID_CH_Abort: c0108:9.Aborting program!
c0108:10.MPID_CH_Abort: c0108:10.Aborting program!
c0107:15.MPID_Abort: c0107:15. Aborting program !
c0107:14.MPID_Abort: c0107:14. Aborting program !
c0107:16.MPID_CH_Abort: c0107:16.Aborting program!
c0107:14.MPID_CH_Abort: c0107:14.Aborting program!
c0107:15.MPID_CH_Abort: c0107:15.Aborting program!
Wed Feb 23 19:49:38 CST 2011