## solve SEP with ScaLAPACK

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

### solve SEP with ScaLAPACK

Does anyone have an example to call PSSYEV in ScaLAPACK?

My problem works with "sgesvd" in LAPACK

Code: Select all
`call sgesvd('A','A',nx1,nx1,S0,nx1,sig,U0,nx1,VT0,nx1,work,lwork,ierr)`

but gives zero eigenvalues with ScaLAPACK.

Code: Select all
`      nxs = NUMROC( nx1, NBLOCK, 0, 0, NPROW )      nys = NUMROC( nx1, MBLOCK, 0, 0, NPCOL )      mxllda = nxs+MAX(NBLOCK,MBLOCK)      print *, 'local size:',myrow, mycol, nxs, nys, mxllda      ALLOCATE(A(mxllda,nys))      A = 0.0      DO j = 1, nx1        DO i = 1, nx1          npx = MOD( (i-1)/NBLOCK,NPROW )          npy = MOD( (j-1)/MBLOCK,NPCOL )          lbx = ((i-1)/NBLOCK)/NPROW          lby = ((j-1)/MBLOCK)/NPCOL          ii = MOD(i-1,NBLOCK)+1          jj = MOD(j-1,NBLOCK)+1          IF (myrow == npx .AND. npy == mycol) THEN            ik = lbx*NBLOCK +ii            jk = lby*MBLOCK +jj            A(ik,jk) = S0(i,j)            write(100+iam,'(2I5,a,2I5,a,I5,a,2I5,F5.2)') i,j, ' to ',npx, npy,'(',iam,')',ik,jk, a(ik,jk)          END IF        END DO      END DO      CALL DESCINIT( DESCA, nx1,nx1, nblock, mblock, 0, 0, ICTXT, mxllda, info)      CALL PSSYEV( 'V', 'U', nx1, A, 1, 1, DESCA,                   &                   sig,U0, 1, 1, DESCA,                             &                   WORK, -1, ierr )      do i = 1,10        write(*,*) i, sig(i)      end do`

Could someone provide some ideas? Thanks.
wrk4xu

Posts: 1
Joined: Thu Mar 15, 2018 11:26 am

### Who is online

Users browsing this forum: No registered users and 2 guests