24小时热门版块排行榜    

查看: 1835  |  回复: 7

victemww

木虫 (小有名气)

[求助] 初学vasp,编译vasplib出错------dlexlib.f

笔者初学vasp
编译环境:SL + parallel_studio_xe_2013(包含fortran、c++、mkl)+ openmpi1.2.6
已经把FC=ifc修改成FC=ifort,which ifort能找到路径;
问题:错误全部和dlexlib.f有关,但是不知到怎么修改
X@X    vasp.5.lib]$ make
ifort -O0 -FI -FR  -c dlexlib.f
dlexlib.f(6): warning #5117: Bad # preprocessor line
#ifdef LONGCHAR
-^
dlexlib.f(13): warning #5117: Bad # preprocessor line
#endif
-^
dlexlib.f(19): warning #5117: Bad # preprocessor line
#ifdef LONGCHAR
-^
dlexlib.f(23): warning #5117: Bad # preprocessor line
#else
-^
dlexlib.f(26): warning #5117: Bad # preprocessor line
#endif
-^
dlexlib.f(30): warning #5117: Bad # preprocessor line
#ifdef LONGCHAR
-^
dlexlib.f(184): warning #5117: Bad # preprocessor line
#endif
-^
dlexlib.f(24): error #6205: This object has already been SAVEd.   [B5]
      SAVE            B5,B6,B7,B8
----------------------^
dlexlib.f(288): warning #5117: Bad # preprocessor line
#ifdef LONGCHAR
-^
dlexlib.f(290): warning #5117: Bad # preprocessor line
#else
-^
dlexlib.f(292): warning #5117: Bad # preprocessor line
#endif     
-^
dlexlib.f(337): warning #5117: Bad # preprocessor line
#ifdef LONGCHAR
-^
dlexlib.f(339): warning #5117: Bad # preprocessor line
#else
-^
dlexlib.f(341): warning #5117: Bad # preprocessor line
#endif
-^
dlexlib.f(291): error #6418: This name has already been assigned a data type.   [BUFFER]
      CHARACTER*255 BUFFER,FORM,NUMBER,DUMMY
--------------------^
compilation aborted for dlexlib.f (code 1)
make: *** [dlexlib.o] 错误 1

[ Last edited by victemww on 2013-5-2 at 14:54 ]
回复此楼
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

171713294

木虫 (正式写手)

【答案】应助回帖

★ ★
感谢参与,应助指数 +1
victemww: 金币+2, 谢谢指教 2013-05-02 18:14:41
把你的Makeefile贴出来看看
坚持,不放弃
2楼2013-05-02 16:20:43
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

victemww

木虫 (小有名气)

引用回帖:
2楼: Originally posted by 171713294 at 2013-05-02 16:20:43
把你的Makeefile贴出来看看

makefile如下:
CODE:
.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
.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

3楼2013-05-02 18:13:08
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

171713294

木虫 (正式写手)

【答案】应助回帖

FFLAGS = -O0 -FI后面添加  -heap-arrays 64  再次编译一下试试
坚持,不放弃
4楼2013-05-02 22:23:00
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

gaolugang

木虫 (小有名气)

【答案】应助回帖

★ ★ ★
感谢参与,应助指数 +1
victemww: 金币+2, ★★★很有帮助 2013-05-03 09:10:41
victemww: 回帖置顶 2013-05-03 10:40:31
victemww: 金币+1 2013-05-03 10:41:03
Bad # preprocessor line. 用/fpp 可以去掉这些warning.
楼主再试一下。可能是preprocess 有问题。
5楼2013-05-03 02:16:32
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

victemww

木虫 (小有名气)

引用回帖:
4楼: Originally posted by 171713294 at 2013-05-02 22:23:00
FFLAGS = -O0 -FI后面添加  -heap-arrays 64  再次编译一下试试

修改后还是一样,是不是我的ifort不起作用?
6楼2013-05-03 09:09:15
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

victemww

木虫 (小有名气)

victemww: 回帖置顶 2013-05-03 10:40:18
引用回帖:
5楼: Originally posted by gaolugang at 2013-05-03 02:16:32
Bad # preprocessor line. 用/fpp 可以去掉这些warning.
楼主再试一下。可能是preprocess 有问题。

嗯,加/fpp可以去掉warning,谢谢指教
7楼2013-05-03 09:10:26
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

victemww

木虫 (小有名气)

引用回帖:
4楼: Originally posted by 171713294 at 2013-05-02 22:23:00
FFLAGS = -O0 -FI后面添加  -heap-arrays 64  再次编译一下试试

问题解决了,修改如下:
CODE:
CPP     = icc -E -P -C $*.F >$*.f
FC = ifort
OFLAGS = -O3 -axSSE3 -i-dynamic
FFLAGS =   -fpp -name lowercase -assume byterecl $(OFLAGS)

8楼2013-05-03 10:39:59
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 victemww 的主题更新
信息提示
请填处理意见