[mpich-discuss] Error in MPI_COMM_WORLD in the second loop
ESMAEILI AMIN
amin at cavelab.cs.tsukuba.ac.jp
Thu Sep 29 23:22:20 CDT 2011
Hi
I have a problem, in the following program, at the first loop there is no
error (and when I run the program with only 1 loop there is no error), but
when I try to run for the second loop there is an error like this:
[hx002:02844] *** An error occurred in MPI_Init
[hx002:02844] *** on communicator MPI_COMM_WORLD
[hx002:02844] *** MPI_ERR_OTHER: known error not in list
[hx002:02844] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02846] *** An error occurred in MPI_Init
[hx002:02846] *** on communicator MPI_COMM_WORLD
[hx002:02846] *** MPI_ERR_OTHER: known error not in list
[hx002:02846] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02847] *** An error occurred in MPI_Init
[hx002:02847] *** on communicator MPI_COMM_WORLD
[hx002:02847] *** MPI_ERR_OTHER: known error not in list
[hx002:02847] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02851] *** An error occurred in MPI_Init
[hx002:02851] *** on communicator MPI_COMM_WORLD
[hx002:02851] *** MPI_ERR_OTHER: known error not in list
[hx002:02851] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02845] *** An error occurred in MPI_Init
[hx002:02845] *** on communicator MPI_COMM_WORLD
[hx002:02845] *** MPI_ERR_OTHER: known error not in list
[hx002:02845] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02848] *** An error occurred in MPI_Init
[hx002:02848] *** on communicator MPI_COMM_WORLD
[hx002:02848] *** MPI_ERR_OTHER: known error not in list
[hx002:02848] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02849] *** An error occurred in MPI_Init
[hx002:02849] *** on communicator MPI_COMM_WORLD
[hx002:02849] *** MPI_ERR_OTHER: known error not in list
[hx002:02849] *** MPI_ERRORS_ARE_FATAL (goodbye)
[hx002:02850] *** An error occurred in MPI_Init
[hx002:02850] *** on communicator MPI_COMM_WORLD
[hx002:02850] *** MPI_ERR_OTHER: known error not in list
[hx002:02850] *** MPI_ERRORS_ARE_FATAL (goodbye)
The program is as follows:
program ringtopo
include 'mpif.h'
integer numtasks, rank, next, prev, buf(2), tag1, tag2, ierr
integer stats(MPI_STATUS_SIZE,2), reqs(2),reqs1(2)
integer,parameter::buf_size=130
real CRXi(10000),CP_sendx(buf_size)
real CP_S6(6,buf_size),CP_R6(6,buf_size),xi(100000)
real yi(100000),zi(100000),ui(100000),vi(100000),wi(100000)
real CP_sendy(buf_size),CP_sendz(buf_size),CP_sendu(buf_size)
real CP_sendv(buf_size),CP_sendw(buf_size)
real CRYi(10000), CRZi(10000), CRUi(10000), CRVi(10000)
real CRwi(10000)
integer CP_send,CP_recv,ionsR,Max_p,n_p,LABEL_p,ions,loop
tag1 = 1
tag2 = 2
do loop=1,2
ions=5000
do i=1,10000
CRxi(i)=i*1.0
CRyi(i)=i*2.0
CRzi(i)=i*3.0
CRui(i)=i*4.0
CRvi(i)=i*5.0
CRwi(i)=i*6.0
end do
call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD, numtasks, ierr)
prev = rank - 1
next = rank + 1
if (rank .eq. 0) then
prev = numtasks - 1
endif
if (rank .eq. numtasks - 1) then
next = 0
endif
ionsR=1120
C do some work
Max_p=ionsR/buf_size+1
LABEL_p=0
CP_recv=20
print*,CP_recv,Max_p,35335
do 200 n_p=1,Max_p
CP_send=0
do i=1,buf_size
n=LABEL_p+i
C CP_S6(1,i)=CRXi(n)
CP_sendx(i)=CRXi(n)
CP_sendy(i)=CRyi(n)
CP_sendz(i)=CRzi(n)
CP_sendu(i)=CRui(n)
CP_sendv(i)=CRvi(n)
CP_sendw(i)=CRwi(n)
end do
CP_send=buf_size
if(n.gt.ionsR)then
CP_send=ionsR - LABEL_p
if (CP_send.lt.0) CP_send=-CP_send
end if
LABEL_p=n
do i=1,buf_size
CP_S6(1,i)=CP_sendx(i)
CP_S6(2,i)=CP_sendy(i)
CP_S6(3,i)=CP_sendz(i)
CP_S6(4,i)=CP_sendu(i)
CP_S6(5,i)=CP_sendv(i)
CP_S6(6,i)=CP_sendw(i)
end do
C print*,mreal,mint,lgrp,CP_send,reqs,1111114
C print*,rank,MPI_INTEGER,CP_recv,CP_send,11111113
C print*,rank,MPI_INTEGER,CP_R6(6,10),CP_s6(6,10),11111113
print*,loop
call MPI_IRECV(CP_recv, 1, MPI_INTEGER, prev, tag1,
& MPI_COMM_WORLD, reqs(1), ierr)
call MPI_ISEND(CP_send, 1, MPI_INTEGER, next, tag1,
& MPI_COMM_WORLD, reqs(2), ierr)
call MPI_WAITALL(2, reqs, stats, ierr);
call MPI_IRECV(CP_R6, 6*CP_recv, MPI_REAL, prev, tag2,
& MPI_COMM_WORLD, reqs1(1), ierr)
call MPI_ISEND(CP_S6, 6*CP_send, MPI_REAL, next, tag2,
& MPI_COMM_WORLD, reqs1(2), ierr)
C call MPI_WAITALL(2, reqs1, stats, ierr);
print*,rank,LABEL_p,CP_R6(6,10),CP_s6(6,10),11111114
if (CP_recv.gt.0) then
do n=1,CP_recv
ions=ions+1
xi(ions)=CP_R6(1,n)
yi(ions)=CP_R6(2,n)
zi(ions)=CP_R6(3,n)
ui(ions)=CP_R6(4,n)
vi(ions)=CP_R6(5,n)
wi(ions)=CP_R6(6,n)
end do
else
print*,n_p,777777771,888888881
End if
C110 continue
C.......................
200 continue
end do
call MPI_FINALIZE(ierr)
end
Kind Regards
Sincerely
Amin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110930/1c4f41c9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passing_ionsR.f
Type: application/octet-stream
Size: 2748 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110930/1c4f41c9/attachment-0001.obj>
More information about the mpich-discuss
mailing list