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

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    about ARPACK++ installing

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/8659

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月6日 下午7:53
下一篇 2023年2月6日 下午7:54

相关推荐