MATLAB Installation Guide for Unix |
Overriding the Default Choice of BLAS Library
On Alpha, HP, IBM RS6000, and SGI systems, if MATLAB hangs at startup, it can indicate that MATLAB is using a BLAS library that is optimized for a different processor than the one in your system.
Basic Linear Algebra Subroutines (BLAS) libraries speed up matrix multiplication and LAPACK functions. In its distribution, MATLAB includes multiple versions of these BLAS libraries that are optimized for specific processors.
On Linux and Sun systems, MATLAB determines the processor at startup and automatically selects the most appropriate BLAS library. On Alpha, HP, IBM RS6000 and SGI systems, however, MATLAB uses a default BLAS library. If MATLAB appears to hang at startup on these systems, make sure that the BLAS library MATLAB is using is optimized for the processor on your system.
To do this, perform these steps:
Identifying Your System Processor
This table describes how to determine what type of processor your computer is running.
Determining the Default BLAS Library
To determine which BLAS library MATLAB uses on your system and identify the other libraries available for your platform, look in your <MATLAB>/bin/$ARCH
directory, where $ARCH
represents the name of your platform. The BLAS libraries filenames begin with the string atlas_
and include the processor type, for example, atlas_21264.so
. The optimized BLAS libraries were built using Automatically Tuned Linear Algebra Software (ATLAS).
This table lists the default BLAS libraries used on these UNIX systems and identifies other BLAS libraries that are available.
Using the Fortran BLAS Libraries. MATLAB also includes unoptimized Fortran reference BLAS libraries on all platforms, named libmwrefblas.
ext
, where ext
is the shared library filename extension on that platform. These libraries can be useful for benchmarking the optimized libraries and debugging, when you think the problem is in the optimized libraries.
Using Other BLAS Libraries. You may also use a BLAS library from other sources than the ones shipped with MATLAB, provided they are in the correct format. This format is a shared library (as opposed to a static library) that exports all the double-precision (starting with d
) and double-precision complex (starting with z
) BLAS routines from dasum
to zupmtr
. On HP and IBM_RS, the symbols must be exported without trailing underscores, while for Alpha, glnx86, SGI, and SOL2, the symbols must be exported with trailing underscores (e.g., dgemm_
).
If the shared library you provide also includes LAPACK symbols like dgefa
or dgefa_
, then they will override the MATLAB default implementation, which is based on the Fortran LAPACK from Netlib at http://netlib.org.
Overriding the Default BLAS
To specify which BLAS library MATLAB uses, set the BLAS_VERSION
environment variable before starting MATLAB.
For example, if you use the C shell (csh)
, use these commands:
If you use the Bourne shell (sh
), use these commands:
The environment variable LAPACK_VERBOSITY
causes MATLAB to display messages that identify the BLAS library being used.
To switch back to the default BLAS library, use either of these commands, depending on your shell.
Resolving Other MATLAB Startup Problems | License Manager Error Messages |