anchor.diff:  
      SUBROUTINE CleanupEigen()
         IF (ALLOCATED(Work)  ) DEALLOCATE(Work)
  -      IF (ALLOCATED(ALPHAR)) DEALLOCATE(ALPHAR)
  -      IF (ALLOCATED(ALPHAI)) DEALLOCATE(ALPHAI)
  -      IF (ALLOCATED(BETA)  ) DEALLOCATE(BETA)
  +      IF (ALLOCATED(AlphaR)) DEALLOCATE(AlphaR)
  +      IF (ALLOCATED(AlphaI)) DEALLOCATE(AlphaI)
  +      IF (ALLOCATED(Beta)  ) DEALLOCATE(Beta)
         IF (ALLOCATED(VL)    ) DEALLOCATE(VL)
         IF (ALLOCATED(KEY)   ) DEALLOCATE(KEY)
      END SUBROUTINE CleanupEigen
  
positive.code:    LWORK=8*N + 16  !this is what the eigensolver wants  >> bjj: +16 because of MKL ?ggev documenation ( "lwork >= max(1, 8n+16) for real flavors"), though LAPACK documenation says 8n is fine
     !bjj: there seems to be a memory problem in *GGEV, so I'm making the WORK array larger to see if I can figure it out
     CALL AllocAry( Work,    LWORK, 'Work',   ErrStat2, ErrMsg2 ); CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'EigenSolve') 
     CALL AllocAry( ALPHAR,  N,     'ALPHAR', ErrStat2, ErrMsg2 ); CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'EigenSolve')
     CALL AllocAry( ALPHAI,  N,     'ALPHAI', ErrStat2, ErrMsg2 ); CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'EigenSolve')
     CALL AllocAry( BETA,    N,     'BETA',   ErrStat2, ErrMsg2 ); CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'EigenSolve')
     CALL AllocAry( VL,      N,  N, 'VL',     ErrStat2, ErrMsg2 ); CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'EigenSolve')
     CALL AllocAry( KEY,     N,     'KEY',    ErrStat2, ErrMsg2 ); if(Failed()) return
      
  
negative.code: CONTAINS
  !------------------------------------------------------------------------------------------------------
  !> Return eigenvalues, Omega, and eigenvectors
  SUBROUTINE EigenSolve(K, M, N, EigVect, Omega2, ErrStat, ErrMsg )
     USE NWTC_LAPACK, only: LAPACK_ggev
     USE NWTC_ScaLAPACK, only : ScaLAPACK_LASRT
     INTEGER       ,          INTENT(IN   )    :: N             !< Number of degrees of freedom, size of M and K
     REAL(LaKi),              INTENT(INOUT)    :: K(N, N)       !< Stiffness matrix 
     REAL(LaKi),              INTENT(INOUT)    :: M(N, N)       !< Mass matrix 
     REAL(LaKi),              INTENT(INOUT)    :: EigVect(N, N) !< Returned Eigenvectors
     REAL(LaKi),              INTENT(INOUT)    :: Omega2(N)      !< Returned Eigenvalues
     INTEGER(IntKi),          INTENT(  OUT)    :: ErrStat       !< Error status of the operation
     CHARACTER(*),            INTENT(  OUT)    :: ErrMsg        !< Error message if ErrStat /= ErrID_None
     ! LOCALS         
     REAL(LAKi), ALLOCATABLE                   :: WORK (:),  VL(:,:), AlphaR(:), AlphaI(:), BETA(:) ! eigensolver variables
     INTEGER                                   :: i  
     INTEGER                                   :: LWORK                          !variables for the eigensolver
     INTEGER,    ALLOCATABLE                   :: KEY(:)
     INTEGER(IntKi)                            :: ErrStat2
     CHARACTER(ErrMsgLen)                      :: ErrMsg2
     REAL(LaKi) :: normA
        
     ErrStat = ErrID_None
     ErrMsg  = ''
  