24小时热门版块排行榜    

查看: 3198  |  回复: 11
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

gleerat

木虫 (正式写手)

[求助] 使用ifort+MKL编译VASP,出错信息却是gfortran

CODE:
mts@unity-ubuntu:~/vasp.5.2$ make -f makefile.linux_ifc_P4
./preprocess base.f90  -DHOST=\"LinuxIFC\" -Dkind8 -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf -DRPROMU_DGEMV  -DRACCMU_DGEMV
mpif90 -I/opt/intel/mkl/include/fftw -FR -lowercase -assume byterecl -O3  -c base.f90
gfortran: error: byterecl: No such file or directory
gfortran: error: unrecognized option '-assume'
make: *** [base.o] Error 1
mts@unity-ubuntu:~/vasp.5.2$ which ifort
/opt/intel/composer_xe_2011_sp1.11.339/bin/intel64/ifort

我在makefile中指定了编译器为ifort和mpif90,编译提示出错信息为gfortran。
这是makefile,省去了一些注释,只有修改的部分使用黑体标识。
引用回帖:
.SUFFIXES: .inc .f .f90 .F
# all CPP processed fortran files have the extension .f90
SUFFIX=.f90
#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=ifort
#修改fortran编译器为ifort
# fortran linker
FCL=$(FC)

CPP_ =  ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)

CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
          -Dkind8 -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
          -DRPROMU_DGEMV  -DRACCMU_DGEMV

#取消对CPP的注释

#-----------------------------------------------------------------------
# general fortran flags  (there must a trailing blank on this line)
# byterecl is strictly required for ifc, since otherwise
# the WAVECAR file becomes huge
#-----------------------------------------------------------------------

FFLAGS =  -I/opt/intel/mkl/include/fftw -FR -lowercase -assume byterecl
#指定fftw

# ifc.9.1, ifc.10.1 recommended
OFLAG=-O3

OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =
OBJ_NOOPT =
DEBUG  = -FR -O0
INLINE = $(OFLAG)

#-----------------------------------------------------------------------
# the following lines specify the position of BLAS  and LAPACK
# VASP works fastest with the libgoto library
# so that's what we recommend
#-----------------------------------------------------------------------

# mkl.10.0
# set -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines
BLAS=-L/opt/intel/mkl/lib/intel64 -lmkl_em64t -lmkl_intel_thread -lguide -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_core -liomp5 -lpthread

# use the mkl Intel lapack
LAPACK= -L/opt/intel/mkl/lib/intel64 -lmkl_em64t -lmkl_intel_thread -lguide -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_core -liomp5 -lpthread
#修改数学库
#-----------------------------------------------------------------------

#LIB  = -L../vasp.5.lib -ldmy \
#     ../vasp.5.lib/linpack_double.o $(LAPACK) \
#     $(BLAS)

#注释掉vasp的库,以及下面紧接着的FFT3D,在MPI部分重新指定FFT3D

# options for linking, nothing is required (usually)
LINK    =

#-----------------------------------------------------------------------
# fft libraries:
# VASP.5.2 can use fftw.3.1.X (http://www.fftw.org)
# since this version is faster on P4 machines, we recommend to use it
#-----------------------------------------------------------------------

#FFT3D   = fft3dfurth.o fft3dlib.o

# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D   = fftw3d.o fft3dlib.o   /opt/libs/fftw-3.1.2/lib/libfftw3.a

#=======================================================================
# MPI section, uncomment the following lines until
#=======================================================================
#-----------------------------------------------------------------------
# fortran linker for mpi
#-----------------------------------------------------------------------

FC=mpif90
#指定编译器为mpif90
FCL=$(FC)

#CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
#     -Dkind8 -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
#     -DMPI_BLOCK=8000
##    -DRPROMU_DGEMV  -DRACCMU_DGEMV
#注释CPP,使用前面的CPP

#-----------------------------------------------------------------------
# location of SCALAPACK
# if you do not use SCALAPACK simply leave that section commented out
#-----------------------------------------------------------------------
SCA= /opt/intel/mkl/lib/intel64/libmkl_scalapack_lp64.a /opt/intel/mkl/lib/intel64/libmkl_blacs_openmpi_lp64.a
#修改SCA

#-----------------------------------------------------------------------
# libraries for mpi
#-----------------------------------------------------------------------

LIB     = -L../vasp.5.lib -ldmy  \
      ../vasp.5.lib/linpack_double.o $(LAPACK) \
      $(SCA) $(BLAS)

#取消注释

# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
#FFT3D   = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o

# alternatively: fftw.3.1.X is slighly faster and should be used if available
FFT3D   = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o  /opt/intel/mkl/lib/intel64/libfftw3xf_intel.a
#使用指定的fftw3xf

回复此楼
明察、慎思、笃行
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

aylixmut

铜虫 (小有名气)


fzx2008: 金币+1, 谢谢回帖! 2012-07-25 11:41:23
我曾经编译也遇到跟您一样的问题,就是因为mpif90没找到,后来设置一下即可。如果这个没问题,那接下来应该就考虑库的问题,是否存在,有无问题。
6楼2012-07-24 21:13:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 12 个回答

aylixmut

铜虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
fzx2008: 金币+1, 谢谢回帖! 2012-07-25 11:40:47
gleerat: 金币+10, ★★★很有帮助 2012-07-25 14:19:23
gleerat: 金币+10, ★★★很有帮助 2012-07-25 14:20:30
是mpif90命令没找到。
在命令行打入:mpif90 看看是什么提示。
2楼2012-07-24 15:45:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

gleerat

木虫 (正式写手)

引用回帖:
2楼: Originally posted by aylixmut at 2012-07-24 15:45:23
是mpif90命令没找到。
在命令行打入:mpif90 看看是什么提示。

CODE:
mts@unity-ubuntu:~$ which mpif90
/usr/bin/mpif90
mts@unity-ubuntu:~$

明察、慎思、笃行
3楼2012-07-24 16:23:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

souledge

专家顾问 (著名写手)

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
fzx2008: 金币+3, 专家考核, 谢谢指教! 2012-07-24 17:28:35
fzx2008: 金币+20, 代发金币 2012-07-25 16:57:36
引用回帖:
3楼: Originally posted by gleerat at 2012-07-24 16:23:54
mts@unity-ubuntu:~$ which mpif90
/usr/bin/mpif90
mts@unity-ubuntu:~$
...

你的MPI不是用ifort编译的,而是用gfortran编译的。用
CODE:
mpif90 --version

就可以看到了。
建议下载MPI重新编译,编译时加上FC=ifort一句~
思想重于技巧,内涵重于表象
4楼2012-07-24 16:28:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[找工作] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 EZ67DG6CvcKL 2026-08-31 3/150 2026-08-31 22:23 by o3EMxHUAQDtS
[公派出国] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 EZ67DG6CvcKL 2026-08-31 3/150 2026-08-31 22:22 by o3EMxHUAQDtS
[考博] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +3 EZ67DG6CvcKL 2026-08-31 3/150 2026-08-31 22:14 by o3EMxHUAQDtS
[考研] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 EZ67DG6CvcKL 2026-08-31 3/150 2026-08-31 22:12 by o3EMxHUAQDtS
[基金申请] 面上意见出来了 +12 黄鸟于飞Chao 2026-08-29 23/1150 2026-08-31 18:57 by 黄鸟于飞Chao
[文学芳草园] 梦想 +5 myrtle 2026-08-26 5/250 2026-08-31 14:40 by hahaboy
[基金申请] 中青基了要发朋友圈吗? +7 349506619 2026-08-28 7/350 2026-08-31 13:39 by 冼亮淀粉酶
[基金申请] 29号明天会评吗 +4 笨笨唐 2026-08-28 4/200 2026-08-31 09:30 by huixian257
[基金申请] 有没有仍没收到信息的 +7 德尚中行 2026-08-27 8/400 2026-08-30 20:52 by purplejack
[基金申请] 为什么资助数各大高校都创新高,自己申请怎么就这么难 +12 Kittylucky 2026-08-27 13/650 2026-08-29 00:04 by superceng
[基金申请] 基金系统什么内容也没有 30+4 winsaint 2026-08-27 9/450 2026-08-28 11:06 by maolC
[基金申请] 怎么查啊 +6 huang1991js 2026-08-26 6/300 2026-08-28 08:42 by winsaint
[基金申请] 面上合作单位盖章 +5 ssyjh 2026-08-27 5/250 2026-08-27 20:50 by gdfollow
[基金申请] 怎么看青基中了没有啊 +5 叶九微 2026-08-26 5/250 2026-08-27 10:35 by l_zh2008
[基金申请] 2026年8月25日国自然放榜前突然收到列入评审专家邮件,有关系吗? +25 木水思豆 2026-08-25 28/1400 2026-08-26 14:53 by draco1987
[基金申请] 为什么国自然不能直接公布 +4 bjdxyxy 2026-08-26 4/200 2026-08-26 13:12 by qingmu1201
[基金申请] 项目信息和经费信息在系统里都可以看到了 +6 wittyboy 2026-08-26 14/700 2026-08-26 10:55 by wittyboy
[基金申请] 国合可查了 +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[基金申请] 在坚冰还盖着北海的时候,我看到了怒放的梅花。 (金币+10) +6 ziyangfang 2026-08-25 9/450 2026-08-25 20:26 by huagongfeihu
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
信息提示
请填处理意见