solve linear equations and compute eigenvalues using LAPACK