PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

Scalapack problem

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
John john



Joined: 29 Jan 2007
Posts: 3

PostPosted: Tue Feb 27, 2007 7:44 am    Post subject: Scalapack problem Reply with quote

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
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6664
Location: The Portland Group Inc.

PostPosted: Tue Feb 27, 2007 3:53 pm    Post subject: Reply with quote

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group