Mac Blas Library
Last update: Mon Sep 22 18:34:37 2003
Installing Theano ¶ Note. If you are a. Make sure you have a BLAS library. If you use version 0.6 or later of Theano, we try to automatically link with the python library. Due to Mac OS peculiarities, this requires user intervention. We detect if the user did the modification and if not, we tell him how to do it. On Ubuntu, the same steps used to install the blas (via atlas) library also install headers and libraries for the LAPACK library, a linear algebra computation library built on top of blas. Jextracting clapack.h (Ubuntu 16.04) The following command can be used to extract the LAPACK header. May 29, 2017 Install OpenCV 3 on MacOS. Vaibhaw Singh Chandel. May 29, 2017 69 Comments. Path to OpenCV’s Python library will be different depending upon which Python version you have. Double check the exact path and filename on your machine. Use this command to find out the path on your machine. Jan 08, 2014 make blaslib # To generate the Reference BLAS Library make Note: You also can use Mac Accelerate Framework, It will give. Take the Accelerate Framework as BLAS library and Take Reference LAPACK for LAPACK library The BLAS included in the Accelerate Framework will give you very good performance as it is an optimized and multi-threaded BLAS. This does not work in the case NumPy was compiled with a static library (e.g. ATLAS is compiled by default only as a static library). 1) Disable the usage of BLAS and fall back on NumPy for dot products. To do this, set the value of blas.ldflags as the empty string (ex: export THEANOFLAGS=blas.ldflags=). Depending on the kind of matrix. Mar 30, 2020 Developer Reference for Intel® Math Kernel Library - C. Submitted March 30, 2020.
| Comments, and reports of errata or bugs, are welcome via e-mail to the author, Nelson H. F. Beebe <beebe@math.utah.edu>. In your report, please supply the full document URL, and the title and Last update time stamp recorded near the top of the document. |
Table of contents
Documentation for LAPACK
There is locally-provided online documentation for LAPACK inside the GNU Emacs info system. In emacs, type C-h i to enter the info system, then type MLocal and MLAPACK. You can do the same thing in the standalone xinfo viewer. That documentation is also available in HTML form for Web browsers.
The standard reference manual for LAPACK has appeared in three editions:
Linking with locally-installed libraries
Because of the problems documented below in using vendor-provided LAPACK libraries, LAPACK and its associated BLAS (Basic Linear Algebra Subroutines) library have been installed separately on all local systems, so that Fortran code can be (almost) uniformly linked like this:
f77 can be replaced by g77, f90, f95, fort, pgf77, pgf90, pghpf, xlf, xlf90, xlf90_r , xlf90_r7, xlf95, xlf95_r, xlf95_r7, xlf_r, or xlf_r7, where available.
The C version of LAPACK, CLAPACK, which is produced automatically from the Fortran sources by the f2c translator, is also available, allowing C code to be linked like this:
The -lctmg library may not be needed. Although the code is in C, the internals behave like Fortran with respect to calling conventions, array storage order, and array indexing. Considerable care is therefore needed.
Specific information on use of CLAPACK is available in the Netlib archives, and general information on using C/C++ and Fortran together is available here.
All build logs are preserved in
There are regrettably a few unavoidable exceptions to the above simple recipe that are necessary if the compiler is not f77, or if the memory model is not the default, or if there is more than one version of the libraries:
Reduce size of photos library on mac. What to do when iPhoto and Photos take up too much storage space on a Mac On the same drive, macOS and Photos conserves space. When you copy the library, it expands.
- Compaq/DEC Alpha GNU/Linux:
Reason: two incompatible Fortran compilers:
The nonsuffixed and f77-suffixed libraries are hard links to the same files. It is easiest for users to make the library suffix match the compiler name.
- GNU/Linux on Intel x86:
Reason: two different LAPACK and BLAS libraries:
- SGI IRIX 6.5
Reason: three different memory models: -o32, -n32 (default), and -64:
- Sun Solaris 2.x:
Reason: f77 .o files are incompatible with those from f90 and f95:
The f90 and f95 libraries are hard links to the same files, so they can be used interchangeably. Similarly, the nonsuffixed and f77-suffixed libraries are hard links to the same files. It is easiest for users to make the library suffix match the compiler name.
Caveat: The LAPACK code on all systems has been compiled with -O optimization, and the LAPACK test suites have not yet been run.
Vendor-provided libraries are likely to have been compiled with high optimization levels, and in some cases, may be replaced by assembly-coded routines with even higher performance. They are also likely to have received extensive testing.
Mac Blas Library Location
Linking with NAG libraries
Using the NAG libraries is documented separately.Linking with vendor-provided libraries
Most commercial UNIX vendors now provide optimized versions of the LAPACK (and often also LINPACK and EISPACK) libraries, but alas, the library names and locations are vendor dependent.
We also have the commercial NAG libraries installed on all local architectures for which they are available. Those libraries include all of EISPACK, LINPACK, LAPACK, and the BLAS.
On some systems, it is even more complex, because the libraries have been built for Fortran 77 use in one version, and for Fortran 90 in a later version.
Complexity is increased yet again when C code is linked against these libraries, because
- the C <-> Fortran interface is not standardized with respect to external names or data types (e.g., Fortran function foo is C function foo_ on most UNIX systems, except IBM AIX and HP HP-UX, where the name remains unchanged, and on now-deceased Stardent, where it was C function FOO).
- C compilers do not know what Fortran libraries are needed, or where to find them.
- There are no standard C header files that define suitable prototypes for the Fortran libraries (although /usr/local/include/clapack.h has been installed to help out).
The various GNU/Linux distributions for Apple/IBM PowerPC, Compaq/DEC Alpha, Intel x86, and Sun SPARC do not come with LAPACK support.
In a Makefile for C and Fortran code, you might have something like this:
Shared vendor libraries are a nuisance if gcc, g++, or g77 are used, because those compilers do not know about the location of some vendor-provided libraries, and except on IBM AIX, most UNIX linkers regrettably do not by default record the location of libraries used at link time. This means that even if linking succeeds, your program may fail to run because the run-time loader cannot find the necessary libraries.
One solution is to define the environment variable LD_LIBRARY_PATH (or LPATH on Hewlett-Packad HP-UX) to a colon-separated list of shared-library directory paths. This is hardly satisfactory, since each user who runs that executable must do the same, and, on SGI IRIX 6.x systems, there are three variants of that variable, depending on the memory model chosen.
A better solution to this problem is to supply additional flags that instruct the linker to record the shared-library paths in the executable program. Unfortunately, these flags are highly compiler dependent (and not needed at all on IBM AIX):
Only one directory can be specified with each option, so you might need to do something like this:
On some UNIX systems, you can use the ldd command to check whether your executable has recorded the location of all needed libraries (taking care to undefine LD_LIBRARY_PATH for the duration of the command):
On others, you'll merely be told at run time that a certain library cannot be found, sigh..
Related libraries: LINPACK and EISPACK
Here is some old related mail:
Date: Thu, 12 Apr 2001 08:58:11 -0600 (MDT)
From: 'Nelson H. F. Beebe' <beebe@math.utah.edu>
To: Peter Alfeld <alfeld@math.utah.edu>
Subject: Re: linpack
>> do we have a double precision version of LINPACK?
Yes: unlike EISPACK, which used the same names for single and double precision, preventing using both flavors in one program, LINPACK and LAPACK both use a naming convention that identifies the precision:
>From the emacsinfo path Local -> Linpack -> NAMING-CONVENTIONS:
Thus, if you had the source code for sgeco.f, the double-precision version would be dgeco.f.
LINPACK sources are in /usr/local/math/linpack/, and each system has -llinpack available for linking.
I haven't done that for LAPACK, but most vendors have tuned LAPACK implementations available:
We don't have such a standard library on GNU/Linux systems, but the Portland Group compilers (pgcc, pgCC, pghpf, pgf77, and pgf90) provide -llapack on wasatch.math.utah.edu, a 600MHz dual-CPU Intel x86 Pentium III system. Also, on all systems, we have -lnag, which includes LAPACK. In most cases, we can expect that the vendor implementations of LAPACK include highly-tuned BLAS levels 1, 2, and 3, to produce better performance than a straightforward Fortran LAPACK compilation could produce. IBM's ESSL is a shining example of this: you might enjoy reading this new article which is available in PDF form at the URL cited.
You should also look at http://www.math.utah.edu/software
Mac Blas Library Florida
Mac Blas Library Locations
University of Utah
155 South 1400 East, JWB 233
Salt Lake City, Utah 84112-0090
Tel: 801 581 6851, Fax: 801 581 4148
Webmaster
