24小时热门版块排行榜    

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

qianbj2006

木虫 (正式写手)

[求助] 编译vasp的lib时就出错,求指点

麻烦帮忙看一下~~编译vasp的lib时就出错,错误信息如下
root@sjtu-ThinkPad-SL:/home/sjtu/Downloads/vasp4.6/vasp/vasp.4.lib# make
ifort -O0 -FI -FR  -c dlexlib.f
dlexlib.f(4): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [PRECLIB]
      USE preclib
----------^
dlexlib.f(5): error #6683: A kind type parameter must be a compile-time constant.   [Q]
      IMPLICIT REAL(q) (A-H,O-Z)
--------------------^
dlexlib.f(73): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [PRECLIB]
      USE preclib
----------^
dlexlib.f(74): error #6683: A kind type parameter must be a compile-time constant.   [Q]
      IMPLICIT REAL(q) (A-H,O-Z)
--------------------^

----------^
#中间重复,很多6683和7002错误#
--------------------^
dlexlib.f(964): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant.   [Q]
      PARAMETER (TINY=1.E-10_q,MAXINT=2147483647.E0_q)
----------------------------^
dlexlib.f(964): error #6975: A kind-param must be a digit-string or a scalar-int-constant-name   [Q]
      PARAMETER (TINY=1.E-10_q,MAXINT=2147483647.E0_q)
----------------------------^
dlexlib.f(1084): catastrophic error: Too many errors, exiting
compilation aborted for dlexlib.f (code 1)
make: *** [dlexlib.o] Error 1

makefile文件基本没改
只改了FC=ifort
全文:
root@sjtu-ThinkPad-SL:/home/sjtu/Downloads/vasp4.6/vasp/vasp

.SUFFIXES: .inc .f .F
#-----------------------------------------------------------------------
# Makefile for Portland Group F90/HPF compiler
# the makefile was tested only under Linux on Intel platforms
# however it might work on other platforms as well
#
# this release of vasp.4.lib contains lapack v2.0
# this can be compiled with pgf90 compiler if the option -O1 is used
#
# Mind: one user reported that he had to copy preclib.F diolib.F
#  dlexlib.F and drdatab.F to the directory vasp.4.4, compile the files
#  there and link them directly  into vasp
#  for no obvious reason these files could not be linked from the library
#
#-----------------------------------------------------------------------

# C-preprocessor
CPP     = gcc -E -P -C $*.F >$*.f
FC=ifort

CFLAGS = -O
FFLAGS = -O0 -FI
FREE   =  -FR

DOBJ =  preclib.o timing_.o derrf_.o dclock_.o  diolib.o dlexlib.o drdatab.o


#-----------------------------------------------------------------------
# general rules
#-----------------------------------------------------------------------

libdmy.a: $(DOBJ) lapack_double.o linpack_double.o lapack_atlas.o
        -rm libdmy.a
        ar vq libdmy.a $(DOBJ)

# files which do not require autodouble
lapack_min.o: lapack_min.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_min.f
lapack_double.o: lapack_double.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_double.f
lapack_single.o: lapack_single.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_single.f
lapack_atlas.o: lapack_atlas.f
        $(FC) $(FFLAGS) $(NOFREE) -c lapack_atlas.f
linpack_double.o: linpack_double.f
        $(FC) $(FFLAGS) $(NOFREE) -c linpack_double.f
linpack_single.o: linpack_single.f
        $(FC) $(FFLAGS) $(NOFREE) -c linpack_single.f

.c.o:
        $(CC) $(CFLAGS) -c $*.c
.F.o:
        $(CPP)
        $(FC) $(FFLAGS) $(FREE) $(INCS) -c $*.f
.F.f:
        $(CPP)
.f.o:
        $(FC) $(FFLAGS) $(FREE) $(INCS) -c $*.f
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

hnuzhoulin

金虫 (小有名气)

【答案】应助回帖

★ ★
fzx2008(金币+2): 赞同你的说法 2011-11-27 11:03:32
qianbj2006(金币+15): 谢谢,就是这个原因,呵呵 2011-12-02 12:48:17
楼主说的这个,个人觉得可能是有文件损坏或者其他原因

建议重新下载一个完整的,解压,然后按照14楼的步骤做,,应该没问题。。


顺带讲一句,前面的各位虫友,人家问的是vasp.lib怎么编译 不是vasp。不要把人家弄混了
18楼2011-11-27 00:41:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 23 个回答

qianbj2006

木虫 (正式写手)

/root下的.bashrc加了
source /opt/intel/composer_xe_2011_sp1/bin/compilervars.sh intel64
export PATH=$PATH:/opt/intel/composer_xe_2011_sp1.7.256/bin
export PATH=$PATH:/usr/bin

vasp.4.lib下的文件有
ls
crayerrf.F           lapack_single_1.1.f         makefile.rs6000_p1
dclock_.c            lapack_single.f             makefile.sgi
dclock.c             linpack_double.f            makefile.sp2
dclock_ds20.c        linpack_single.f            makefile.sun
dclock_.o            makefile                    makefile.t3d
dclock_simple.c      makefile~                   makefile.t3e
derrf_.c             makefile.cray               makefile.vpp
derrf.c              makefile.dec                preclib.f
derrf_.o             makefile.fujitsu            preclib.F
derrf_t3d.c          makefile.hp                 preclib.o
diolib.f             makefile.hpux_itanium       ptimers.f
diolib.F             makefile.linux              ptimers.h
diolib.o             makefile.linux_abs          README.lapack
dlexlib.f            makefile.linux_alpha        sclock_cray.F
dlexlib.F            makefile.linux_efc_itanium  sclock_nec.F
dlexlib.s            makefile.linux_ifc_ath      sclock_t3d.F
drdatab.F            makefile.linux_ifc_opt      serrf.c
errf.F               makefile.linux_ifc_P4       stripnr
fujitsu.F            makefile.linux_ifc_P4~      timing_.c
itmtv.s              makefile.linux_pg           timing.c
lapack_atlas.f       makefile.linux_pgi_opt      timing_ds20.c
lapack_double_1.1.f  makefile.nec                timing.fujitsu.F
lapack_double.f      makefile.rs6000             timing_.o
2楼2011-11-23 21:46:15
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

qianbj2006

木虫 (正式写手)

另外问一下,编译vasp的lib时会用到哪些其他的lib?
3楼2011-11-23 21:52:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

qianbj2006

木虫 (正式写手)

查看了preclib.F文件
里面的内容只有几行
!control precision
MODULE PRECLIB
INTEGER, PARAMETER :: q=SLECTED_REAL_KIND(10)
END MODULE
4楼2011-11-23 21:58:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[硕博家园] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 ASdOkHsho7FD 2026-08-28 8/400 2026-08-29 11:17 by jCd0dEvKHShX
[基金申请] 国自然评审意见 +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
[基金申请] 系统查不到 +11 董八千 2026-08-26 11/550 2026-08-28 18:06 by Leogzhya
[基金申请] 有没有仍没收到信息的 +3 德尚中行 2026-08-27 3/150 2026-08-28 15:24 by rongshuxia
[教师之家] 导师吐槽:我怎么摊上了这么个极品研究生! +8 苏东坡二世 2026-08-23 8/400 2026-08-28 14:41 by lkforward
[基金申请] 麻烦专家们看看评委们的意见(F口面上) +4 gdd2018 2026-08-28 9/450 2026-08-28 14:22 by jklily
[基金申请] 基金未中,这种答复是模板吗? +5 zhaosm1982 2026-08-27 6/300 2026-08-27 16:00 by lfy8008
[基金申请] 看板上这么多中的,有点像50人群里49个人都是骗子的那种感觉…… +5 a089 2026-08-26 6/300 2026-08-27 14:05 by jonewore
[基金申请] 为什么 国际(地区)合作与交流项目 没有放榜? 10+3 majunge000 2026-08-26 11/550 2026-08-27 08:42 by 北京莱茵编辑
[基金申请] 我不理解! +15 Edward_pc 2026-08-26 23/1150 2026-08-26 20:34 by zzuzxg
[基金申请] 范进中举一文的中心思想 +9 炎黄贵胄 2026-08-22 10/500 2026-08-26 15:40 by semaglutide
[基金申请] 2026年8月25日国自然放榜前突然收到列入评审专家邮件,有关系吗? +25 木水思豆 2026-08-25 28/1400 2026-08-26 14:53 by draco1987
[基金申请] 能否退出参与的面上项目解除限项 +23 koalala 2026-08-24 26/1300 2026-08-26 14:29 by 宝贝虫子
[基金申请] 国合里面能看到了 +7 一怀馨秋 2026-08-26 7/350 2026-08-26 11:23 by zhaosm1982
[基金申请] 国际合作可查了,中了面上 (EPI+1)(金币+50) +18 Ldrop2023 2026-08-26 18/900 2026-08-26 11:15 by cmrandy
[基金申请] 系统进不去 +4 yanglien 2026-08-26 5/250 2026-08-26 11:10 by wenfengw83
[基金申请] 国合可查了 +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[基金申请] 今天务委会开完了,明天出结果吗 +19 angus9576 2026-08-25 23/1150 2026-08-26 10:03 by zp519
[基金申请] 国合现在查不到了吗? +10 chengyan1220 2026-08-24 20/1000 2026-08-26 08:57 by peasantsprig
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
信息提示
请填处理意见