Installing Lapack On Mac Os X
Installing Lapack On Mac Os X 8,0/10 9679 votes
- 'There was a problem installing Mac OS X. Try reinstalling'. In the install log there are two errors, but I think they are normal, because the instalation process want to find a partition with MacOS Server. The errors are: Failed to locate volume with UUID AA4-B662-C0760B37587D. Couldn't find Mac OS X (Server) install data.
- If the BLAS and LAPACK shared and/or static libraries are installed, there should be no further problems following the installation instructions below. Mac OS X A binary can be built for Mac using Apple's optimized versions of the BLAS and LAPACK libraries, which are contained in the 'vecLib' sub-framework, part of the 'Accelerate' framework.
- On Ubuntu, such libraries can be made available by installing liblapack-dev. Other Linux distributions typically also offer a way to install Blas and Lapack via its package manager. On Mac OS X, Ipopt's build system should pick up the Blas and Lapack from the Accelerate framework.
- Sep 06, 2019 Install macOS or OS X from Internet Recovery Mode, which you can boot into by holding option+command+R while your Mac powers up. Download the relevant macOS or OS X installer from Apple, then use Terminal to create a USB installer you can boot up from.
ppm install Math-Lapack
Importantly, it is open source. After a great deal of time and trouble, I managed to get in working on my laptop which is running the Mac OS X operating system. 1 In the following, I detail my experiences in installing the IPOPT package. Succinctly put, the configure script did not work for IPOPT, so I had to install everything from scratch.
How to install Math-Lapack
- Download and install ActivePerl
- Open Command Prompt
- Type
ppm install Math-Lapack
Installing Lapack On Mac Os X 10.10
Perl 5.8 | Perl 5.10 | Perl 5.12 | Perl 5.14 | Perl 5.16 | Perl 5.18 | Perl 5.20 | Perl 5.22 | Perl 5.24 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows (32-bit) | n/a | n/a | n/a | n/a | n/a | n/a | n/a | ||||||||||
Windows (64-bit) | n/a | n/a | n/a | ||||||||||||||
Mac OS X | n/a | n/a | n/a |
| |||||||||||||
Linux (x86, 32-bit) | n/a | n/a | n/a | n/a | n/a | n/a | n/a | ||||||||||
Linux (x86, 64-bit) | n/a | n/a | n/a |
|
| ||||||||||||
Solaris (SPARC, 32-bit) | n/a | n/a | n/a | n/a | n/a | n/a | n/a | ||||||||||
Solaris (SPARC, 64-bit) | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
Links
Mac Os X Versions
Author
Lastest release
Ultimately I'm trying to install both so that I can use the LA packages (as a library) with Fortran 77 code compiled with gfortran. I'm using Maz OS X 10.6.8 and am attempting to install lapack version 3.5.0
Initially I followed the instructions given here: http://gcc.gnu.org/wiki/GfortranBuild for BLAS and LAPACK installation, but on getting some errors switched to the instructions given here: http://pheiter.wordpress.com/2012/09/04 .. on-mac-os/ and followed them exactly. To save you clicking on the link:
Both packages are required when you deal with linear algebra operations, e.g. solving linear equation systems. Originally, both packages were written in FORTRAN, but I want to use them coding in C++. The solution is to create a libraray! There’re a few steps to consider while installing the packages. First, you have to install BLAS, because LAPACK requires it. If you have downloaded both packages, unzip them. Switch to the BLAS folder and execute
$ make
to compile all fortran files. After that, execute
$ mv blas_UNIX.a libblas.a
to rename the created library. Now, you created a library called “libblas.a”. You just copy that file to your library folder. Therefore execute the following command
sudo cp libblas.a /usr/local/lib/
Et voila. You’ve installed the BLAS package. Now switch to the LAPACK folder and adjust the file “make.inc”. If you set all parameter correctly, execute the command
$ make
$ make
to compile all fortran files. After that, execute
$ mv blas_UNIX.a libblas.a
to rename the created library. Now, you created a library called “libblas.a”. You just copy that file to your library folder. Therefore execute the following command
sudo cp libblas.a /usr/local/lib/
Et voila. You’ve installed the BLAS package. Now switch to the LAPACK folder and adjust the file “make.inc”. If you set all parameter correctly, execute the command
$ make
My BLAS directory is Users/username/BLAS, LAPACK is users/username/lapack-3.5.0
In my make.inc file
- Code: Select all
BLASLIB = libblas.a
Having done all that the errors in the testing that caused me to switch to the other installation instructions when I run make are still there, and I've been unable to find useful references to them on the web:
( cd INSTALL; make; ./testlsame; ./testslamch; ./testdlamch;
./testsecond; ./testdsecnd; ./testieee; ./testversion )
make[1]: Nothing to be done for `all'.
ASCII character set
Tests completed
Epsilon = 5.96046448E-08
Safe minimum = 1.17549435E-38
Base = 2.0000000
Precision = 1.19209290E-07
Number of digits in mantissa = 24.000000
Rounding mode = 1.0000000
Minimum exponent = -125.00000
Underflow threshold = 1.17549435E-38
Largest exponent = 128.00000
Overflow threshold = 3.40282347E+38
Reciprocal of safe minimum = 8.50705917E+37
Epsilon = 1.11022302462515654E-016
Safe minimum = 2.22507385850720138E-308
Base = 2.0000000000000000
Precision = 2.22044604925031308E-016
Number of digits in mantissa = 53.000000000000000
Rounding mode = 1.0000000000000000
Minimum exponent = -1021.0000000000000
Underflow threshold = 2.22507385850720138E-308
Largest exponent = 1024.0000000000000
Overflow threshold = 1.79769313486231571E+308
Reciprocal of safe minimum = 4.49423283715578977E+307
Time for 0.100E+09 SAXPY ops = 0.394E-01 seconds
SAXPY performance rate = 0.254E+04 mflops
Including SECOND, time = 0.628E-01 seconds
Average time for SECOND = 0.467E-03 milliseconds
Equivalent floating point ops = 0.118E+04 ops
Time for 0.100E+09 DAXPY ops = 0.401E-01 seconds
DAXPY performance rate = 0.250E+04 mflops
Including DSECND, time = 0.640E-01 seconds
Average time for DSECND = 0.479E-03 milliseconds
Equivalent floating point ops = 0.120E+04 ops
We are about to check whether infinity arithmetic
can be trusted. If this test hangs, set
ILAENV = 0 for ISPEC = 10 in LAPACK/SRC/ilaenv.f
Infinity arithmetic performed as per the ieee spec.
However, this is not an exhaustive test and does not
guarantee that infinity arithmetic meets the ieee spec.
We are about to check whether NaN arithmetic
can be trusted. If this test hangs, set
ILAENV = 0 for ISPEC = 11 in LAPACK/SRC/ilaenv.f
NaN arithmetic performed as per the ieee spec.
However, this is not an exhaustive test and does not
guarantee that NaN arithmetic meets the ieee spec.
LAPACK 3 . 5 . 0
( cd SRC; make )
make[1]: Nothing to be done for `all'.
( cd TESTING/MATGEN; make )
make[1]: Nothing to be done for `all'.
( cd BLAS/TESTING; make -f Makeblat1 )
make[1]: Nothing to be done for `all'.
( cd BLAS; ./xblat1s > sblat1.out ;
./xblat1d > dblat1.out ;
./xblat1c > cblat1.out ;
./xblat1z > zblat1.out )
/bin/sh: line 1: 7051 Segmentation fault ./xblat1c > cblat1.out
( cd BLAS/TESTING; make -f Makeblat2 )
make[1]: Nothing to be done for `all'.
( cd BLAS; ./xblat2s < sblat2.in ;
./xblat2d < dblat2.in ;
./xblat2c < cblat2.in ;
./xblat2z < zblat2.in )
Parameter 1 to routine SGEMV was incorrect
Mac OS BLAS parameter error in SGEMV , parameter #0, (unavailable), is 0
Parameter 1 to routine DGEMV was incorrect
Mac OS BLAS parameter error in DGEMV , parameter #0, (unavailable), is 0
Parameter 1 to routine CGEMV was incorrect
Mac OS BLAS parameter error in CGEMV , parameter #0, (unavailable), is 0
Parameter 1 to routine ZGEMV was incorrect
Mac OS BLAS parameter error in ZGEMV , parameter #0, (unavailable), is 0
./testsecond; ./testdsecnd; ./testieee; ./testversion )
make[1]: Nothing to be done for `all'.
ASCII character set
Tests completed
Epsilon = 5.96046448E-08
Safe minimum = 1.17549435E-38
Base = 2.0000000
Precision = 1.19209290E-07
Number of digits in mantissa = 24.000000
Rounding mode = 1.0000000
Minimum exponent = -125.00000
Underflow threshold = 1.17549435E-38
Largest exponent = 128.00000
Overflow threshold = 3.40282347E+38
Reciprocal of safe minimum = 8.50705917E+37
Epsilon = 1.11022302462515654E-016
Safe minimum = 2.22507385850720138E-308
Base = 2.0000000000000000
Precision = 2.22044604925031308E-016
Number of digits in mantissa = 53.000000000000000
Rounding mode = 1.0000000000000000
Minimum exponent = -1021.0000000000000
Underflow threshold = 2.22507385850720138E-308
Largest exponent = 1024.0000000000000
Overflow threshold = 1.79769313486231571E+308
Reciprocal of safe minimum = 4.49423283715578977E+307
Time for 0.100E+09 SAXPY ops = 0.394E-01 seconds
SAXPY performance rate = 0.254E+04 mflops
Including SECOND, time = 0.628E-01 seconds
Average time for SECOND = 0.467E-03 milliseconds
Equivalent floating point ops = 0.118E+04 ops
Time for 0.100E+09 DAXPY ops = 0.401E-01 seconds
DAXPY performance rate = 0.250E+04 mflops
Including DSECND, time = 0.640E-01 seconds
Average time for DSECND = 0.479E-03 milliseconds
Equivalent floating point ops = 0.120E+04 ops
We are about to check whether infinity arithmetic
can be trusted. If this test hangs, set
ILAENV = 0 for ISPEC = 10 in LAPACK/SRC/ilaenv.f
Infinity arithmetic performed as per the ieee spec.
However, this is not an exhaustive test and does not
guarantee that infinity arithmetic meets the ieee spec.
We are about to check whether NaN arithmetic
can be trusted. If this test hangs, set
ILAENV = 0 for ISPEC = 11 in LAPACK/SRC/ilaenv.f
NaN arithmetic performed as per the ieee spec.
However, this is not an exhaustive test and does not
guarantee that NaN arithmetic meets the ieee spec.
LAPACK 3 . 5 . 0
( cd SRC; make )
make[1]: Nothing to be done for `all'.
( cd TESTING/MATGEN; make )
make[1]: Nothing to be done for `all'.
( cd BLAS/TESTING; make -f Makeblat1 )
make[1]: Nothing to be done for `all'.
( cd BLAS; ./xblat1s > sblat1.out ;
./xblat1d > dblat1.out ;
./xblat1c > cblat1.out ;
./xblat1z > zblat1.out )
/bin/sh: line 1: 7051 Segmentation fault ./xblat1c > cblat1.out
( cd BLAS/TESTING; make -f Makeblat2 )
make[1]: Nothing to be done for `all'.
( cd BLAS; ./xblat2s < sblat2.in ;
./xblat2d < dblat2.in ;
./xblat2c < cblat2.in ;
./xblat2z < zblat2.in )
Parameter 1 to routine SGEMV was incorrect
Mac OS BLAS parameter error in SGEMV , parameter #0, (unavailable), is 0
Parameter 1 to routine DGEMV was incorrect
Mac OS BLAS parameter error in DGEMV , parameter #0, (unavailable), is 0
Parameter 1 to routine CGEMV was incorrect
Mac OS BLAS parameter error in CGEMV , parameter #0, (unavailable), is 0
Parameter 1 to routine ZGEMV was incorrect
Mac OS BLAS parameter error in ZGEMV , parameter #0, (unavailable), is 0
Install Lapack Windows
So, I'm at a loss and could do with some direction. I'm not even sure if this is at all important to be honest, so any insight would be welcome.
Thanks in advance,
Daniel