gnu f77 compilation problem

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
User avatar
TAT
Newbie
Newbie
Posts: 39
Joined: Thu Aug 02, 2007 7:28 pm
License Nr.: 691 5-1

gnu f77 compilation problem

#1 Post by TAT » Wed Oct 15, 2008 1:39 am

Hi,
I am trying to install vasp with GNU compilers on opteron cluster with gnu compilers on RHEL3. I copied the makefile.linux to Makefile and looks as follows. I couldn't generate the *.a file please help
.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=mpif77

CFLAGS = -O
FFLAGS = -ffree-form -march=opteron -mfpmath=sse
FREE =

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_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 get the following error

mpif77 -ffree-form -march=opteron -mfpmath=sse -c preclib.f
preclib.f:6:
MODULE PRECLIB
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
preclib.f: In program `MAIN__':
preclib.f:7:
INTEGER, PARAMETER :: q=SELECTED_REAL_KIND(10)
^
Fortran 90 feature at (^) unsupported
preclib.f:7:
INTEGER, PARAMETER :: q=SELECTED_REAL_KIND(10)
^
Invalid declaration of or reference to symbol `selected_real_kind' at (^) [initially seen at (^)]
preclib.f:8:
END MODULE
^
Invalid form for END statement at (^)
preclib.f:7:
INTEGER, PARAMETER :: q=SELECTED_REAL_KIND(10)
^
End of source file before end of block started at (^)
make: *** [preclib.o] Error 1
Last edited by TAT on Wed Oct 15, 2008 1:39 am, edited 1 time in total.

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

gnu f77 compilation problem

#2 Post by admin » Wed Oct 15, 2008 10:26 am

please make sure that your compiler is a fortran90 compiler, vasp cannot be compiled with any fortran77 compiler.
Last edited by admin on Wed Oct 15, 2008 10:26 am, edited 1 time in total.

Post Reply