Building BLAS Library using Intel and GNU Compiler


The reference resource can be found from Building BLAS library from Netlib. The current latest version of BLAS is dated 14th April 2011.

1. For Intel XE Compiler

# mkdir -p ~/src/
# cd ~/src/
# wget http://www.netlib.org/blas/blas.tgz
# tar -zxvf blas.tgz
# cd BLAS
# ifort -FI -w90 -w95 -cm -O3 -unroll -c *.f
# ar r libfblas.a *.o
# ranlib libfblas.a
# rm -rf *.o
# export BLAS=~/src/BLAS/libfblas.a
# ln -s libfblas.a libblas.a
# mv ~/src/BLAS /usr/local/

2. For 64-bits gfortran Compiler. Replace ” ifort -FI -w90 -w95 -cm -O3 -unroll -c *.f ” with

.........
# gfortran -O3 -std=legacy -m64 -fno-second-underscore -fPIC -c *.f
.........

The rest remains the same.

3. For 64-bits g77 Compiler. Replace ” ifort -FI -w90 -w95 -cm -O3 -unroll -c *.f ” with

............
# g77 -O3 -m64 -fno-second-underscore -fPIC -c *.f
............

The rest remains the same.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s