about ARPACK++ installing

first reference to https://help.ubuntu.com/community/Arpack%2B%2B

1.apt-get install libarpack2-dev (gfortran已安装)

注意:不安装libsuperlu3-dev, because it will hapen "segment fault", such like running arpack++.examples.nonsym.lnsymgsh although they can be compiled successfully.

Because ARPACK++ only support superlu 2.0.

2. compile superlu 2.0

download superlu 2.0 source code.

Because my system is ubuntu, so I have to modify make.inc of superlu.Because I already install blas library , so as README says, set BLASDEF = -DUSE_VENDOR_BLAS BLASLIB = <your blas path>.

PLAT = LINUX          CFLAGS = -02 -g(just simple setting, you can search CFLAGS information or refer

http://blog.chinaunix.net/u3/94102/showart_1922415.html, you can set more, then make superlu better work)

3. install ARPACK++

download arpack++ 1.2 (beta version) at http://www.ime.unicamp.br/~chico/arpack++/ and the patch for arpac++ 1.2 at http://reuter.mit.edu/index.php/software/arpackpatch/ in the same directory

open with an editor the patch file arpack++1.2.patch.diff

gedit arpack++1.2.patch.diff

and change the (should be 9362th) line

+FORTRAN_LIBS = -lg2c

into

+FORTRAN_LIBS = -lgfortran -lgfortranbegin -lnsl

then untar arpack++

tar -zxvf arpack++.tar.gz

and check that it is version 1.2 with the command

head -1 arpack++/README

that should return the string

ARPACK++ version 1.2. Feb 20, 2000.

now apply the patch

cp arpack++1.2.patch.diff arpack++/cd arpack++patch -p 1 < arpack++1.2.patch.diff

Compiling with ARPACK++

at this point arpack++ should be working: as it is only a c++ interface to arpack, there are no libraries but only header files to be included into your c++ code; therefore you need to compile with

-I $whereisarpack/arpack++/include

where you should substitute to $whereisarpack the place where arpack++.tar.gz has been untarred

4. test

cd $whereisarpack/arpack++/examples/superlu/sym
make

(note: you must modify make.inc of arpack++: link your supelu 2.0 library)

转载于:https://www.cnblogs.com/europelee/archive/2010/03/09/3388669.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值