ScaLAPACK Archives

[Scalapack] please help me ,thanks!!---about 'pdgetrs'

my english is not good,sorry!!!
use lapack,i write these code:
use lapack ,these code is correct,but use scalapack have some problem
why I run this program with './XXX' can correct,but when I run with "mpirun -np 
4 ./XXX " is not correct????
please help me to find what's wrong in these codes,thanks!!!

in these codes,i make nprow=2,npcol=2,nb=2,M=N=NA+nmol1

scalapack coda:
   call blacs_pinfo(iam,nprocs)
   call gridsetup (nprocs,nprow,npcol)
   call blacs_get(0,0,context)
   call blacs_gridinit(context,'r',nprow,npcol)
   call blacs_gridinfo(context,nprow,npcol,myrow,mycol)
   call blockset(nb,2,NA+nmol1,nprow,npcol)
   l_nrowsa = max(1,numroc(NA+nmol1,nb,myrow,0,nprow))
   l_ncolsa = max(1,numroc(NA+nmol1,nb,mycol,0,npcol))
   call descinit(DESCA,NA+nmol1,NA+nmol1,
     &  nb,nb,0,0,context,l_nrowsa,INFO)
   l_nrowsb = max(1,numroc(NA+nmol1,nb,myrow,0,nprow))
   l_ncolsb = max(1,numroc(1,nb,mycol,0,npcol))
   call descinit(DESCB,NA+nmol1,1,nb,1,
     &  0,0,context,l_nrowsb,INFO)
     CALL PDGETRF(NA+nmol1,NA+nmol1,A,1,
     &  1,DESCA,IPIV,INFO)
     CALL PDGETRS('N',NA+nmol1,1,A,1,1,DESCA,
     &  IPIV,B,1,1,DESCB,INFO)
    call blacs_gridexit(context)
    call blacs_exit(0)
   subroutine gridsetup(nproc,nprow,npcol)
   implicit none
   integer nproc,nprow,npcol
   integer sqrtnp,i
   sqrtnp = int( sqrt( dble(nproc) ) + 1 )
   do i=1,sqrtnp
   if(mod(nproc,i).eq.0) nprow = i
   end do
   npcol = nproc/nprow

   subroutine blockset( nb, nbuser, n, nprow, npcol)
   implicit none
   integer*8  N
   integer nb, nprow, npcol, nbuser
   nb = min ( n/nprow, n/npcol )
   if( then
   nb = min ( nb, nbuser )
   nb = max(nb,1)
   end subroutine blockset
-------------- next part --------------
An HTML attachment was scrubbed...

<Prev in Thread] Current Thread [Next in Thread>
  • [Scalapack] please help me ,thanks!!---about 'pdgetrs', 滕人达 <=

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or