| 18 | 1/1 | 返回列表 |
| 查看: 3317 | 回復(fù): 17 | |||
| 本帖產(chǎn)生 1 個(gè) 1ST強(qiáng)帖 ,點(diǎn)擊這里進(jìn)行查看 | |||
[交流]
【求助】安裝siesta2.0.2時(shí)如何編譯arch.make??
|
|||
|
汗,又遇到問(wèn)題了,特請(qǐng)善良的好心的蟲蟲指點(diǎn)~~~~ 前面編譯MKL 和ifort都成功了 后來(lái)又安裝了openmpi,可是,如果我不做并行計(jì)算,這個(gè)MPI不安裝也行吧,安裝了也沒(méi)壞處吧? 俺是菜鳥啊,大俠們多多體諒啊~~ 安裝SIESTA2.0.2時(shí),我的命令是這樣的; 先 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么?這個(gè)命令不太符合XP下的編輯習(xí)慣,有沒(méi)有適合XP編輯下的命令呢?? 然后,編譯arch.make文件后,是不是輸入$make就可以了? 下面是我的原始arch.make文件,沒(méi)有做任何修改的 我應(yīng)該改哪些參數(shù)呢? 我看了別人編譯的一些例子,用紅字標(biāo)記的應(yīng)該是要改的吧,怎么改呢?還有,貌似我的arch.make好像不完善。 求高人指點(diǎn),小女子感激不盡! ![]() 我的系統(tǒng)是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=bsdDEFS= $(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 ] |
» 搶金幣啦!回帖就可以得到:
+1/85
+1/82
+1/81
+1/81
+2/58
+1/31
+1/28
+1/20
+1/14
+1/9
+1/7
+1/6
+2/4
+1/4
+1/4
+1/3
+1/3
+1/2
+1/1
+1/1
木蟲 (正式寫手)
|
我沒(méi)有安裝過(guò)siesta,不了解有什么特別注意的地方,說(shuō)下我知道的 首先,用不慣vi 你可以使用 gedit arch.make 來(lái)編輯它 至于文件中需要修改的地方 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 這些是數(shù)學(xué)庫(kù)的路徑,應(yīng)該設(shè)置成你系統(tǒng)的情況,也就是說(shuō)找到libmkl_p3.a,libmkl_lapack.a,libguide.a 在哪,把正確的路徑添加到這里。 另外FC=ifc 這個(gè)是你的fortran編譯器命令,現(xiàn)在intel的命令應(yīng)該是ifort吧 MPI_... 相關(guān)行的是設(shè)置并行的,如果你不打算并行計(jì)算可以忽略 你可以試著執(zhí)行下編譯,看有什么提示 編譯的命令應(yīng)該是make,不過(guò)也可能需要加入選項(xiàng),比如make -all之類的。你可以看下程序的主文件夾下有沒(méi)有Readme,或者打開Makefile文件看文件最開始有沒(méi)有相關(guān)的提示 |
木蟲 (著名寫手)
|
我也是用的mkl編譯的。只不過(guò)我用的是64位的,當(dāng)然也有對(duì)應(yīng)的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) $< |
|
你好,今天去編譯了一下,修改了如下參數(shù), FC=ifort LAPACK=/home/juan/intel/mkl/lib/ia32/libmkl_lapack.a 另,沒(méi)有l(wèi)ibmkl_p3.a這個(gè)文件啊,只有l(wèi)ibmkl_p4.so文件 也找不到libguide.a文件 make后 出現(xiàn)了: 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 ---------------------------------------------- |
木蟲 (正式寫手)
|
這個(gè)是提示你編譯器命令不對(duì)。 我印象中你前一個(gè)貼提到過(guò)編譯器安裝成功之后是用ifort命令測(cè)試的吧,可能我記差了,總之這里應(yīng)該是你的編譯器命令,如果編譯器安裝測(cè)試成功了是不會(huì)提示Command not found的 另外這些數(shù)據(jù)庫(kù)名稱我只是復(fù)制的你貼的內(nèi)容,不是說(shuō)正確的名字就是這些。 比如BLACS_LIBS= 對(duì)應(yīng)的是Blacs庫(kù),真實(shí)的名字中肯定會(huì)含有blacs的,但具體的名字肯定千奇百怪的,比如樓上兄弟用的em64t -lmkl_blacs_openmpi_lp64大概是表示: 64位機(jī)器,openmpi并行編譯的mkl中的blacs庫(kù),你的文件名是什么還是需要自己找一下的。 |
木蟲 (正式寫手)
|
應(yīng)該是沒(méi)錯(cuò), 那么你在設(shè)置環(huán)境變量之后有沒(méi)有測(cè)試過(guò)ifort命令呢?在終端輸入ifort命令試驗(yàn)一下 一般出現(xiàn) ifort: Command not found 表示系統(tǒng)不識(shí)別ifort是什么意思,表示編譯器安裝或環(huán)境變量設(shè)置有誤。 如果設(shè)置正確,系統(tǒng)見到ifort會(huì)啟動(dòng)fortran編譯器去編譯接下來(lái)的內(nèi)容,由于只輸入了ifort,提示會(huì)是 Command line error: no files specified; for help type "ifort -help" 這和Command not found 是完全不同的 |
|
你好,我今天去測(cè)試了 ifort編譯是成功的,出現(xiàn)了Command line error: no files specified; for help type "ifort -help" 然后,我又修改了: BLAS=/home/juan/intel/mkl/lib/ia32/libmkl_blas95.a GUIDE文件名始終找不到,不知道為什么 MAKE之后出現(xiàn): ifort:command line remark #10010 : option" -Vaxlib" is deprecated and will beremoved in a future release. see "-help deprecated" ifort:error #10236:File not found '/home/juan/intel/mkl/lib/ia32/libguide.a" make: ***[siesta] error 1 怎么回事呢? GUIDE文件名就是沒(méi)看到啊 |
木蟲 (正式寫手)
|
現(xiàn)在的提示是正常的了,是說(shuō)找不到文件 File not found '/home/juan/intel/mkl/lib/ia32/libguide.a" google了一下libguide.a,第一條結(jié)果就是說(shuō) 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 你找找看有沒(méi)有類似 libiomp.a 的文件 |
|
你好,我今天去看了,并沒(méi)有l(wèi)ibiomp文件啊 然后,我刪除了GUIDE=、增加了BLACS=*****,SCALAPACK=***** 先make clean 后,再make,出現(xiàn)了: ifort: command line remark #10010: option '-Vaxlib' is deprecated and will be removed in a future release. See '-help deprecated' chkgmx.o: In function `chkgmx_': chkgmx.f:(.text+0x2f5): undefined reference to `ddot_' chkgmx.f:(.text+0x325): undefined reference to `ddot_' denmat.o: In function `denmat_': denmat.F:(.text+0x1b19): undefined reference to `dscal_' denmat.F:(.text+0x1b30): undefined reference to `dscal_' dhscf.o: In function `dhscf_': dhscf.F:(.text+0x14e1): undefined reference to `ddot_' dhscf.F:(.text+0x150c): undefined reference to `ddot_' dhscf.F:(.text+0x158d): undefined reference to `ddot_' dhscf.F:(.text+0x15b8): undefined reference to `ddot_' dhscf.F:(.text+0x3d98): undefined reference to `ddot_' dhscf.o:dhscf.F:(.text+0x3e12): more undefined references to `ddot_' follow diagg.o: In function `diagg_': diagg.F:(.text+0x8a2): undefined reference to `dcopy_' efield.o: In function `efield_': efield.F:(.text+0x10a): undefined reference to `ddot_' efield.F:(.text+0x142): undefined reference to `ddot_' efield.F:(.text+0x18c): undefined reference to `ddot_' efield.F:(.text+0x1bf): undefined reference to `ddot_' efield.F:(.text+0x24e): undefined reference to `ddot_' efield.o:efield.F:(.text+0x286): more undefined references to `ddot_' follow inver.o: In function `inver_': inver.f:(.text+0x132): undefined reference to `dgetrf_' inver.f:(.text+0x17d): undefined reference to `dgetri_' ksv.o: In function `ksv_pol_': ksv.f:(.text+0xfe1): undefined reference to `ddot_' ksv.f:(.text+0x1240): undefined reference to `ddot_' ksv.f:(.text+0x12af): undefined reference to `ddot_' ksv.f:(.text+0x23b9): undefined reference to `ddot_' linpack.o: In function `zgedi_': linpack.F:(.text+0x115): undefined reference to `zscal_' linpack.F:(.text+0x182): undefined reference to `zaxpy_' linpack.F:(.text+0x4d9): undefined reference to `zaxpy_' linpack.F:(.text+0x524): undefined reference to `zswap_' linpack.o: In function `zgefa_': linpack.F:(.text+0x89a): undefined reference to `zscal_' linpack.F:(.text+0x961): undefined reference to `zaxpy_' minvec.o: In function `m_minvec_mp_minvec_': minvec.f:(.text+0xa4): undefined reference to `ddot_' minvec.f:(.text+0xed): undefined reference to `ddot_' minvec.f:(.text+0x136): undefined reference to `ddot_' minvec.f:(.text+0x386): undefined reference to `ddot_' minvec.f:(.text+0x5a0): undefined reference to `ddot_' ranger.o:ranger.f:(.text+0x1365): more undefined references to `ddot_' follow cdiag.o: In function `cdiag_': cdiag.F:(.text+0x3df): undefined reference to `ilaenv_' cdiag.F:(.text+0x42f): undefined reference to `ilaenv_' cdiag.F:(.text+0x714): undefined reference to `zhegvx_' cdiag.F:(.text+0x89c): undefined reference to `zpotrf_' cdiag.F:(.text+0x949): undefined reference to `zhegst_' cdiag.F:(.text+0xae3): undefined reference to `zheevx_' cdiag.F:(.text+0xcd9): undefined reference to `zcopy_' cdiag.F:(.text+0xd7a): undefined reference to `ztrsm_' cdiag.F:(.text+0x126f): undefined reference to `zhegv_' cdiag.F:(.text+0x16aa): undefined reference to `zcopy_' cdiag.F:(.text+0x17c9): undefined reference to `zhemm_' cdiag.F:(.text+0x189c): undefined reference to `zgemm_' cdiag.F:(.text+0x3f48): undefined reference to `zgemm_' cdiag.F:(.text+0x3f99): undefined reference to `zcopy_' rdiag.o: In function `rdiag_': rdiag.F:(.text+0x3b2): undefined reference to `ilaenv_' rdiag.F:(.text+0x5ff): undefined reference to `dsygvx_' rdiag.F:(.text+0x768): undefined reference to `dpotrf_' rdiag.F:(.text+0x813): undefined reference to `dsygst_' rdiag.F:(.text+0x1474): undefined reference to `dsyevx_' rdiag.F:(.text+0x1afe): undefined reference to `dcopy_' rdiag.F:(.text+0x1b9c): undefined reference to `dtrsm_' rdiag.F:(.text+0x1eb4): undefined reference to `dsygv_' rdiag.F:(.text+0x20dd): undefined reference to `dcopy_' rdiag.F:(.text+0x24e6): undefined reference to `dsymm_' rdiag.F:(.text+0x2ad0): undefined reference to `dgemm_' rdiag.F:(.text+0x34d1): undefined reference to `dgemm_' rdiag.F:(.text+0x3727): undefined reference to `dcopy_' dsyevds.o: In function `dsyevds_': dsyevds.f:(.text+0x3f): undefined reference to `lsame_' dsyevds.f:(.text+0x59): undefined reference to `lsame_' dsyevds.f:(.text+0xda): undefined reference to `lsame_' dsyevds.f:(.text+0x114): undefined reference to `lsame_' dsyevds.f:(.text+0x25e): undefined reference to `dlamch_' dsyevds.f:(.text+0x279): undefined reference to `dlamch_' dsyevds.f:(.text+0x2ef): undefined reference to `dlansy_' dsyevds.f:(.text+0x36a): undefined reference to `dlascl_' dsyevds.f:(.text+0x3e2): undefined reference to `dsytrd_' dsyevds.f:(.text+0x442): undefined reference to `dsterf_' dsyevds.f:(.text+0x49d): undefined reference to `dstedc_' dsyevds.f:(.text+0x4f8): undefined reference to `dormtr_' dsyevds.f:(.text+0x53e): undefined reference to `dscal_' dsyevds.f:(.text+0x589): undefined reference to `xerbla_' zheevds.o: In function `zheevds_': zheevds.f:(.text+0x3b): undefined reference to `lsame_' zheevds.f:(.text+0x55): undefined reference to `lsame_' zheevds.f:(.text+0x105): undefined reference to `lsame_' zheevds.f:(.text+0x13f): undefined reference to `lsame_' zheevds.f:(.text+0x2ea): undefined reference to `dlamch_' zheevds.f:(.text+0x305): undefined reference to `dlamch_' zheevds.f:(.text+0x37b): undefined reference to `zlanhe_' zheevds.f:(.text+0x3f6): undefined reference to `zlascl_' zheevds.f:(.text+0x488): undefined reference to `zhetrd_' zheevds.f:(.text+0x4f9): undefined reference to `dsterf_' zheevds.f:(.text+0x572): undefined reference to `zstedc_' zheevds.f:(.text+0x5c7): undefined reference to `zunmtr_' zheevds.f:(.text+0x671): undefined reference to `xerbla_' zheevds.f:(.text+0x6c1): undefined reference to `dscal_' spher_harm.o: In function `spher_harm_mp_ylmexp_': spher_harm.f:(.text+0x1fd1): undefined reference to `ddot_' m_broyddj.o: In function `m_broyddj_mp_dlinds_.': m_broyddj.f90:(.text+0x6f2a): undefined reference to `dgetrf_' m_broyddj.f90:(.text+0x6ff7): undefined reference to `dgetri_' mneighb.o: In function `neighbour_mp_mranger_.': mneighb.f:(.text+0x17a2): undefined reference to `ddot_' mneighb.f:(.text+0x1d1a): undefined reference to `ddot_' mneighb.f:(.text+0x2da8): undefined reference to `ddot_' mneighb.f:(.text+0x3f83): undefined reference to `ddot_' conjgr.o: In function `m_conjgr_mp_conjgr_': conjgr.f:(.text+0x1e9): undefined reference to `ddot_' conjgr.o:conjgr.f:(.text+0x21b): more undefined references to `ddot_' follow m_broyddj_nocomm.o: In function `m_broyddj_nocomm_mp_dlinds_.': m_broyddj_nocomm.f90:(.text+0x6fea): undefined reference to `dgetrf_' m_broyddj_nocomm.f90:(.text+0x70b7): undefined reference to `dgetri_' make: *** [siesta] Error 1 我都快崩潰了。。。。。 想必大俠被我問(wèn)得也郁悶了,對(duì)不起~~~~ |
木蟲 (正式寫手)
|
嘿嘿,沒(méi)有關(guān)系 雖然錯(cuò)誤多,但是原因比較簡(jiǎn)單,就是庫(kù)沒(méi)有鏈接好,導(dǎo)致找不到這個(gè)庫(kù)的函數(shù),所以fortran在編譯到siesta代碼中引用到庫(kù)中函數(shù)的部分時(shí),就會(huì)提示undefined reference,看上去比較壯觀,但把庫(kù)設(shè)置好后就都會(huì)消失的。 你這個(gè)庫(kù)的設(shè)置確實(shí)比較麻煩,因?yàn)槟愕膍kl版本特別新,而你siesta提供的make文件好像是針對(duì)特別舊版本mkl的,所以差別可能比較大 另外仔細(xì)看了下你給出的這個(gè)arch.make,感覺(jué)里面有的地方挺奇怪的,比如紅字的SIESTA_ARCH=intel-mkl 怎么跑到說(shuō)明部分去了?雖然不影響編譯~但說(shuō)明你這個(gè)文件不是官方提供的,或是被別人修改過(guò),那么也不要過(guò)于信任它了。找找看有沒(méi)有官方提供的使用新版本mkl的make文件 (3樓提供的10.0版本應(yīng)該比較接近,可惜是并行+64位,你可以對(duì)比一下) |
|
guohuazhong 在這個(gè)帖子回復(fù)說(shuō): http://www.gaoyang168.com/bbs/viewthread.php?tid=3076767&fpage=1 一)如果你堅(jiān)持要用intel ifort 11來(lái)進(jìn)行編譯。可以采取如下方式(siesta網(wǎng)站主頁(yè)上的方法,見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)問(wè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ì)算過(guò)程中出現(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之后則沒(méi)用出現(xiàn)類似的錯(cuò)誤提示,具體原因我就沒(méi)去深究了。當(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來(lái)進(jìn)行并行計(jì)算。 1)安裝openmpi,詳細(xì)步驟不說(shuō)了,只是在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)槲沂怯胕fort11編譯的,所以庫(kù)的設(shè)置才不正確? 我看他的回帖,在生成的arch.make文件中新加入 DUMMY_FOX= --enable-dummy FFLAGS_DEBUG= -g -O2 然后還是出現(xiàn)前面類似的錯(cuò)誤 而且,他說(shuō)的: 后在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 我在我安裝目錄下的makefile文件下根本沒(méi)找到類似的語(yǔ)句啊,怎么修改呢? 還有,我想做串行不做并行,編譯是不是簡(jiǎn)單一點(diǎn)? |
木蟲 (正式寫手)
|
這個(gè)可能是ifort11和siesta存在不兼容的問(wèn)題及解決方法。和你的找不到庫(kù)函數(shù)還是不同的。 看了下siesta主頁(yè)上的說(shuō)明,它不是有自動(dòng)configure嘛?你可以使用這個(gè)功能自動(dòng)找一下函數(shù)庫(kù) 執(zhí)行軟件目錄中的Src/configure,應(yīng)該可以自動(dòng)搜索系統(tǒng)已經(jīng)安裝的編譯器和數(shù)學(xué)庫(kù),并生成個(gè)make文件。可能會(huì)比你自己找起來(lái)容易些。 不過(guò)之后你可能會(huì)遇到這個(gè)不兼容的問(wèn)題,具體是怎么回事,我沒(méi)有用過(guò),也就不了解了。 |
|
啊,不好意思,又來(lái)找你幫忙了~~ 我重裝了系統(tǒng),換了低一級(jí)版本 MKL和ifort版本跟zhangguangping的帖子是一樣的 后面安裝siesta2.0.2時(shí),出現(xiàn): ==> 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 /home/juan/intel/fc/10.1.021/bin/fortcom:error while loading shared libraries:libstdc++ .so.5:cannot open shared object file: no such file or directory ifort:error #10257:fatal error in /home/juan/intel/fc/10.1.021/bin/fortcom,terminated by OX7f make[1]: *** [compinfo.o] Error 127 make[1]: Leaving directory `/home/juan/tem/siesta-2.0.2/Src' make: *** [version] Error 2 我以為是沒(méi)安裝openmpi弄成的,于是又去安裝openmpi 安裝openmpi時(shí),出現(xiàn)了,could not run a simple fortrun77 program~~ openmpi我的版本是1.4.2的 怎么回事呢? |
|
個(gè)人認(rèn)為是ifort沒(méi)有安裝成功。 提供一個(gè)參考網(wǎng)站: http://bbs.pfan.cn/post-364383.html |
| 18 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|