|
|
★ ★ ★ ★ 小木蟲(金幣+0.5):給個(gè)紅包,謝謝回帖交流 zzy870720z(金幣+3): 謝謝指教 2011-04-14 20:35:04
看看這里,
一)如果你堅(jiān)持要用intel ifort 11來進(jìn)行編譯。可以采取如下方式(siesta網(wǎng)站主頁上的方法,見http://www.icmab.es/siesta/)
在生成的arch.make文件中新加入
DUMMY_FOX= --enable-dummy
FFLAGS_DEBUG= -g -O2
而后在Obj文件夾中的makefile文件修改第148-153行,將這幾行寫成如下形式
$(FoX_configured):
(cd FoX; touch arch.make ; \
CONFIGURE="$(VPATH)/FoX/configure"; \
$$CONFIGURE VPATH="$(VPATH)/FoX" \
FC="$(FC_SERIAL)" FCFLAGS="$(FFLAGS_DEBUG)" \
--enable-wcml $(DUMMY_FOX) || false )
注意(cd FoX; touch arch.make ; \這一行前是一個(gè)Tab空格,而不是一個(gè)space空格
將這兩個(gè)地方修改好后,
make clen
make
之后生成的siesta可執(zhí)行文件并行計(jì)算不會(huì)出現(xiàn)問題。但要注意的是,arch.make文件中的優(yōu)化級(jí)別是FFLAGS=-g -O2或FFLAGS=-g -O1或FFLAGS=-g -O0,不能是FFLAGS=-g -O3,我試了一下FFLAGS=-g -O3,發(fā)現(xiàn)計(jì)算過程中出現(xiàn)下面的錯(cuò)誤
SPLIT: Orbitals with angular momentum L= 0
SPLIT: Basis orbitals for state 4s
izeta = 1
lambda = 1.000000
rc = 6.000769
energy = -0.359899
kinetic = 0.368794
potential(screened) = -0.728693
potential(ionic) = -6.200046
WARNING: Minimum split_norm parameter: 0.52689. Will not be able to generate orbital with split_norm = 0.15000
See manual for new split options
ERROR STOP from Node: 0
當(dāng)改用FFLAGS=-g -O2和FFLAGS=-g -O0或FFLAGS=-g -O1之后則沒用出現(xiàn)類似的錯(cuò)誤提示,具體原因我就沒去深究了。當(dāng)然不同的優(yōu)化級(jí)別在計(jì)算時(shí)間上會(huì)有一些差異。
比如用FFLAGS=-g -O2時(shí),運(yùn)行時(shí)間如下(用的Fe.fdf例子)
* Running on 8 nodes in parallel
>> Start of run: 6-DEC-2010 17:19:33
>> End of run: 6-DEC-2010 17:27:54
當(dāng)改用FFLAGS=-g -O0時(shí),運(yùn)行時(shí)間如下(用的Fe.fdf例子)
* Running on 8 nodes in parallel
>> Start of run: 6-DEC-2010 16:48:25
>> End of run: 6-DEC-2010 16:58:58
(二)如果你不使用ifort11編譯器,而是使用ifort10或以下的版本,建議配合使用openmpi來進(jìn)行并行計(jì)算。
1)安裝openmpi,詳細(xì)步驟不說了,只是在configure的時(shí)候我使用的是如下的命令:
./configure --prefix=要安裝的目錄 F77=ifort FC=ifort FCFLAGS=-em64t FFLAGS=-em64t
FCFLAGS和FFLAGS是告訴編譯器用的是64位的編譯器,如果機(jī)器不是64位的就不用了。
make
make install
安裝完成后還得添加環(huán)境變量,至于怎么添加,網(wǎng)上很多,搜索一下就知道了。
2)編譯siesta
步驟就寫了,大家都知道。下面是我的arch.make文件
#
# 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-unknown-linux-gnu--unknown
FPP=
FPP_OUTPUT=
FC=mpif90
RANLIB=ranlib
SYS=nag
SP_KIND=4
DP_KIND=8
KINDS=$(SP_KIND) $(DP_KIND)
FFLAGS=-g -O2 #-i-static
FPPFLAGS= -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DMPI
LDFLAGS=
FFLAGS_DEBUG= -g -O2 # whatever options you might need,guohuazhong
DUMMY_FOX= --enable-dummy # whatever options you might need,guohuazhong
ARFLAGS_EXTRA=
FCFLAGS_fixed_f=
FCFLAGS_free_f90=
FPPFLAGS_fixed_F=
FPPFLAGS_free_F90=
BLAS_LIBS=-L/public/software/intel/Compiler/11.1/059/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_lapack -lmkl_core -lguide -pthread
LAPACK_LIBS=-L/public/software/intel/Compiler/11.1/059/mkl/lib/em64t -lmkl_sequential -lmkl_core -pthread
BLACS_LIBS=-L/public/software/intel/Compiler/11.1/059/mkl/lib/em64t -lmkl_blacs_openmpi_lp64 -pthread
SCALAPACK_LIBS=-L/public/software/intel/Compiler/11.1/059/mkl/lib/em64t -lmkl_scalapack_lp64 -pthread
COMP_LIBS=
COMP_LIBS=dc_lapack.a liblapack.a libblas.a ######guohuazhong screened
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=/public/software/mpi/openmpi1.4.2-intel/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) $<
編譯成功,祝好運(yùn)! |
|