BLAS+BLACS+LAPACK+SCALAPACK安装

最快的安装是用下面的scalapack_installer,它将自动联网安装SCALAPACK以及所需要的BLAS, BLACS,LAPACK。

 

下面是简短说明:

 

INTRODUCTION

The ScaLAPACK installer is a set of python scripts developed to ease
the installation of the ScaLAPACK library. It can automatically
download, configure and compile the ScaLAPACK including all its
dependencies that are BLAS, LAPACK and BLACS libraries. All it needs
is the mpi C and FORTRAN compilers mpicc and mpif77 (note that the
names of these compilers may be different than mpicc and mpif77 on
some systems). Please note that this is an alpha version and, even if
it has been tested on a wide set of systems, may not work. In case you
encounter a problem, your feedback would be greatly appreaciated and
would be very useful to improve the quality of this installer.
Please submit your complaints and suggestions to scalapack@cs.utk.edu
or on the lapack/scalapack forum: http://icl.cs.utk.edu/lapack-forum/

Note: If you want use a proxy for downloading, the http_proxy environment variable has to be set.

If the required packages cannot be automatically downloaded (for
example, because no network connection is available on the system),
you can take them any way you like from the following URLs and place
them in the build directory (if the directory does not exist, create
it):

BLAS : http://netlib.org/blas/blas.tgz


LAPACK : http://netlib.org/lapack/lapack.tgz


BLACS : http://netlib.org/blacs/mpiblacs.tgz


ScaLAPACK : http://netlib.org/scalapack/scalapack-1.8.0.tgz



Please note that, in the case where the installer is asked to
automatically download and install the BLAS library, the reference
BLAS is installed and, thus, very low performance is to be expected.
It is strongly recommended that you use an highly optimized BLAS
library (like ATLAS, MKL, GotoBLAS, ESSL etc.) and provide a path to
its location through the --blaslib flag.


压缩包内带说明。

 

下载:

scalapack_installer.tgz
http://www.netlib.org/scalapack/scalapack_installer.tgz

 

需要注意的是,这个脚本安装工具会自动设置系统的BLAS链接,如果你需要一个更好的BLAS库,建议你安装优化的BLAS如ATLAS, MKL, GotoBLAS, ESSL等,并且将-blaslib参数指向该库位置。

 

 

tar xzvf

./setup.py

--prefix=/opt/mathlibs/scalapack /

--mpibindir=/opt/mpich/intel/bin /

--mpiincdir=/opt/mpich/intel/include /

--blaslib=/opt/mathlibs/gotolib/libgoto.a /

--f90=gfortran /

--downblacs /

--downlapack

 

root@node8:/softwareBAK/mathlibs/scalapack/scalapack_installer_0.96#./setup.py --prefix=/opt/mathlibs/scalapack --mpibindir=/opt/mpich/ch-p4/bin --mpiincdir=/opt/mpich/ch-p4/include --blaslib=/opt/mathlibs/gotolib/1.1.26/libgoto.a --f90=gfortran --downblacs --downlapack

========================================

Setting up the framework

 

Install directory is... /opt/mathlibs/scalapack

MPI bin dir is /opt/mpich/ch-p4/bin

MPI include dir is /opt/mpich/ch-p4/include

The Fortran 90/95 compiler is gfortran

mpicc : /opt/mpich/ch-p4/bin/mpicc

mpif77 : /opt/mpich/ch-p4/bin/mpif77

Checking if mpicc works... yes

Checking if mpif77 works... yes

Checking if the Fortran 90/95 compiler works... yes

Setting Fortran mangling... -DAdd_

Setting download command...

Checking availability of urllib... available

Testing urllib... not working

Checking availablility of wget... available

Testing wget... working

Setting ranlib command... /usr/bin/ranlib

Detecting Fortran 77 compiler... unknown

Detecting C compiler... unknown

Selected C compiler flags: -O3

Selected Fortran77 compiler flags: -O3

Selected loader flags (C main):

Selected loader flags (F77 main):

Selected NOOPT flags:

Checking loader... works

 

========================================

BLAS installation/verification

========================================

Checking if provided BLAS works... yes

 

========================================

Lapack installation/verification

========================================

Download and install LAPACK from netlib.org

Download LAPACK... done

Unzip and untar LAPACK... done

Installing lapack-3.2.1 ...

Setting ETIME... EXT_ETIME

Writing make.inc... done.

Compiling lapack-3.2.1 (this will take several minutes)... Installation of LAPACK successful.

(log is in /opt/mathlibs/scalapack/log/laplog )

 

========================================

BLACS installation/verification

========================================

Downloading BLACS... done

Unzip and untar BLACS... done

Setting TRANSCOMM... -DCSameF77

 

Writing Bmake.inc... done.

Compiling BLACS...done

(log is in /opt/mathlibs/scalapack/log/blacslog )

 

========================================

ScaLAPACK installer is starting now. Buckle up!

========================================

Installing scalapack-1.8.0 ...

Writing SLmake.inc... done.

Compiling ScaLAPACK... Installation of ScaLAPACK successful..

(log is in /opt/mathlibs/scalapack/log/scalog )

Compiling test routines...

done

done. ScaLAPACK is installed. Use it in moderation :-)

 

******************************************************

******************************************************

 

ScaLAPACK installation completed.

 

 

Your BLAS library is:

/opt/mathlibs/gotolib/1.1.26/libgoto.a

 

Your BLACS libraries are:

/opt/mathlibs/scalapack/lib/blacs.a

/opt/mathlibs/scalapack/lib/blacsC.a

/opt/mathlibs/scalapack/lib/blacsF77.a

 

Your LAPACK library is:

/opt/mathlibs/scalapack/lib/libreflapack.a

 

Your ScaLAPACK library is:

/opt/mathlibs/scalapack/lib/libscalapack.a

 

Log messages are in the

/opt/mathlibs/scalapack/log

directory.

 

The Scalapack testing programs are in:

/opt/mathlibs/scalapack/build/scalapack-1.8.0/TESTING

 

The

/opt/mathlibs/scalapack/build

directory contains the source code of the libraries

that have been installed. It can be removed at this time.

 

******************************************************

******************************************************

 

 

 

 

其他参考:

 

BLACS安装说明

http://www.netlib.org/blacs/.

 

Installing and testing BLACS and ScaLapack using gnu/pgi compilers
http://luke.eng.uci.edu/rmc3po/scalapack.notes

 

论坛:

http://icl.cs.utk.edu/lapack-forum

 

 

错误1:

COMMON: in check_linking: cannot link

Cannot link a C main program to a Fortran77 subroutine

Make sure that the appropriate flags are passed to the linker.

command is: /opt/mpich/intel/bin/mpif77 -o lnk tmpf.o tmpc.o

error is:

****************************************

tmpc.o: In function `main':

tmpc.c:(.text+0x0): multiple definition of `main'

/opt/intel/Compiler/11.1/059/lib/intel64/for_main.o:/export/users/nbtester/efi2linux_nightly/branch-11_1/20091013_000000/libdev/frtl/src/libfor/for_main.c:(.text+0x0): first defined here

ld: Warning: size of symbol `main' changed from 80 in /opt/intel/Compiler/11.1/059/lib/intel64/for_main.o to 64 in tmpc.o

/opt/intel/Compiler/11.1/059/lib/intel64/for_main.o: In function `main':

/export/users/nbtester/efi2linux_nightly/branch-11_1/20091013_000000/libdev/frtl/src/libfor/for_main.c:(.text+0x38): undefined reference to `MAIN__'

 

 

解决方法:

mpich是用intel编译器编译的,用gcc重新编译一个即可。

 


错误2:

ScaLAPACK: error building ScaLAPACK test routines

stderr:

****************************************

/opt/mathlibs/gotolib/1.1.26/libgoto.a(sgemm_incopy.o): In function `sgemm_incopy':

../kernel/x86_64/../generic/gemm_ncopy_8.c:(.text+0x9a9): undefined reference to `_intel_fast_memcpy'

collect2: ld returned 1 exit status

make[1]: *** [/opt/mathlibs/scalapack/build/scalapack-1.8.0/TESTING/xspblas1tst] Error 1

make: *** [pblasexe] Error 2

 

解决:
libgoto.a是用intel编译器编译的,换成gcc编译即可

 

 

  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
安装BLASLAPACK,您可以按照以下步骤进行操作: 1. 首先,确保您的系统中已经安装了C和Fortran编译器。这些编译器对于编译BLASLAPACK库是必需的。 2. 下载BLAS库。您可以从官方网站或其他可靠的资源下载BLAS库的源代码。 3. 解压下载的BLAS源代码文件。 4. 进入解压后的BLAS目录,并打开Makefile文件。 5. 在Makefile文件中,根据您的系统配置,可能需要进行一些编辑。确保设置正确的编译器和编译选项。例如,您可能需要设置正确的编译器路径、优化标志等。 6. 执行以下命令编译和安装BLAS库: ``` make make PREFIX=/path/to/installation install ``` 将 "/path/to/installation" 替换为您希望安装BLAS库的路径。 7. 下载LAPACK库。您可以从官方网站或其他可靠的资源下载LAPACK库的源代码。 8. 解压下载的LAPACK源代码文件。 9. 进入解压后的LAPACK目录,并打开make.inc文件。 10. 在make.inc文件中,根据您的系统配置,可能需要进行一些编辑。确保设置正确的编译器和编译选项。例如,您可能需要设置正确的编译器路径、优化标志等。 11. 执行以下命令编译和安装LAPACK库: ``` make make PREFIX=/path/to/installation install ``` 将 "/path/to/installation" 替换为您希望安装LAPACK库的路径。 安装完成后,您就可以在您的C或Fortran项目中使用BLASLAPACK库了。请注意,上述步骤是基本的安装过程,具体步骤可能因您的系统配置和要求而有所不同。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值