I wanted to install BLAS, CBLAS, LAPACK and OpenBLAS libraries from source using available packages you can download here openblas and lapack, blas/cblas.
Firstly I removed my system blas/cblas and lapack libraries, but unfortunately atlas library couldn't be uninstalled (I can either have both blas and lapack or atlas - can't remove them all). I didn't bother and started compiling downloaded libraries cause I thought that after installation I would be able to remove atlas.
Building process was based on this tutorial. For completeness I will list the steps:
OpenBLAS. After editing Makefile.rule (NO_CBLAS=1, NO_LAPACK=1, NO_LAPACKE=1) file I run the following code:
make FC=gfortran sudo make PREFIX=/usr/local/ install
CBLAS. After editing Makefile.in (apart from -lpthread I needed to add -pthread flag):
make cd lib ar -x libcblas.a gfortran -lopenblas -shared -o libcblas.so *.o sudo cp libcblas.* /usr/local/lib/
LAPACK. After editing make.inc file:
make lapacklib mkdir tmp cd tmp cp ../liblapack.3.6.0.a . ar -x liblapack.3.6.0.a gfortran -lopenblas -lcblas -shared -o liblapack.3.6.0.so *.o sudo cp liblapack.3.6.0.* /usr/local/lib cd /usr/local/lib sudo ln -sn liblapack.3.6.0.a liblapack.a sudo ln -sn liblapack.3.6.0.so liblapack.so
LAPACKE. I edited make.inc file for gcc in the following way:
CC = gcc CFLAGS = -O3 -march=native -m64 -fomit-frame-pointer -fPIC
Then I run:
make lapackelib mkdir tmpe cd tmpe cp ../liblapacke.a . ar -x liblapacke.a gfortran -lopenblas -lcblas -shared -o liblapacke.so *.o sudo cp liblapacke.* /usr/local/lib
BLAS. I edited make.inc file:
FORTRAN = gfortran OPTS = -O3 -march=native -m64 -fomit-frame-pointer -fPIC DRVOPTS = $(OPTS) NOOPT = -O0 -fPIC LOADER = gfortran LOADOPTS = -lopenblas -lcblas
and run:
make gfortran -lopenblas -shared -o libblas.so *.o sudo cp libblas.* /usr/local/lib/
Now I have my static and shared libraries all placed in /usr/local/lib directory and I want to tell somehow my linux mint 17.2 system that I have them installed so I can finally uninstall atlas. Any ideas how to do it?
My general goal was to properly set OpenBLAS so I wanted to compile from source all other libraries also. I also want to check if my libraries are working or maybe I did something wrong.
Also my long term goal is to install Arpack and SuperLU working with OpenBLAS and then finally install Armadillo library (C++).