载入中
自定义HTML载入中... loading
linux下ARPACK下载安装及配置祥解 [原创 2008-04-19 16:35:47]   
字体变小 字体变大

1)ARPACK下载:http://www.caam.rice.edu/software/ARPACK/
2)ARPACK安装:
   a)解压缩:tar -zxvf ****.tar.z
   b)cd ARPACK
     vi ARmake.inc(安装的关键在于该文件的配置,下面给出我的配置文件,附上说明,用红字标明)

###########################################################################
#
#  Program:         ARPACK
#
#  Module:          ARmake.inc
#
#  Purpose:         Top-level Definitions
#
#  Creation date:   February 22, 1996
#
#  Modified:
#
#  Send bug reports, comments or suggestions to arpack@caam.rice.edu
#
############################################################################
#
# %---------------------------------%
# |  SECTION 1: PATHS AND LIBRARIES |
# %---------------------------------%
#
#
# %--------------------------------------%
# | You should change the definition of  |
# | home if ARPACK is built some place   |
# | other than your home directory.      |
# %--------------------------------------%
#
#home = $(HOME)/ARPACK
home= /usr/local/ARPACK (此安装路径要自己修改,指向要安装的目录)
#
#  %--------------------------------------%
#  | The platform identifier to suffix to |
#  | the end of library names             |
#  %--------------------------------------%
#
PLAT = LINUX     (在此指出操作平台,如LINUX,SGI,等)
#
#  %------------------------------------------------------%
#  | The directories to find the various pieces of ARPACK |
#  %------------------------------------------------------%
#
BLASdir      = $(home)/BLAS
LAPACKdir    = $(home)/LAPACK
UTILdir      = $(home)/UTIL
SRCdir       = $(home)/SRC
#
DIRS        = $(BLASdir) $(LAPACKdir) $(UTILdir) $(SRCdir)(如果你的机器已经装了BLAS及LAPACK2.0,那么就可以把该行前面加#,把其注释掉,把下面那行的开头的#去掉。)
#
# %-------------------------------------------------------------------%
# | Comment out the previous line and uncomment the following         |
# | if you already have the BLAS and LAPACK installed on your system. |
# | NOTE: ARPACK assumes the use of LAPACK version 2 codes.           |
# %-------------------------------------------------------------------%
#
#DIRS         = $(UTILdir) $(SRCdir)
#
# %---------------------------------------------------%
# | The name of the libraries to be created/linked to |
# %---------------------------------------------------%
#
ARPACKLIB  = $(home)/libarpack_$(PLAT).a
LAPACKLIB =
BLASLIB =
#
ALIBS =  $(ARPACKLIB) $(LAPACKLIB) $(BLASLIB)
#
#
# %---------------------------------------------------------%
# |                  SECTION 2: COMPILERS                   |
# |                                                         |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options.  You need to make sure |
# | these are correct for your system.                      |
# %---------------------------------------------------------%
#
#
# %------------------------------%
# | Make our own suffixes' list. |
# %------------------------------%
#
.SUFFIXES:
.SUFFIXES: .f .o
#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
 @$(ECHO) "Unknown target $@, try:  make help"
#
# %-------------------------------------------%
# |  Command to build .o files from .f files. |
# %-------------------------------------------%
#
.f.o:
 @$(ECHO) Making $@ from $<
 @$(FC) -c $(FFLAGS) $<
#
# %-----------------------------------------%
# | Various compilation programs and flags. |
# | You need to make sure these are correct |
# | for your system.                        |
# %-----------------------------------------%
#
FC      = pgf77   (指出你的fortran编译器,我这里用的是PGI的fortran77编译器)
FFLAGS = -tp k8-64 -fastsse -mcmodel=medium (要与你的上面的Fortran的设置相对应)

LDFLAGS =
CD      = cd

ECHO    = echo

LN      = ln
LNFLAGS = -s

MAKE    = /usr/bin/make

RM      = rm
RMFLAGS = -f

SHELL   = /bin/sh
#
#  %----------------------------------------------------------------%
#  | The archiver and the flag(s) to use when building an archive   |
#  | (library).  Also the ranlib routine.  If your system has no    |
#  | ranlib, set RANLIB = touch.                                    |
#  %----------------------------------------------------------------%
#
AR = ar
ARFLAGS = rv
#RANLIB  = touch
RANLIB   = ranlib
#
# %----------------------------------%
# | This is the general help target. |
# %----------------------------------%
#
help:
 @$(ECHO) "usage: make ?"

 

这样设置完毕后,保存,然后输入命令,make lib,就一路默认下去就ok了。

为了查看安装成功与否,到目录/EXAMPLES/SIMPLE,输入命令:make snsimp,如果编译成功,./snsimp运行就ok了,如果安装过程中还有其他问题,请留言,我如果有时间就会及时回复。

分类: linux
票数:
什么是“我顶”?
点击数:    评论数:
本文章引用通告地址(TrackBack Ping URL)为:
本文章尚未被引用。
发表评论
大 名:
(不填写则显示为匿名者)
网 址:
(您的网址,可以不填)
标 题:
内 容:
请根据下图中的字符输入验证码:
(您的评论将有可能审核后才能发表)
和讯个人门户 v1.0 | 和讯部落 | 客服中心