4.6.34 Serial version with gfortran

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
forsdan
Sr. Member
Sr. Member
Posts: 339
Joined: Mon Apr 24, 2006 9:07 am
License Nr.: 173
Location: Gothenburg, Sweden

4.6.34 Serial version with gfortran

#1 Post by forsdan » Tue Jul 22, 2008 2:47 pm

I currently try to install the serial version of Vasp 4.6.34 with gfortran (4.1.2) on a Intel Xeon E5430 (Harpertown) architecture. I started with the makefile.linux_gfortran and changed the BLAS and LAPACK to Intel CMKL9.0. The compilation appeared to be successful but when I run the binary it exits with

"vasp.4.6.34 5Dec07 complex
At line 397 of file main.f
Fortran runtime error: End of file"

I tried the lower optimization level O1 as well but the issue remains, so I'm temporarily stuck. I would appreciate any suggestions on where to begin.

NOTE: With ifort9.1 and the corresponding makefile everything works out so the paths to BLAS/LAPACK are correct.

Best regards,
/Dan Fors

----------------------------
MAKEFILE
----------------------------

.SUFFIXES: .inc .f .f90 .F

SUFFIX=.f

CPP_ = ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)

CPP = $(CPP_) -DHOST=\"SveaIB\" \
-Dkind8 -DNGXhalf -DCACHE_SIZE=2000 -DGfortran -Davoidalloc \
-DRPROMU_DGEMV

#-----------------------------------------------------------------------
#
# Fortran compiler
#
#-----------------------------------------------------------------------

FC = gfortran
FCL = $(FC)

#-----------------------------------------------------------------------
#
# FLAGS
#
#-----------------------------------------------------------------------

LINK =
FFLAGS = -ffree-form -ffree-line-length-none

OFLAG = -O2

OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =
OBJ_NOOPT =
DEBUG = -g -O0
INLINE = $(OFLAG)

#-----------------------------------------------------------------------
#
# Packages
#
#-----------------------------------------------------------------------

## ------ BLAS + LAPACK ------ ##

BLAS = -L/c3se/apps/intel/cmkl/9.0/lib/em64t -lmkl_lapack -lmkl_em64t -lguide -lpthread
LAPACK =

## ------ FFT - routines serial ------ ##

FFT3D = fft3dfurth.o fft3dlib.o

#-----------------------------------------------------------------------
#
# Libraries
#
#-----------------------------------------------------------------------

LIB = -L../vasp.4.lib -ldmy \
../vasp.4.lib/linpack_double.o $(LAPACK) \
$(BLAS)

#-----------------------------------------------------------------------
#
# General rules and compile lines
#
#-----------------------------------------------------------------------

BASIC= symmetry.o symlib.o lattlib.o random.o

SOURCE= base.o mpi.o smart_allocate.o xml.o \
constant.o jacobi.o main_mpi.o scala.o \
asa.o lattice.o poscar.o ini.o setex.o radial.o \
pseudo.o mgrid.o mkpoints.o wave.o wave_mpi.o $(BASIC) \
nonl.o nonlr.o dfast.o choleski2.o \
mix.o charge.o xcgrad.o xcspin.o potex1.o potex2.o \
metagga.o constrmag.o pot.o cl_shift.o force.o dos.o elf.o \
tet.o hamil.o steep.o \
chain.o dyna.o relativistic.o LDApU.o sphpro.o paw.o us.o \
ebs.o wavpre.o wavpre_noio.o broyden.o \
dynbr.o rmm-diis.o reader.o writer.o tutor.o xml_writer.o \
brent.o stufak.o fileio.o opergrid.o stepver.o \
dipol.o xclib.o chgloc.o subrot.o optreal.o davidson.o \
edtest.o electron.o shm.o pardens.o paircorrection.o \
optics.o constr_cell_relax.o stm.o finite_diff.o \
elpol.o setlocalpp.o aedens.o

INC=

vasp: $(SOURCE) $(FFT3D) $(INC) main.o
rm -f vasp
$(FCL) -o vasp $(LINK) main.o $(SOURCE) $(FFT3D) $(LIB)
makeparam: $(SOURCE) $(FFT3D) makeparam.o main.F $(INC)
$(FCL) -o makeparam $(LINK) makeparam.o $(SOURCE) $(FFT3D) $(LIB)
zgemmtest: zgemmtest.o base.o random.o $(INC)
$(FCL) -o zgemmtest $(LINK) zgemmtest.o random.o base.o $(LIB)
dgemmtest: dgemmtest.o base.o random.o $(INC)
$(FCL) -o dgemmtest $(LINK) dgemmtest.o random.o base.o $(LIB)
ffttest: base.o smart_allocate.o mpi.o mgrid.o random.o ffttest.o $(FFT3D) $(INC)
$(FCL) -o ffttest $(LINK) ffttest.o mpi.o mgrid.o random.o smart_allocate.o base.o $(FFT3D) $(LIB)
kpoints: $(SOURCE) $(FFT3D) makekpoints.o main.F $(INC)
$(FCL) -o kpoints $(LINK) makekpoints.o $(SOURCE) $(FFT3D) $(LIB)

clean:
-rm -f *.g *.f *.o *.L *.mod ; touch *.F

main.o: main$(SUFFIX)
$(FC) $(FFLAGS)$(DEBUG) $(INCS) -c main$(SUFFIX)
xcgrad.o: xcgrad$(SUFFIX)
$(FC) $(FFLAGS) $(INLINE) $(INCS) -c xcgrad$(SUFFIX)
xcspin.o: xcspin$(SUFFIX)
$(FC) $(FFLAGS) $(INLINE) $(INCS) -c xcspin$(SUFFIX)

makeparam.o: makeparam$(SUFFIX)
$(FC) $(FFLAGS)$(DEBUG) $(INCS) -c makeparam$(SUFFIX)

makeparam$(SUFFIX): makeparam.F main.F
#
# MIND: I do not have a full dependency list for the include
# and MODULES: here are only the minimal basic dependencies
# if one strucuture is changed then touch_dep must be called
# with the corresponding name of the structure
#
base.o: base.inc base.F
mgrid.o: mgrid.inc mgrid.F
constant.o: constant.inc constant.F
lattice.o: lattice.inc lattice.F
setex.o: setexm.inc setex.F
pseudo.o: pseudo.inc pseudo.F
poscar.o: poscar.inc poscar.F
mkpoints.o: mkpoints.inc mkpoints.F
wave.o: wave.inc wave.F
nonl.o: nonl.inc nonl.F
nonlr.o: nonlr.inc nonlr.F

$(OBJ_HIGH):
$(CPP)
$(FC) $(FFLAGS) $(OFLAG_HIGH) $(INCS) -c $*$(SUFFIX)
$(OBJ_NOOPT):
$(CPP)
$(FC) $(FFLAGS) $(INCS) -c $*$(SUFFIX)

fft3dlib_f77.o: fft3dlib_f77.F
$(CPP)
$(F77) $(FFLAGS_F77) -c $*$(SUFFIX)

.F.o:
$(CPP)
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)
.F$(SUFFIX):
$(CPP)
$(SUFFIX).o:
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)

# special rules
#-----------------------------------------------------------------------
# these special rules are cummulative (that is once failed
# in one compiler version, stays in the list forever)
# -tpp5|6|7 P, PII-PIII, PIV
# -xW use SIMD (does not pay of on PII, since fft3d uses double prec)
# all other options do no affect the code performance since -O1 is used
#-----------------------------------------------------------------------

xcgrad.o : xcgrad.F
$(CPP)
$(FC) -ffree-form -lowercase -O1 -c $*$(SUFFIX)



<span class='smallblacktext'>[ Edited ]</span>
Last edited by forsdan on Tue Jul 22, 2008 2:47 pm, edited 1 time in total.

forsdan
Sr. Member
Sr. Member
Posts: 339
Joined: Mon Apr 24, 2006 9:07 am
License Nr.: 173
Location: Gothenburg, Sweden

4.6.34 Serial version with gfortran

#2 Post by forsdan » Thu Jul 24, 2008 10:40 am

Using the same compiler version and settings the code compiles perfectly with gfortran(4.1.2) on the Intel Xeon 5160 architecture. Is it likely that my gfortran installation in the first case is not correct or does anyone know from experience that I need different compiler flags here?

EDIT (14th Aug 2008): The issue has been resolved. There was a corrupt file in one of the my libraries causing a read error when executed. The compilation with gfortran4.1.2 works fine on both clusters.

<span class='smallblacktext'>[ Edited Thu Aug 14 2008, 07:33AM ]</span>
Last edited by forsdan on Thu Jul 24, 2008 10:40 am, edited 1 time in total.

Post Reply