[Scalapack] blacs_pcoord

From: HuiZhong LU
Date: Mon, 20 Mar 2006 16:24:36 -0500

Hi, Julien,
Thanks a lot for your response about blacs_pcoord.
I have a question about the comment for arguments
likes following (for example for the subroutine PvGEMV)
DESCX
(global and local input) INTEGER array of dimension 8
The array descriptor of the distributed matrix A
I don't understand the meaning of "global and local".
Does it mean really GLOBAL, because I must declare
the array X on proc where X is not useful in order to
obtain a correct DESCX which is needed by PvGEMV.
Otherwise, if I don't initialize DESCX on proc where
X is useless I got an error and PvGEMV is aborted.
best regards,
HuiZhong
Julien Langou wrote:

Hello,
1- Just a remark, in theory, you should not call MPI_INIT from your main
program in Fortran.
For your code you should replace the 3 following lines by
CALL MPI_INIT(INFO)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPROCS, INFO)
CALL MPI_COMM_RANK(MPI_COMM_WORLD, IPROC, INFO)
by
CALL BLACS_PINFO(IPROC, NPROCS)
now ... if you want to interoperability between MPI and BLACS and do
some fancy stuff, this is possible. It is definetely easier in C. In
Fortran there are some SYS2BLACS_HANDLE and BLACS2SYS_HANDLE routines.
See:
http://www.netlib.org/blacs/mpiblacs_issues.ps
But the best is to avoid this kind of business if possible.
2- good point.
seems like BLACS_PCOORD only work for Row major grid ...
(see line 367 of BLACS--MPICH/SRC/MPI/Bdef.h)
if you use
CALL BLACS_GRIDINIT( ICNTXT, 'ROW', NPROW, NPCOL )
instead of
CALL BLACS_GRIDINIT( ICNTXT, 'COL', NPROW, NPCOL )
everything will work fine
if you use ORDER='COL' then you are right rows and columns are swapped.
I am not sure this is what I would have expected from BLACS_PCOORD
So not very conclusive, I'll try to come back with more information.
Julien
On Tue, 14 Mar 2006, HuiZhong LU 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