vasp.5.lib compilation error

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
buchi25

vasp.5.lib compilation error

#1 Post by buchi25 » Thu Jan 10, 2013 11:20 am

Dear all,

I encountered the errors when I tried compiling the vasp.5.lib.
Acutually, libdmy.a was made. But a number of "Unrecognized directive" message appeared during the compilation.
The following is the message during the compilation.
====================================================================
gcc -E -P -C preclib.F >preclib.f
ifort -O0 -FI -FR -c preclib.f
cc -O -c timing_.c
cc -O -c derrf_.c
cc -O -c dclock_.c
gcc -E -P -C diolib.F >diolib.f
ifort -O0 -FI -FR -c diolib.f
gcc -E -P -C dlexlib.F >dlexlib.f
ifort -O0 -FI -FR -c dlexlib.f
gcc -E -P -C drdatab.F >drdatab.f
ifort -O0 -FI -FR -c drdatab.f
ifort -O0 -FI -c lapack_double.f
lapack_double.f(10179): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
-------------------------^
lapack_double.f(10181): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
--------------------------^
lapack_double.f(20692): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
-------------------------^
lapack_double.f(20694): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
--------------------------^
lapack_double.f(20706): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
----------------------------^
lapack_double.f(20708): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
-----------------------------^
lapack_double.f(20733): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
-------------------------^
lapack_double.f(20735): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
--------------------------^
ifort -O0 -FI -c linpack_double.f
ifort -O0 -FI -c lapack_atlas.f
lapack_atlas.f(12864): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
-------------------------^
lapack_atlas.f(12866): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
--------------------------^
lapack_atlas.f(18861): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
-------------------------^
lapack_atlas.f(18863): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
--------------------------^
lapack_atlas.f(18875): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
----------------------------^
lapack_atlas.f(18877): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
-----------------------------^
lapack_atlas.f(18902): remark #5140: Unrecognized directive
CDIR$ NEXTSCALAR
-------------------------^
lapack_atlas.f(18904): remark #5140: Unrecognized directive
CDIR$ NEXT SCALAR
--------------------------^
rm libdmy.a
rm: cannot remove `libdmy.a': No such file or directory
make: [libdmy.a] Error 1 (ignored)
ar vq libdmy.a preclib.o timing_.o derrf_.o dclock_.o diolib.o dlexlib.o drdatab.o
ar: creating libdmy.a
a - preclib.o
a - timing_.o
a - derrf_.o
a - dclock_.o
a - diolib.o
a - dlexlib.o
a - drdatab.o
====================================================================

And the following is the Makefile itself.
I simply changed ifc to ifort.
====================================================================
.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
====================================================================

I'm glad If you have any advice or suggestion.
Please let me know.

Thanks.
Last edited by buchi25 on Thu Jan 10, 2013 11:20 am, edited 1 time in total.

buchi25

vasp.5.lib compilation error

#2 Post by buchi25 » Wed Feb 13, 2013 10:23 am

I succeeded in avoiding the errors by changing the version of ifort 13.0.1 to 12.5.1.
ifort 13.0.1 didn't work in my case.

Thanks
Last edited by buchi25 on Wed Feb 13, 2013 10:23 am, edited 1 time in total.

martin_gumbau
Newbie
Newbie
Posts: 4
Joined: Tue Nov 19, 2019 10:24 am

Re: vasp.5.lib compilation error

#3 Post by martin_gumbau » Wed Feb 03, 2021 9:54 am

In the makefile you can specify free format with the flag -free:
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

SOLUTION:
change directives with a ! as a first character (files lapack_double.f lapack_atlas.f)

CDIR$ to !CDIR$
C$DIR to !C$DIR
...and so on



Fixed-Form Source

Put CDIR$ or !DIR$ in columns 1 through 5.

Directives are listed in columns 7 and beyond.

Columns beyond 72 are ignored.

An initial directive line has a blank in column 6.

A continuation directive line has a nonblank in column 6.

Free-Form Source

Put !DIR$ followed by a space anywhere in the line. The !DIR$ characters are the first nonblank characters in the line (actually, non-whitespace).

Directives are listed after the space.

An initial directive line has a blank, tab, or newline in the position immediately after the !DIR$.

A continuation directive line has a character other than a blank, tab, or newline in the position immediately after the !DIR$.

Thus, !DIR$ in columns 1 through 5 works for both free-form source and fixed-form source.


Cheers.

Post Reply