24小时热门版块排行榜    

CyRhmU.jpeg
查看: 3055  |  回复: 17
本帖产生 1 个 1ST强帖 ,点击这里进行查看
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

mayim2008

金虫 (正式写手)


[交流] 【求助】安装siesta2.0.2时如何编译arch.make??

汗,又遇到问题了,特请善良的好心的虫虫指点~~~~
前面编译MKL 和ifort都成功了
后来又安装了openmpi,可是,如果我不做并行计算,这个MPI不安装也行吧,安装了也没坏处吧?
俺是菜鸟啊,大侠们多多体谅啊~~
安装SIESTA2.0.2时,我的命令是这样的;
先 tar -zxvf siesta-2.0.2.tgz 解压缩
然后cd Src
然后cp  Sys/intel-mkl.make   arch.make  就是把Sys的intel-mkl.make文件拷贝到Src下,然后改名为arch.make吧
之后,是不是要修改arch.make呢
命令是vi  arch.make么?这个命令不太符合XP下的编辑习惯,有没有适合XP编辑下的命令呢??
然后,编译arch.make文件后,是不是输入$make就可以了?

下面是我的原始arch.make文件,没有做任何修改的
我应该改哪些参数呢?
我看了别人编译的一些例子,用红字标记的应该是要改的吧,怎么改呢?还有,貌似我的arch.make好像不完善啊?
求高人指点,小女子感激不尽!


我的系统是ubantu9.04
MKL是10.3.2.137
ifort是2011.2.137
openmpi是1.4.2
------------------------------------------
#
# This file is part of the SIESTA package.
#
# Copyright (c) Fundacion General Universidad Autonoma de Madrid:
# E.Artacho, J.Gale, A.Garcia, J.Junquera, P.Ordejon, D.Sanchez-Portal
# and J.M.Soler, 1996-2006.
#
# Use of this software constitutes agreement with the full conditions
# given in the SIESTA license, as signed by all legitimate users.
#
SIESTA_ARCH=intel-mkl#
# Intel fortran compiler for linux with mkl optimized blas and lapack
#
# Be sure to experiment with different optimization options.
# You have quite a number of combinations to try...
#
FC=ifc
#
FFLAGS= -w -mp -tpp5 -O3
FFLAGS_DEBUG= -g
LDFLAGS=-Vaxlib
COMP_LIBS=
RANLIB=echo
#
NETCDF_LIBS=
NETCDF_INTERFACE=
DEFS_CDF=
#
MPI_INTERFACE=
MPI_INCLUDE=
DEFS_MPI=
#
GUIDE=/opt/intel/mkl/lib/32/libguide.a
LAPACK=/opt/intel/mkl/lib/32/libmkl_lapack.a
BLAS=/opt/intel/mkl/lib/32/libmkl_p3.a
#G2C=/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a
LIBS=$(LAPACK) $(BLAS) $(G2C) $(GUIDE)  -lpthread
SYS=bsd
DEFS= $(DEFS_CDF) $(DEFS_MPI)
#
.F.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $<
.f.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS)   $<
.F90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $<
.f90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS)   $<
#

[ Last edited by mayim2008 on 2011-4-6 at 22:01 ]
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

» 抢金币啦!回帖就可以得到:

查看全部散金贴

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

acridine

木虫 (正式写手)



zzy870720z(金币+1): 谢谢指点 2011-04-13 22:48:30
mayim2008(金币+5): 非常感谢~~ 2011-04-14 19:38:44
现在的提示是正常的了,是说找不到文件
File not found '/home/juan/intel/mkl/lib/ia32/libguide.a"

google了一下libguide.a,第一条结果就是说
libguide has been deprecated and removed from our earlier versions itself.  Now, you have to link with libiomp library which conforms to the latest OpenMP standard.   Please refer the MKL userguide for more detals.
似乎新版本里 libguide 被替换成了libiomp

你找找看有没有类似 libiomp.a 的文件
10楼2011-04-13 22:38:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 18 个回答

acridine

木虫 (正式写手)


★ ★ ★
zzy870720z(金币+3, 1ST强帖+1): 谢谢详细指点 2011-04-06 23:42:17
mayim2008(金币+5): 太感谢了~~~ 2011-04-07 18:15:16
我没有安装过siesta,不了解有什么特别注意的地方,说下我知道的
首先,用不惯vi 你可以使用 gedit arch.make  来编辑它

至于文件中需要修改的地方
GUIDE=/opt/intel/mkl/lib/32/libguide.a
LAPACK=/opt/intel/mkl/lib/32/libmkl_lapack.a
BLAS=/opt/intel/mkl/lib/32/libmkl_p3.a
这些是数学库的路径,应该设置成你系统的情况,也就是说找到libmkl_p3.a,libmkl_lapack.a,libguide.a 在哪,把正确的路径添加到这里。
另外FC=ifc 这个是你的fortran编译器命令,现在intel的命令应该是ifort吧
MPI_... 相关行的是设置并行的,如果你不打算并行计算可以忽略

你可以试着执行下编译,看有什么提示
编译的命令应该是make,不过也可能需要加入选项,比如make -all之类的。你可以看下程序的主文件夹下有没有Readme,或者打开Makefile文件看文件最开始有没有相关的提示
2楼2011-04-06 23:15:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
★ ★ ★
zzy870720z(金币+3): 谢谢分享,呵呵 2011-04-07 16:18:39
mayim2008(金币+5): 谢谢啊~~ 2011-04-07 18:15:38
引用回帖:
Originally posted by mayim2008 at 2011-04-06 14:57:16:
汗,又遇到问题了,特请善良的好心的虫虫指点~~~~
前面编译MKL 和ifort都成功了
后来又安装了openmpi,可是,如果我不做并行计算,这个MPI不安装也行吧,安装了也没坏处吧?
俺是菜鸟啊,大侠们多多体谅啊~~
...

我也是用的mkl编译的。只不过我用的是64位的,当然也有对应的32位的。可以类比一下。
#
# This file is part of the SIESTA package.
#
# Copyright (c) Fundacion General Universidad Autonoma de Madrid:
# E.Artacho, J.Gale, A.Garcia, J.Junquera, P.Ordejon, D.Sanchez-Portal
# and J.M.Soler, 1996- .
#
# Use of this software constitutes agreement with the full conditions
# given in the SIESTA license, as signed by all legitimate users.
#
.SUFFIXES:
.SUFFIXES: .f .F .o .a .f90 .F90

SIESTA_ARCH=x86_64-REHL-5.4

FPP=
FPP_OUTPUT=
FC=mpif90
RANLIB=ranlib

SYS=nag

SP_KIND=4
DP_KIND=8
KINDS=$(SP_KIND) $(DP_KIND)

FFLAGS= -O2 -i-static
FFLAGS_DEBUG= -g
LDFLAGS=-Vaxlib
FPPFLAGS= -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DMPI

ARFLAGS_EXTRA=

FCFLAGS_fixed_f=
FCFLAGS_free_f90=
FPPFLAGS_fixed_F=
FPPFLAGS_free_F90=

BLAS_LIBS=-L/home/zhanggp/intel/mkl/10.0.2.018/lib/em64t -lmkl_solver_lp64 -lmkl_intel_lp64 -lguide
LAPACK_LIBS=-L/home/zhanggp/intel/mkl/10.0.2.018/lib/em64t -lmkl_sequential -lmkl_core
BLACS_LIBS=-L/home/zhanggp/intel/mkl/10.0.2.018/lib/em64t -lmkl_blacs_openmpi_lp64
SCALAPACK_LIBS=-L/home/zhanggp/intel/mkl/10.0.2.018/lib/em64t -lmkl_scalapack_lp64

COMP_LIBS=

NETCDF_LIBS=
NETCDF_INTERFACE=

LIBS=$(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(NETCDF_LIBS)

#SIESTA needs an F90 interface to MPI
#This will give you SIESTA's own implementation
#If your compiler vendor offers an alternative, you may change
#to it here.
MPI_INTERFACE= libmpi_f90.a
MPI_INCLUDE=/home/zhanggp/software/openmpi-1.2.6/include

#Dependency rules are created by autoconf according to whether
#discrete preprocessing is necessary or not.
.F.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F)  $<
.F90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F90) $<
.f.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f)  $<
.f90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90)  $<
3楼2011-04-07 15:18:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

mayim2008

金虫 (正式写手)


引用回帖:
Originally posted by acridine at 2011-04-06 23:15:47:
我没有安装过siesta,不了解有什么特别注意的地方,说下我知道的
首先,用不惯vi 你可以使用 gedit arch.make  来编辑它

至于文件中需要修改的地方
GUIDE=/opt/intel/mkl/lib/32/libguide.a
LAPACK=/opt/in ...

你好,今天去编译了一下,修改了如下参数,
FC=ifort
LAPACK=/home/juan/intel/mkl/lib/ia32/libmkl_lapack.a
另,没有libmkl_p3.a这个文件啊,只有libmkl_p4.so文件
也找不到libguide.a文件

make后
出现了:
Compilation architecture to be used: intel-mkl
If this is not what you want, create the right
arch.make file using the models in Sys

Hit ^C to abort...

==> Incorporating information about present compilation (compiler and flags)
make[1]: Entering directory `/home/syzx/TEM/siesta-2.0.2/Src'
ifort -c -w -mp -tpp5 -O3     compinfo.F90
make[1]: ifort: Command not found
make[1]: *** [compinfo.o] Error 127
make[1]: Leaving directory `/home/syzx/TEM/siesta-2.0.2/Src'
make: *** [version] Error 2
----------------------------------------------
4楼2011-04-08 22:07:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复(可上传附件)
信息提示
请填处理意见