24小时热门版块排行榜    

查看: 3181  |  回复: 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

回复此楼

» 收录本帖的淘帖专辑推荐

Photochemistry

» 猜你喜欢

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

gleerat

木虫 (正式写手)

引用回帖:
7楼: Originally posted by sjzxbe at 2012-07-25 08:14:57
intel环境编译
(1) source /opt/intel/Compiler/11.1/080/bin/ifortvars.sh intel64
(2)安装openmpi
  tar jxf openmpi-1.4.3.tar.bz2
  cd openmpi-1.4.3
  ./configure --prefix=/opt/openmpi-intel CC=icc  ...

mpif90的问题我已经解决,我现在的问题是我在五楼提到的编译出错问题。正是你略过的第四步。
由于原帖不能编辑,所以我在五楼提出了问题。
明察、慎思、笃行
9楼2012-07-25 08:31:37
已阅   回复此楼   关注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的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 我面上完蛋了 +9 且听虎啸 2026-08-20 10/500 2026-08-24 20:08 by 苦寒来香
[基金申请] filecode,4个jtjc了 +14 ziyangfang 2026-08-19 17/850 2026-08-24 18:37 by 哈哈蛤?
[基金申请] 人气不行了 +9 fansofjerry 2026-08-21 9/450 2026-08-24 17:48 by zhaozhengxin
[基金申请] 如果此刻你正在为国基感到焦虑,不妨来听听这首《基金之外》 +5 scalable 2026-08-24 5/250 2026-08-24 17:03 by spiderzhuzhi
[基金申请] 建议基金发布提前给出明确的时间点 +13 kulium 2026-08-21 16/800 2026-08-24 16:27 by superceng
[基金申请] 今日不放榜?网传国自然预计 8 月 27 日可查结果 +17 医学老男孩 2026-08-20 21/1050 2026-08-24 14:21 by refreshing11
[基金申请] 估计是周四 +4 archvillain 2026-08-18 4/200 2026-08-24 13:53 by zzuzxg
[基金申请] 朋友圈看到的 +7 wangzilk 2026-08-18 9/450 2026-08-24 10:50 by cmrandy
[基金申请] 放榜前的不淡定 20+4 snowwithsea 2026-08-19 17/850 2026-08-24 10:20 by echo8914667
[基金申请] 明天应该可查了!? +4 chengyan1220 2026-08-23 4/200 2026-08-24 08:47 by gloomy6159
[基金申请] 什么时候开奖? +10 CrisMessi 2026-08-18 11/550 2026-08-24 06:50 by 开心的小狮子
[基金申请] 2026年的国家社科基金项目通讯评审的新规则与新动向、新挑战 +4 process2012 2026-08-23 5/250 2026-08-23 19:58 by jurkat.1640
[教师之家] 跳槽后在研项目怎么办? +5 简单化xn 2026-08-22 10/500 2026-08-23 12:38 by 简单化xn
[基金申请] 只有每年这种时候来逛逛小木虫 +24 yaoyewhu2008 2026-08-20 26/1300 2026-08-22 17:43 by kammury
[基金申请] 今天基金会出结果吗?20260819 +16 kkkl_v 2026-08-19 17/850 2026-08-22 16:12 by 阿布Abu
[基金申请] 应该是下周三26日公布了吧? +4 哈哈蛤? 2026-08-21 4/200 2026-08-21 10:58 by Vivilian
[论文投稿] 投稿咨询 +5 wwm09 2026-08-17 7/350 2026-08-21 10:11 by 期刊论文帮手
[基金申请] 今天放榜没戏了吧 +9 yuleib84 2026-08-19 11/550 2026-08-21 10:06 by gltch
[基金申请] 基金啊基金 +4 longfie172 2026-08-20 4/200 2026-08-21 08:58 by mark mao
[基金申请] 明天放榜? +5 Shxjjxjkx 2026-08-18 5/250 2026-08-18 18:14 by -大大大大大-
信息提示
请填处理意见