|
第一次编译高斯源代码,那是无比的兴奋,零基础摸索到凌晨4点才搞定(我一博后师兄玩到3点),过程艰辛,但是结果其实很简单。 如果用官方推荐的商业的波兰Fortran编译器pgf77,一切都是很简单的事情了,但是我们用的是免费版intel编译器,所以有些地方得改改:
# 将所有的删除命令全部注释掉 vi bldg09 # rm -f -r *.exe *.o *.a # rm -r -f temputil # rm mdutil.o # rm ${x}*.o # rm -f -r temputil
# 修改一下mkl数据库的路径 vi setup-make else if ("$mach" =="ia64") then setfcname = "FCN=ifort" setblas = "BLAS='' UTIL_NAME='util.a'" setblasp = "$blas" setpstr = "-p" setfcflag = "FC='-L/usr/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64-WB -i8 -r8 -w -ftz -switch fe_new_cgoto -fp-relaxed -fp-speculation=safe-static-intel -openmp -fpp2 -auto -O3 -fpemu=silent'" setfcflagp = "FC='-L/usr/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64-WB -i8 -r8 -w -ftz -switch fe_new_cgoto -fp-relaxed -fp-speculation=safe-static-intel -openmp -fpp2 -auto -O3 -fpemu=silent -p'" setfc2flag = "FC2='/usr/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_ipf.a'" setenv LINDA_FORTRAN 'ifort-L/usr/intel/composer_xe_2013_sp1.2.144/mkl/lib -WB -i8 -r8 -w -ftz -switchfe_new_cgoto -fp-relaxed -fp-speculation=safe -static-intel -openmp -fpp2 -auto-O3 -fpemu=silent' setenv LINDA_FORTRAN_LINK 'ifort -L/usr/intel/composer_xe_2013_sp1.2.144/mkl/lib-WB -i8 -r8 -w -ftz -switch fe_new_cgoto -fp-relaxed -fp-speculation=safe-static-intel -openmp -fpp2 -auto -O3 -fpemu=silent' setenv POSTFL_FORTRAN 'ifort -L/usr/intel/composer_xe_2013_sp1.2.144/mkl/lib-WB -i8 -r8 -w -ftz -switch fe_new_cgoto -fp-relaxed -fp-speculation=safe-static-intel -openmp -fpp2 -auto -O3 -fpemu=silent' vi set-mflags else if ("$hname" == "amd64") then if (-e $xname/istanbul.flag) then set mty = "" set blstr = "k10h64sse3" set specflag = "-Mx,39,0x10000000" set mflags = "$mflags X86TYPE='-DX86_TYPE=S'" else set mty = "k8-64" set blstr = "" setspecflag = "" endif set blasname = "amd64$blstr" set mflags = "$mflags OPTOI= MMODEL='-mcmodel=medium'SPECFLAG=$specflag
vi ia64.make INTELDIR =/usr/intel/composer_xe_2013_sp1.2.144 MKLLIB =$(INTELDIR)/mkl/lib/intel64 # COMPDIR =$(INTELDIR)/lib/ia64 # I8 machine I8FLAG = -i8 -r8 I8CPP = -D_IA64_ -DP64 -DPACK64 -DUSE_I2-DI64 -DLITTLE_END -DNO_SBRK \ -DGCONJG=DCONJG -DGCMPLX=DCmplx -DGREAL=DREAL -DGIMAG=DIMAG \ -DUSE_LL -DMERGE_LOOPS -D_ALIGN_CORE_ -DDO_BKSPEF GAUDIM = 2500 GAUDIMA = $(GAUDIM)00 GAUDIMR = $(GAUDIM)0 GAUDIMS = $(GAUDIM) NISEC = -DDEFISEC=32 NJSEC = -DDEFJSEC=128 NKSEC = -DDEFKSEC=512 DIMENSX = $(INCDIR) -DDEFMAXRES=$(GAUDIMR)-DDEFMAXSEC=$(GAUDIMS) $(INCDIRG) $(PARFLAG) $(DEBUGP) -DDEFMAXSHL=$(GAUDIMA)-DDEFMAXATM=$(GAUDIMA) \ -DDEFMAXNZ=$(GAUDIMA) -DDEFNVDIM=257 -DDEFMAXSUB=80 -DDEFNBOMAXBAS=10000\ -DDEFARCREC=1024 -DDEFMAXXCVAR=40 -DDEFMAXIOP=200 -DDEFMAXCOORDINFO=32-DDEFMAXCHR=1024 -DDEFMOMEGA=5 -DDEFNOMEGA=6 -DDEFMAXXCNAME=25 -DDEFLMAX=13-DDEFMINB1P=100000000 \ -DDEFXGN3MIN=64 $(NISEC) $(NJSEC) $(NKSEC) -DDEFN3MIN=10 \ -DDEFMAXHEV=2000 -DDEFCACHE=128$(DEFCACHE) \ -DDEFMAXLECP=10 -DDEFMAXFUNIT=5 -DDEFMAXFFILE=10000 -DDEFMAXFPS=1300-DDEFMAXINFO=200 -DR16_OK \ -DDEFMAXOP=384 -DDEFMAXTIT=100 -DDEFMAXRTE=4000 -DDEFMAXREDTYPE=3-DDEFMAXREDINDEX=4 -DDEFMAXOV=500 -DDEFMXDNXC=8 -DDEFMXTYXC=10 $(CTDEBUG) \ $(BLASFLAG) $(PCMDIM) $(I8CPP) -DEXT_LSEEK RUNCC = gcc FFLAG0 = -mkl -openmp-no-prec-div -auto -axAVX -fpp3 -pad -WB $(I8FLAG) -w -ftz -fp-relaxed-static-intel -static-libgcc -fp_speculation=safe $(TESTFLAGS) $(PARSWITCH)$(DEBUGF) $(PROFFLAG) $(FPE) LIBS =-lmkl_intel_thread -lmkl_core -lmkl_intel_ilp64 -liomp5 -lpthread -lm
vi bldg09 else if ("$x" =="amd64") then @i386 = 1 (cdbsd ; ln -s ia64.make g09.make)
# 修改好后,最后开始编译,一切顺利的话估计得一个小时。 export g09root=/home/dongbo/g09d_rev cd $g09root/g09 bsd/install bsd/bldg09 all ia64 >& compile.log&
# 喜欢刷屏的可以敲一下下面这一行^_^ tail -f compile.log
|