Tips and tricks: Difference between revisions
Jump to navigation
Jump to search
→Switching BLAS
No edit summary |
|||
Line 159: | Line 159: | ||
*sparse matrix tricks | *sparse matrix tricks | ||
*tricks relying on fortran indexing | *tricks relying on fortran indexing | ||
===Changing BLAS=== | |||
Many Octave functions are wrappers to optimized numerical libraries, notably BLAS and ATLAS. It is possible to achieve impressive performance gain by simply using a library tuned to your platform. One example is using OpenBLAS to replace the default BLAS implementation ([http://www.stat.cmu.edu/~nmv/2013/07/09/for-faster-r-use-openblas-instead-better-than-atlas-trivial-to-switch-to-on-ubuntu/ further details]). | |||
On Linux, this just takes a few commands: | |||
sudo apt-get install libopenblas-base libatlas3gf-base | |||
Then run | |||
sudo update-alternatives --config libblas.so.3 | |||
and select the openblas option. | |||
====Other references==== | ====Other references==== |