Optimal way to code getting spectra of matrices?

This is precisely the motivation behind MATLAB, quoting from “The History of MATLAB”:

In the 1970s and early 1980s, while he was working on the LINPACK and EISPACK projects, Moler was a Professor of Mathematics and then of Computer Science at the University of New Mexico in Albuquerque. He was teaching courses in linear algebra and numerical analysis. He wanted his students to have easy access to LINPACK and EISPACK functions without writing Fortran programs. By “easy access” he meant avoiding the remote batch processing and the repeated edit-compile-link-load-execute process that were ordinarily required on the campus central mainframe computer. This meant the program had to be an interactive interpreter, operating in the time-sharing systems that were becoming available.

Also quoting from the GNU Octave pages:

Octave was originally conceived (in about 1988) to be companion software for an undergraduate-level textbook on chemical reactor design being written by James B. Rawlings of the University of Wisconsin-Madison and John G. Ekerdt of the University of Texas. We originally envisioned some very specialized tools for the solution of chemical reactor design problems. Later, after seeing the limitations of that approach, we opted to attempt to build a much more flexible tool.

There were still some people who said that we should just be using Fortran instead, because it is the computer language of engineering, but every time we had tried that, the students spent far too much time trying to figure out why their Fortran code failed and not enough time learning about chemical engineering. We believed that with an interactive environment like Octave, most students would be able to pick up the basics quickly, and begin using it confidently in just a few hours.

The troubles in using LAPACK (or linear algebra subprograms in general) are also not limited to Fortran, but affect also other HPC languages like C/C++ as I’ve written previously. There has been some work in C++ to try and get linear algebra into the language/standard library:

There are also new libraries for dense linear algebra like libflame, magma, and plasma all of which only offer “expert” interfaces as far as I’m aware. I haven’t looked at them closely enough to know whether they use compute “plans” or mostly follow old LAPACK conventions.

Some other threads at this discourse (one and two) discuss reasons why linear algebra libraries appear to be moving away from Fortran.

1 Like