BLAS/LAPACK 3.5.0 Install on Mac OS X 10.6.8

Post here if you have a question about the installation process

BLAS/LAPACK 3.5.0 Install on Mac OS X 10.6.8

Postby dvc2509 » Tue Jul 22, 2014 3:28 am

Hi, I'm brand new when it comes to BLAS and LAPACK and could use some help.

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


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
Everything else is as it was when I d/l'ed it.

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



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
dvc2509
 
Posts: 1
Joined: Tue Jul 22, 2014 3:04 am

Re: BLAS/LAPACK 3.5.0 Install on Mac OS X 10.6.8

Postby admin » Mon Aug 04, 2014 4:32 pm

Hey Daniel,
First LAPACK is included in the Mac OS Framework.
It is installed on your mac once you install XCODE or the Developer package.
Look here on how to use it https://developer.apple.com/library/mac ... ate.7.html
-framework Accelerate

The easiest way would be to use the cmake install.
Just grab cmake from cmake.org and launch the cmake GUI.

Let me now how it goes from there.
Julie
admin
Site Admin
 
Posts: 609
Joined: Wed Dec 08, 2004 7:07 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest