[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

    Search the Q&A Archives

Hi! Iam trying to run a small example program using...

<< Back to: Message Passing Interface (MPI) FAQ

Question by deepu
Submitted on 3/14/2005
Related FAQ: Message Passing Interface (MPI) FAQ
Rating: Not yet rated Rate this question: Vote
Iam trying to run a small example program using scalapack routines. This example is from tutorials on lam site. The program does a matrix vector mulitplication. Iam able to compile the code but not able to run it.

If i run it as
mpirun -v -np 4 mv_acml

iam getting the following error message...
1669 mv_acml running on n0
1413 mv_acml running on n1 (o)
1304 mv_acml running on n2
1288 mv_acml running on n3
One of the processes started by mpirun has exited with a nonzero exit
code. This typically indicates that the process finished in error.
If your process did not finish in error, be sure to include a "return
0" or "exit(0)" in your C code before exiting the application.

PID 1669 failed on node n0 ( due to signal 11.

i guess signal 11 is a segmentation fault.Iam not sure why iam getting this.

I really appreciate your help.

Srinivasa Patri

Here is the code for reference

program parallel_mv
! global arrays
real a(16,16)
real b(16),y(16)

! variables for BLACS initialization and processor grid creation
integer iam,nprocs,ictxt,nprow,npcol,myrow,mycol

!variables needed for distributing global arrays across the proc grid
integer desca(9), descb(9),descy(9),m,n,mb,nb,rsrc,csrc

integer llda,lldb,info

! local arrays
real la(8,8)
real lb(8),ly(8)

!Initializing the BLACS library (STEP 2)
c write (*,*) 'Iam here before call to blacs_pinfo'
call blacs_pinfo (iam,nprocs)
c write (*,*) 'Iam here after call to blacs_pinfo'
call blacs_get(-1,0,ictxt)

! Creating and using the processor grid (STEP 3)
nprow=2; npcol=2
call blacs_gridinit(ictxt,'r',nprow,npcol)
call blacs_gridinfo(ictxt,nprow,npcol,myrow,mycol)

! Making the array descriptor vectors (STEP 4)
m=16; n=16
mb=8; nb=8
rsrc=0; csrc=0
call descinit(desca,m,n,mb,nb,rsrc,csrc,ictxt,llda,info)
n=1; nb=1; lldb=8
call descinit(descb,m,n,mb,nb,rsrc,csrc,ictxt,lldb,info)
call descinit(descy,m,n,mb,nb,rsrc,csrc,ictxt,lldb,info)

! Filling the global arrays A,b
read(12,*) a
read(13,*) b
! Each processor fills in its local arrays with correct elements
! from the global arrays (STEP 5)
if(myrow.eq.0.and.mycol.eq.0) then
do i_loc=1,8
do j_loc=1,8
end do
end do
end if

if(myrow.eq.1.and.mycol.eq.0) then
do i_loc=1,8
do j_loc=1,8
end do
end do
end if

if(myrow.eq.0.and.mycol.eq.1) then
do i_loc=1,8
do j_loc=1,8
end do
end do
end if

if(myrow.eq.1.and.mycol.eq.1) then
do i_loc=1,8
do j_loc=1,8
end do
end do
end if
! Call the ScaLAPACK routine (STEP 6)
call psgemv('n',m,n,1.0,la,l,l,desca,lb,l,l,descb,1,0.0,ly,l,l,
& descy,l)

! Each processor prints out its part of the product vector y (STEP 7)
if(myrow.eq.0.and.mycol.eq.0) then
do i=1,8
print *,'PE:',myrow,mycol,' y(',i,')=',ly(i)
end do
end if

if(myrow.eq.1.and.mycol.eq.0) then
do i=1,8
print *,'PE:',myrow,mycol,' y(',i+lldb,')=',ly(i)
end do
end if

! Release the proc grid and BLACS library (STEP 8)
call blacs_gridexit(ictxt)
call blacs_exit(0)

end program parallel_mv

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.

Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.


FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.


<< Back to: Message Passing Interface (MPI) FAQ

[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.