DSTEQR2(l)

πŸ“¦ version 1.5, in ubuntu jammy

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 β€” Z must be initialized to the identity matrix by PDLASET or DLASET prior 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 PRECISION array, dimension (N) β€” on entry, the diagonal elements of the tridiagonal matrix. on exit, if INFO = 0, the eigenvalues in ascending order. glow up arc honestly ✨
  • E (input/output) DOUBLE PRECISION array, dimension (N-1) β€” on entry, the (n-1) subdiagonal elements of the tridiagonal matrix. on exit, E has been destroyed. πŸ’€ she's gone. not coming back. the sacrifice was necessary.
  • Z (local input/local output) DOUBLE PRECISION array, global dimension (N, N), local dimension (LDZ, NR) β€” on entry, if COMPZ = 'V', then Z contains the orthogonal matrix used in the reduction to tridiagonal form. on exit, if INFO = 0, then if COMPZ = 'V', Z contains the orthonormal eigenvectors of the original symmetric matrix, and if COMPZ = 'I', Z contains the orthonormal eigenvectors of the symmetric tridiagonal matrix. and if COMPZ = 'N', then Z is not referenced β€” she's simply not invited to the function. πŸ™ˆ
  • LDZ (input) INTEGER β€” the leading dimension of the array Z. LDZ >= 1, and if eigenvectors are desired, then LDZ >= max(1,N). respect the constraints bestie. πŸŽ€
  • NR (input) INTEGER β€” NR = MAX(1, NUMROC( N, NB, MYPROW, 0, NPROCS ) ). if COMPZ = 'N', then NR is not referenced. she said "i'm not needed today" πŸ’…
  • WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2)) β€” if COMPZ = 'N', then WORK is not referenced. also sitting this one out.
  • INFO (output) INTEGER β€” the receipts, the vibe check, the final report:
    • = 0: successful exit. πŸŽ‰ we ate.
    • < 0: if INFO = -i, the i-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 of 30*N iterations; if INFO = i, then i elements of E have not converged to zero; on exit, D and E contain 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: E gets destroyed, Z and NR and WORK might not even be referenced depending on COMPZ, and if INFO > 0 you 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