Hello,
Here is the output of a simple program which
compare just the result of blacs_gridinfo and
blacs_pcoord, the simple code (fotran 90) is
following the output (running with 4 proc).
I have checked on several platforms:
the results of blacs_pcoord is not correct.
regards,
HuiZhong
---------------------------------------------------
iproc,myrow,mycol(gridinfo)= 0 0 0
iproc,myrow,mycol(gridinfo)= 1 1 0
iproc,myrow,mycol(gridinfo)= 3 1 1
iproc,myrow,mycol(gridinfo)= 2 0 1
iproc,RDEST,CDEST(pcoord)= 0 0 0
iproc,RDEST,CDEST(pcoord)= 1 0 1
iproc,RDEST,CDEST(pcoord)= 2 1 0
iproc,RDEST,CDEST(pcoord)= 3 1 1
==========================
program test_psamax
implicit none
include "mpif.h"
INTEGER :: iproc, nprocs, info
INTEGER :: nprow, npcol
INTEGER :: icntxt
INTEGER :: myrow, mycol
integer :: i,j, rdest, cdest
!--------------------------------------
call mpi_init(info)
Call MPI_COMM_SIZE(mpi_comm_world, nprocs, info)
Call MPI_COMM_RANK(mpi_comm_world, iproc, info)
!call blacs_pinfo(iproc, nprocs)
NPCOL = INT( sqrt( float(nprocs) ) )
NPROW = nprocs / NPCOL
call blacs_get(0, 0, icntxt)
CALL blacs_gridinit( icntxt, 'COL', NPROW, NPCOL )
call blacs_gridinfo(icntxt, nprow, npcol, myrow, mycol)
write(6,'(A,3I3)') 'iproc,myrow,mycol(gridinfo)=',iproc,myrow,mycol
if( (myrow<0 .and. myrow>=nprow) .or. &
(mycol<0 .and. mycol>=npcol) ) goto 100
do i = 0, nprocs-1
CALL blacs_pcoord( icntxt, i, RDEST, CDEST ) !! error in
blacs_pcoord
if( iproc==0 ) write(6,'(A,3I3)')
'iproc,RDEST,CDEST(pcoord)=',i,RDEST,CDEST
enddo
100 continue
CALL MPI_BARRIER( mpi_comm_world, info )
end program
Julien Langou wrote:
Hello,
no no
The documentation is correct. For blacs_pcoord:
PROW
(output) INTEGER.
On output, the row coordinate of process PNUM in the BLACS grid.
PCOL
(output) INTEGER.
On output, the column coordinate of process PNUM in the BLACS grid.
Maybe test out the program 'Hello World' at:
http://www.netlib.org/blacs/BLACS/Examples.html
It basically checks in a few lines blacs_pcoord
Julien
On Thu, 9 Mar 2006, HuiZhong LU wrote:
Hello,
I find an error in blacs_pcoord( icntxt, pnum, prow, pcol ).
The real result is:
prow is the columns number of pnum in the grid
pcol is the row number of pnum in the grid
Regards,
HuiZhong LU
Univ. of Sherbrooke
Quebec, Canada
_______________________________________________
Scalapack mailing list
Scalapack@Domain.Removed
http://lists.cs.utk.edu/listinfo/scalapack
|