#! /bin/bash # Run this script to automate installation of blas lib in a Rocks linux system. # Run this script as su to install blas library in /share/apps/local/lib/blas. mkdir /share/apps/local mkdir /share/apps/local/lib cd /share/apps/configrepo wget http://www.netlib.org/blas/blas.tgz #gunzip blas.tgz #tar xf blas.tar tar -xzvf blas.tgz cd BLAS gfortran -shared -O3 *.f -o libblas.so -fPIC #A shared library libblas.so is built gfortran -c -O3 *.f # compile all of the .f files to produce .o files ar rv libblas.a *.o # combine the .o files into a library cp libblas.a /share/apps/local/lib cp libblas.so /share/apps/local/lib