Page 1 of 1

error compilation of vasp.lib on Linux Opteron with Pathf90

Posted: Sat Dec 30, 2006 2:31 am
by guzhihui
Vaspers,

the error information are following when I compiled the vasp.4.lib

IF (DUMMY.OR.((IUNIT.EQ.6).AND.(.NOT.ALLOW6)).OR.(IUNIT.EQ.5) &
^
pathf95-197 pathf90: ERROR WFORCE, File = diolib.f, Line = 46, Column = 69
Unexpected syntax: ")" was expected but found "&".

OPEN(UNIT=IUNIT,FILE=FNAME(1:LENGTH), &
^
pathf95-139 pathf90: ERROR WFORCE, File = diolib.f, Line = 67, Column = 51
This I/O control list specifier requires a keyword.

OPEN(UNIT=IUNIT,FILE=FNAME(1:LENGTH),FORM=DFORM, &
^
pathf95-139 pathf90: ERROR WFORCE, File = diolib.f, Line = 70, Column = 62
This I/O control list specifier requires a keyword.

IF (DUMMY.AND.(IUNIT.NE.0).AND.(IUNIT.NE.5).AND. &
^
pathf95-197 pathf90: ERROR REOPEN, File = diolib.f, Line = 101, Column = 56
Unexpected syntax: "operand" was expected but found "&".

IF (DUMMY.OR.((IUNIT.EQ.6).AND.(.NOT.ALLOW6)).OR.(IUNIT.EQ.5) &
^
pathf95-197 pathf90: ERROR REOPEN, File = diolib.f, Line = 103, Column = 69
Unexpected syntax: ")" was expected but found "&".

OPEN(UNIT=IUNIT,FILE=FNAME(1:LENGTH), &
^
pathf95-139 pathf90: ERROR REOPEN, File = diolib.f, Line = 124, Column = 51
This I/O control list specifier requires a keyword.

IF (DUMMY.AND.(IUNIT.NE.0).AND.(IUNIT.NE.5).AND. &
^
pathf95-197 pathf90: ERROR CLEAN, File = diolib.f, Line = 158, Column = 56
Unexpected syntax: "operand" was expected but found "&".

& ACC(1:6).NE.'DIRECT'.AND. &
^
pathf95-197 pathf90: ERROR CLEAN, File = diolib.f, Line = 159, Column = 13
Unexpected syntax: ")" was expected but found ":".
^
pathf95-377 pathf90: ERROR CLEAN, File = diolib.f, Line = 159, Column = 16
Unexpected syntax: expected the keyword THEN, the beginning of an action-stmt, or a label.

IF (DUMMY.OR.((IUNIT.EQ.6).AND.(.NOT.ALLOW6)).OR.(IUNIT.EQ.5) &
^
pathf95-197 pathf90: ERROR CLEAN, File = diolib.f, Line = 161, Column = 69
Unexpected syntax: ")" was expected but found "&".

OPEN(UNIT=IUNIT,FILE=FNAME(1:LENGTH), &
^
pathf95-139 pathf90: ERROR CLEAN, File = diolib.f, Line = 181, Column = 51
This I/O control list specifier requires a keyword.

GOTO 200
^
pathf95-362 pathf90: WARNING RDPOS, File = diolib.f, Line = 322, Column = 7
This statement can not be reached.

Could anyone please help me out?

Many thanks!

guzhihui

error compilation of vasp.lib on Linux Opteron with Pathf90

Posted: Tue Jan 02, 2007 8:49 am
by tjf
It looks to me like the compiler is expecting fixed-form input due to the .f suffix. Add the compiler switch to tell it to read free-form.


This raises a good point. The .f/.f90/.f95 conventions are used by many compilers. Vasp is written in F90, and free-form (despite looking at a casual glance like fixed-form Fortran). Why aren't the files named appropriately? (Another hangover from crappy old archaic FORTRAN that should have stayed in the 70s where it belonged?)