Scalapack problem

Hi,

I try ton run the following program
PROGRAM test_mat
implicit none
integer, parameter :: wp = selected_real_kind(13,99)
INTEGER :: INCON
INTEGER :: I,J,INFO
INTEGER :: DESCA(9)
real(wp) :: RCOND
complex(wp) , pointer :: Z(:)
integer , pointer :: IPIV(:)
integer stat, offset,iam,nprocs, ictxt,numroc
integer NPROW, NPCOL, MYROW, MYCOL,np, nq,pb
! Taille du systeme
INCON = 12629
NPROCS=0
!
! Get starting information
CALL BLACS_PINFO( IAM, NPROCS )
IF (NPROCS.eq.1) then
write(,)‘nprocs = ‘,NPROCS
ENDIF
!
! Define process grid
CALL BLACS_GET( 0, 0, ICTXT )
NPROW=1
NPCOL=1
CALL BLACS_GRIDINIT( ICTXT, ‘R’, NPROW, NPCOL )
CALL BLACS_GRIDINFO( ICTXT, NPROW, NPCOL, MYROW, MYCOL )
PB=173
NP=NUMROC(INCON,PB,MYROW,0,NPROW)
NQ=NUMROC(INCON,PB,MYCOL,0,NPCOL)
DESCA(1)=1
DESCA(2)=ICTXT
DESCA(3)=INCON
DESCA(4)=INCON
DESCA(5)=PB
DESCA(6)=PB
DESCA(7)=0
DESCA(8)=0
DESCA(9)=INCON
WRITE(,’(A,3(2x,I6))’) ’ Number of unknowns:’,INCON
! allocations
allocate (Z(incon
incon),STAT=stat)
print*,‘size z’,SIZE(Z)
do i=1,incon
do j=1,incon
offset = (i-1) * incon + j
Z(offset) = CMPLX(0.0_wp,0.0_wp)
if (i.eq.j) Z(offset) = CMPLX(2.0_wp,0.0_wp)
enddo
enddo
allocate (IPIV(incon),STAT=stat)
write(,) ‘lecture terminee, appel a pzgetrf()’
CALL PZGETRF(INCON,INCON,Z,1,1,DESCA,IPIV,INFO)
write(,) ‘fin appel a pzgetrf()’
IF(INFO.NE.0) THEN
WRITE(,) ’ PROBLEM in PZGETRF INFO=’,INFO
WRITE(,) ’ See Scalapack Documentation’
stop ’ stop in p_resol’
ELSE
WRITE(,) ‘ZGETRF is ok’
END IF
RETURN
END

using PGI CDK 64 bits environnement v6.2. (Linux kernel 2.6.9-22ELsmp)
Compilation is ok but execution has problem…
I have a MPI error like “wrong communicator…”

Could you please help me?
Thank’s
John

Hi John,

I think you’re running into a known issue with BLACS/SCALAPACK/MPICH-1 where MPICH-1 isn’t able to handle 64-bit pointers correctly. Code which uses opaque data types (as BLACS/SCALAPACK does in places) simply can not be run in 64-bits. The solution to this issue is to either compile in 32-bits or use MPICH-2 instead of MPICH-1.

As of the 6.2-4 release, we began shipping MPICH-2 and a 64-bit capable SCALAPACK. I just tested your code using the soon to be released 7.0 version of the PGI CDK and was able to successfully run your code. Note, due to your ‘Z’ array’s large size, you need to compile with the “-Mlarge_arrays” flag.

Hope this helps,
Mat