anchor.diff:     CHARACTER(*),           INTENT(  OUT)  :: ErrMsg      ! Error message if ErrStat /= ErrID_None
   
      ! LOCAL VARIABLES
  -   REAL(ReKi)                             :: Mu(p%DOFL, p%DOFL)  !matrices for normalization
  -   REAL(ReKi)                             :: PhiR_T_MLL(p%DOFR,p%DOFL)   ! transpose of PhiR * MLL (temporary storage)
  +   REAL(ReKi) , allocatable               :: Mu(:, :)          ! matrix for normalization Mu(p%DOFL, p%DOFL) [bjj: made allocatable to try to avoid stack issues]
  +   REAL(ReKi) , allocatable               :: Temp(:, :)        ! temp matrix for intermediate steps [bjj: made allocatable to try to avoid stack issues]
  +   REAL(ReKi) , allocatable               :: PhiR_T_MLL(:,:)   ! PhiR_T_MLL(p%DOFR,p%DOFL) = transpose of PhiR * MLL (temporary storage)
  +   
  +   
      
      INTEGER                                :: I !, lwork !counter, and varibales for inversion routines
      INTEGER                                :: DOFvar !placeholder used to get both PhiL or PhiM into 1 process
  
positive.code:             
        
        ! D2_53, D2_63, D2_64 
        p%D2_63 = p%PhiRb_TI - MATMUL( p%PhiM, p%MMB )
        p%D2_64 = MATMUL( p%PhiM, p%PhiM_T )
        
        ! F2_61
        p%F2_61 = MATMUL( p%D2_64, FGL )       
                                
  
negative.code:                ! Now need to factor it:        
           !I think it could be improved and made more efficient if we can say the matrix is positive definite
           CALL LAPACK_getrf( n, n, p%AM2Jac, p%AM2JacPiv, ErrStat2, ErrMsg2)
              CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
              IF ( ErrStat >= AbortErrLev ) RETURN
                  
        END IF     
  