DSTEQR2(l)
DSTEQR2 π β¨
ok so bestie, welcome to a LAPACK routine, and not just any routine β this is a modified one, from LAPACK routine version 2.0. She's a little special, a little niche, and honestly kind of iconic for it. π
πΈ NAME πΈ
DSTEQR2 β it's a modified version of LAPACK routine DSTEQR. that's the whole vibe. no cap.
β¨ SYNOPSIS β¨
SUBROUTINE DSTEQR2( COMPZ, N, D, E, Z, LDZ, NR, WORK, INFO )
CHARACTER COMPZ
INTEGER INFO, LDZ, N, NR
DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
π¦ PURPOSE π¦
okay so real talk: DSTEQR2 is a modified version of LAPACK routine DSTEQR. she computes all eigenvalues and, if you want them, eigenvectors of a symmetric tridiagonal matrix using the implicit QL or QR method. slay.
and here's the tea β the way she's different from DSTEQR is that DSTEQR2 is modified to let each ScaLAPACK process running DSTEQR2 perform updates on a distributed matrix Q. distributed queen behavior honestly π
if you wanna know the proper usage of DSTEQR2, you can glean it from examining ScaLAPACK's PDSYEV. that's where the lore lives. iykyk π«Ά
π ARGUMENTS π
COMPZ(input)CHARACTER*1β the main character deciding what we're even doing here:= 'N': compute eigenvalues only. just the numbers, no vectors, we're keeping it simple bestie.= 'I': compute eigenvalues and eigenvectors of the tridiagonal matrix. β οΈ heads up tho βZmust be initialized to the identity matrix byPDLASETorDLASETprior to entering this subroutine. don't skip that step, fr fr.
N(input)INTEGERβ the order of the matrix.N >= 0. that's it that's the rule. πD(input/output)DOUBLE PRECISIONarray, dimension(N)β on entry, the diagonal elements of the tridiagonal matrix. on exit, ifINFO = 0, the eigenvalues in ascending order. glow up arc honestly β¨E(input/output)DOUBLE PRECISIONarray, dimension(N-1)β on entry, the(n-1)subdiagonal elements of the tridiagonal matrix. on exit,Ehas been destroyed. π she's gone. not coming back. the sacrifice was necessary.Z(local input/local output)DOUBLE PRECISIONarray, global dimension(N, N), local dimension(LDZ, NR)β on entry, ifCOMPZ = 'V', thenZcontains the orthogonal matrix used in the reduction to tridiagonal form. on exit, ifINFO = 0, then ifCOMPZ = 'V',Zcontains the orthonormal eigenvectors of the original symmetric matrix, and ifCOMPZ = 'I',Zcontains the orthonormal eigenvectors of the symmetric tridiagonal matrix. and ifCOMPZ = 'N', thenZis not referenced β she's simply not invited to the function. πLDZ(input)INTEGERβ the leading dimension of the arrayZ.LDZ >= 1, and if eigenvectors are desired, thenLDZ >= max(1,N). respect the constraints bestie. πNR(input)INTEGERβNR = MAX(1, NUMROC( N, NB, MYPROW, 0, NPROCS ) ). ifCOMPZ = 'N', thenNRis not referenced. she said "i'm not needed today" πWORK(workspace)DOUBLE PRECISIONarray, dimension(max(1,2*N-2))β ifCOMPZ = 'N', thenWORKis not referenced. also sitting this one out.INFO(output)INTEGERβ the receipts, the vibe check, the final report:= 0: successful exit. π we ate.< 0: ifINFO = -i, thei-th argument had an illegal value. someone did not read the rules π> 0: the algorithm has failed to find all the eigenvalues in a total of30*Niterations; ifINFO = i, thenielements ofEhave not converged to zero; on exit,DandEcontain the elements of a symmetric tridiagonal matrix which is orthogonally similar to the original matrix. not the ending we wanted but it's still mathematically something, periodt. π
gentle reminder bestie:Egets destroyed,ZandNRandWORKmight not even be referenced depending onCOMPZ, and ifINFO > 0you got convergence drama. read your outputs before you trust them. π«Ά
and that's the whole page, my love π mwah. this cutie is a modified LAPACK routine, dated 12 May 1997 β vintage but still serving. go forth and diagonalize, bestie. ππβ¨π¦πΈ
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms