GotoBLAS

From GHER

Jump to: navigation, search

Compiling GotoBLAS on nic2

PREFIX=$HOME/opt/GotoBLAS-1.05
tar xzf GotoBLAS-1.05.tar.gz
cd GotoBLAS
make F_COMPILER=g77 BINARY64=1 SMP=1 -j 4 &> make.log
mkdir $PREFIX/lib
cp libgoto.a $PREFIX/lib
cd $PREFIX/lib
ln -s libgoto.a libblas.a
cd -

Contents

Lapack

with g77

PREFIX=$HOME/opt/lapack-3.1.1/
BLAS=$HOME/opt/GotoBLAS-1.05/lib/

wget http://www.netlib.org/lapack/lapack.tgz
tar zxf lapack.tgz
cd lapack-*
cp make.inc.example  make.inc
make FORTRAN=g77 LOADER=g77 OPTS="-funroll-all-loops -O3" NOOPT= PLAT=  \
 LAPACKLIB=liblapack.a  BLASLIB=$BLAS/libblas.a TIMER=INT_ETIME  lapacklib
mv -i liblapack.a $PREFIX/lib/
make clean

with ifort and GOTO BLAS

see http://www.netlib.org/lapack/lapack-3.2.2/INSTALL/make.inc.ifort

PREFIX=$HOME/opt/intel-11.1/lapack-3.3.1/

module load ict/compiler/64/11.1/038
module load gotoblas/penryn/64/1.26

mkdir -p $PREFIX/lib
wget http://www.netlib.org/lapack/lapack-3.3.1.tgz
tar xf lapack-3.3.1.tgz 
cd lapack-3.3.1
cp make.inc.example  make.inc
make FORTRAN=ifort LOADER=ifort OPTS="-O3" NOOPT="-O3 -fltconsistency -fp_port" PLAT= LAPACKLIB=liblapack.a  BLASLIB=$BLASDIR/libgoto.so TIMER=EXT_ETIME lapacklib
mv -i liblapack.a $PREFIX/lib/
make clean
# shared library
make FORTRAN=ifort LOADER=ifort OPTS="-O3 -fPIC" NOOPT="-O3 -fltconsistency -fp_port -fPIC" PLAT= LAPACKLIB=liblapack.so  BLASLIB=$BLASDIR/libgoto.so TIMER=EXT_ETIME ARCH=ifort ARCHFLAGS="-shared -o" RANLIB=touch lapacklib
mv -i liblapack.so $PREFIX/lib
PREFIX=$HOME/opt/pgi-9.0/lapack-3.3.1/
make FORTRAN=pgf90 LOADER=pgf90 OPTS="-O3" NOOPT="" PLAT= LAPACKLIB=liblapack.a  BLASLIB=$BLASDIR/libgoto.so TIMER=EXT_ETIME lapacklib
cp liblapack.a $PREFIX/lib

SuiteSparse

PREFIX=$HOME/opt/suitesparse-3.2.0
BLAS=$HOME/opt/GotoBLAS-1.05/lib/
LAPACK=$HOME/opt/lapack-3.1.1/lib/
PICFLAG=-fPIC

wget http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.2.0.tar.gz
mkdir -p $PREFIX/{lib,include/suitesparse}

tar zxf SuiteSparse-*.tar.gz
cd SuiteSparse/
tar xzf ../metis-4.0.tar.gz
echo "CFLAGS=$PICFLAG -O" >> UFconfig/UFconfig.mk
echo "F77FLAGS=$PICFLAG -O" >> UFconfig/UFconfig.mk
echo "BLAS=-L$BLAS -lblas -lg2c -lpthread" >> UFconfig/UFconfig.mk
echo "LAPACK=" >> UFconfig/UFconfig.mk
echo "OPTFLAGS = -O2 $PICFLAG" >> metis-4.0/Makefile.in
echo "CFLAGS = -O3 $PICFLAG" >> CXSparse/Lib/Makefile
cd metis-4.0/Lib
make AR="ar cr" RANLIB=ranlib
make -j $JOBS
cp {AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,CXSparse,UMFPACK}/Lib/lib*a metis-4.0/libmetis.a $PREFIX/lib/
cp {AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,CXSparse,UMFPACK}/Include/*h UFconfig/UFconfig.h  $PREFIX/include/suitesparse
Personal tools