#! /bin/bash #To install lapack in /share/apps/local/lib in a rocks linux, three possible altervatives are possible: #1. Easiest: Download and compile the library without any optimisation. This way is easiest but the library may not be optimised. The lapack source code can be downloaded from http://www.netlib.org/lapack/lapack-3.4.1.tgz. This will be implemented automatically by this script. #### NOTE: libblas is assumed to have been installed in /share/apps/local/lib. Else the script can't work correctly. cd /share/apps/configrepo #wget http://www.netlib.org/lapack/lapack-3.5.0.tgz wget http://www2.fizik.usm.my/tlyoon/Downloads/lapack-3.5.0.tgz tar -xzvf lapack-3.5.0.tgz cd lapack-3.5.0 #cp make.inc.example make.inc wget http://www2.fizik.usm.my/configrepo/howto/BLAS_and_LAPACK/make.inc . make ln -s /share/apps/configrepo/lapack-3.5.0/lib*.* /share/apps/local/lib #2. Slightly elaborate way is to follow the instruction found in http://math-atlas.sourceforge.net/atlas_install/node47.html. Basically it tells you how to obtain the optimised option for OPT while compiling the lapack. #3. Alternatively, one can also download and compiled atlas from http://sourceforge.net/projects/math-atlas/files/. Detail of compilation instruction is to be found in http://math-atlas.sourceforge.net/atlas_install/. The lapack library generated via atlas is supposed to be 'optimised' in comparison to that generated via the netlib. If the atlas lapack is available, it is preferred over the non-optimised lapack. Once complied successfully, a host of libraries will be found in the atlas directory, including the optimised liblapack. To install the atlas library simply follow the step-by-step instruction.