Errors in Instillation

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

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
mgrossman
Newbie
Newbie
Posts: 3
Joined: Tue Apr 30, 2013 9:48 pm

Errors in Instillation

#1 Post by mgrossman » Wed May 01, 2013 5:28 pm

I am trying to Install VASP 5.3 on a Linux cluster which runs on the gfortran compiler. When i get to the make file i continously run into the same error that it can't locate a file. The make file and the error are below and any help would be greatly appriciated because i am new to this and can really not move past this error. Additionally in the responses for the same error the i am experiencing have not worked.

.SUFFIXES: .inc .f .f90 .F
#-----------------------------------------------------------------------
# Makefile for gfortran (supplied by Juergen Furthmueller
# furth@ifto.physik.uni-jena.de)
########################################################################
#
# Disclaimer:
# presently the VASP team does not support gfortran
# The makefile is supplied as is.
# We can and will not assist in troubleshooting problems
# We strongly recommend installation and use of ifort 11.1
########################################################################
#-----------------------------------------------------------------------

# fortran compiler (I urgently recommend version >=4.6 *4.6 4.6 4.6*
# old gcc/gfortran have too many bugs and are expected to cause lot of trouble!!
# same compiler FC and compiler flags FFLAGS should be used for vasp.lib ...!
# it may happen that even a private LAPACK/BLAS needs to be compiled with the
# same compiler (depends a bit on the LAPACK/BLAS or ATLAS installation; for
# some LAPACK/BLAS one may need the -ff2c but maybe also not -- try out ...
#-----------------------------------------------------------------------
#
# BLAS must be installed on the machine
# there are several options:
# 1) very slow but works:
# retrieve the lapackage from ftp.netlib.org
# and compile the blas routines (BLAS/SRC directory)
# please use g77 or f77 for the compilation. When I tried to
# use pgf77 or pgf90 for BLAS, VASP hang up when calling
# ZHEEV (however this was with lapack 1.1 now I use lapack 2.0)
# 2) more desirable: get an optimized BLAS
#
# the two most reliable packages around are presently:
# 2a) Intels own optimised BLAS (PIII, P4, PD, PC2, Itanium)
# http://developer.intel.com/software/products/mkl/
# this is really excellent, if you use Intel CPU's
#
# 2b) probably fastest SSE2 (4 GFlops on P4, 2.53 GHz, 16 GFlops PD,
# around 30 GFlops on Quad core)
# Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
# http://www.tacc.utexas.edu/resources/software/
#
#-----------------------------------------------------------------------

# all CPP processed fortran files have the extension .f90
SUFFIX=.f90

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=gfortran -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore
# fortran linker
FCL=$(FC)


#-----------------------------------------------------------------------
# whereis CPP ?? (I need CPP, can't use gcc with proper options)
# that's the location of gcc for SUSE 5.3
#
CPP_ = /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -P -C
#
# that's probably the right line for some Red Hat distribution:
#
# CPP_ = /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P -C
#
# SUSE X.X, maybe some Red Hat distributions:

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

# this release should be fpp clean
# we now recommend fpp as preprocessor
# if this fails go back to cpp
# CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX)

#-----------------------------------------------------------------------
# possible options for CPP:
# NGXhalf charge density reduced in X direction
# wNGXhalf gamma point only reduced in X direction
# avoidalloc avoid ALLOCATE if possible
# PGF90 work around some for some PGF90 / IFC bugs
# CACHE_SIZE 1000 for PII,PIII, 5000 for Athlon, 8000-12000 P4, PD
# RPROMU_DGEMV use DGEMV instead of DGEMM in RPRO (depends on used BLAS)
# RACCMU_DGEMV use DGEMV instead of DGEMM in RACC (depends on used BLAS)
# tbdyn MD package of Tomas Bucko
#-----------------------------------------------------------------------

CPP = $(CPP_) -DHOST=\"gfortran\" \
-DCACHE_SIZE=4096 -DMINLOOP=1 -DNGXhalf \

#-----------------------------------------------------------------------
# general fortran flags (there must a trailing blank on this line)
# byterecl is strictly required for ifc, since otherwise
# the WAVECAR file becomes huge
#-----------------------------------------------------------------------

FFLAGS = -FR -lowercase

#-----------------------------------------------------------------------
# optimization
# we have tested whether higher optimisation improves performance
# -axK SSE1 optimization, but also generate code executable on all mach.
# xK improves performance somewhat on XP, and a is required in order
# to run the code on older Athlons as well
# -xW SSE2 optimization
# -axW SSE2 optimization, but also generate code executable on all mach.
# -tpp6 P3 optimization
# -tpp7 P4 optimization
#-----------------------------------------------------------------------

# ifc.9.1, ifc.10.1 recommended
OFLAG=-O3

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

#-----------------------------------------------------------------------
# the following lines specify the position of BLAS and LAPACK
# VASP works fastest with the libgoto library
# so that's what we recommend
#-----------------------------------------------------------------------

# mkl.10.0
# set -DRPROMU_DGEMV -DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl100/lib/em64t -lmkl -lpthread

# even faster for VASP Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
# parallel goto version requires sometimes -libverbs
BLAS= /opt/libs/libgoto/libgoto.so

# LAPACK, simplest use vasp.5.lib/lapack_double
LAPACK= ../vasp.5.lib/lapack_double.o

# use the mkl Intel lapack
#LAPACK= -lmkl_lapack

#-----------------------------------------------------------------------

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

# options for linking, nothing is required (usually)
LINK =

#-----------------------------------------------------------------------
# fft libraries:
# VASP.5.2 can use fftw.3.1.X (http://www.fftw.org)
# since this version is faster on P4 machines, we recommend to use it
#-----------------------------------------------------------------------

FFT3D = fft3dfurth.o fft3dlib.o

# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D = fftw3d.o fft3dlib.o /opt/libs/fftw-3.1.2/lib/libfftw3.a


#=======================================================================
# MPI section, uncomment the following lines until
# general rules and compile lines
# presently we recommend OPENMPI, since it seems to offer better
# performance than lam or mpich
#
# !!! Please do not send me any queries on how to install MPI, I will
# certainly not answer them !!!!
#=======================================================================
#-----------------------------------------------------------------------
# fortran linker for mpi
#-----------------------------------------------------------------------

#FC=mpif77
#FCL=$(FC)

#-----------------------------------------------------------------------
# additional options for CPP in parallel version (see also above):
# NGZhalf charge density reduced in Z direction
# wNGZhalf gamma point only reduced in Z direction
# scaLAPACK use scaLAPACK (usually slower on 100 Mbit Net)
# avoidalloc avoid ALLOCATE if possible
# PGF90 work around some for some PGF90 / IFC bugs
# CACHE_SIZE 1000 for PII,PIII, 5000 for Athlon, 8000-12000 P4, PD
# RPROMU_DGEMV use DGEMV instead of DGEMM in RPRO (depends on used BLAS)
# RACCMU_DGEMV use DGEMV instead of DGEMM in RACC (depends on used BLAS)
# tbdyn MD package of Tomas Bucko
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------

#CPP = $(CPP_) -DHOST=\"gfortran\" \
# -DCACHE_SIZE=4096 -DMINLOOP=1 -DNGZhalf \
# -DMPI_BLOCK=8000

#-----------------------------------------------------------------------
# location of SCALAPACK
# if you do not use SCALAPACK simply leave that section commented out
#-----------------------------------------------------------------------

#BLACS=$(HOME)/archives/SCALAPACK/BLACS/
#SCA_=$(HOME)/archives/SCALAPACK/SCALAPACK

#SCA= $(SCA_)/libscalapack.a \
# $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a $(BLACS)/LIB/blacs_MPI-LINUX-0.a $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a

SCA=

#-----------------------------------------------------------------------
# libraries for mpi
#-----------------------------------------------------------------------

#LIB = -fall-intrinsics \
# -L../vasp.5.lib -ldmy \
# ../vasp.5.lib/linpack_double.o $(LAPACK) \
# $(SCA) $(BLAS)

# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
#FFT3D = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o

# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o /opt/libs/fftw-3.1.2/lib/libfftw3.a

#-----------------------------------------------------------------------
# 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 mgrid.o xclib.o vdw_nl.o xclib_grad.o \
radial.o pseudo.o gridq.o ebs.o \
mkpoints.o wave.o wave_mpi.o wave_high.o \
$(BASIC) nonl.o nonlr.o nonl_high.o dfast.o choleski2.o \
mix.o hamil.o xcgrad.o xcspin.o potex1.o potex2.o \
constrmag.o cl_shift.o relativistic.o LDApU.o \
paw_base.o metagga.o egrad.o pawsym.o pawfock.o pawlhf.o rhfatm.o paw.o \
mkpoints_full.o charge.o Lebedev-Laikov.o stockholder.o dipol.o pot.o \
dos.o elf.o tet.o tetweight.o hamil_rot.o \
steep.o chain.o dyna.o sphpro.o us.o core_rel.o \
aedens.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 \
chgloc.o fast_aug.o fock.o mkpoints_change.o sym_grad.o \
mymath.o internals.o dynconstr.o dimer_heyden.o dvvtrajectory.o vdwforcefield.o \
hamil_high.o nmr.o pead.o mlwf.o subrot.o subrot_scf.o \
force.o pwlhf.o gw_model.o optreal.o davidson.o david_inner.o \
electron.o rot.o electron_all.o shm.o pardens.o paircorrection.o \
optics.o constr_cell_relax.o stm.o finite_diff.o elpol.o \
hamil_lr.o rmm-diis_lr.o subrot_cluster.o subrot_lr.o \
lr_helper.o hamil_lrf.o elinear_response.o ilinear_response.o \
linear_optics.o linear_response.o \
setlocalpp.o wannier.o electron_OEP.o electron_lhf.o twoelectron4o.o \
ratpol.o screened_2e.o wave_cacher.o chi_base.o wpot.o local_field.o \
ump2.o bse_te.o bse.o acfdt.o chi.o sydmat.o dmft.o \
rmm-diis_mlr.o linear_response_NMR.o

vasp: $(SOURCE) $(FFT3D) $(INC) main.o
rm -f vasp
$(FCL) -o vasp main.o $(SOURCE) $(FFT3D) $(LIB) $(LINK)
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 structure 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
mkpoints.o: mkpoints.inc mkpoints.F
wave.o: 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
#-----------------------------------------------------------------------


The error i receive is

./preprocess <symmetry.F | /usr/bin/cpp -P -C -traditional >symmetry.f90 -DHOST=\"gfortran\" -DCACHE_SIZE=4096 -DMINLOOP=1 -DNGXhalf
gfortran -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore -FR -lowercase -O3 -c symmetry.f90
symmetry.f90:1550.17:

USE spinsym
1
Fatal Error: Can't open module file 'spinsym.mod' for reading at (1): No such file or directory
make: *** [symmetry.o] Error 1
Last edited by mgrossman on Wed May 01, 2013 5:28 pm, edited 1 time in total.

beck
Newbie
Newbie
Posts: 19
Joined: Tue Jun 14, 2005 3:22 pm

Errors in Instillation

#2 Post by beck » Thu May 02, 2013 8:05 pm

Dear mgrossman,
looks like a bug in the Makefile (or your Makefile is from an older version...), just add "spinsym.o" after the filename "wave_high.o" (found in the SOURCE= section, just before the $(BASIC)-line).
Last edited by beck on Thu May 02, 2013 8:05 pm, edited 1 time in total.

mgrossman
Newbie
Newbie
Posts: 3
Joined: Tue Apr 30, 2013 9:48 pm

Errors in Instillation

#3 Post by mgrossman » Thu Jun 06, 2013 7:14 pm

I am now encountering a different error after i updated my gcc to 4.7.3 and the error is as fallows

./preprocess <spinsym.F | /usr/bin/cpp -P -C -traditional >spinsym.f90 -DHOST=\"gfortran\" -DCACHE_SIZE=4096 -DMINLOOP=1 -DNGXhalf
gfortran -O1 -O3 -c spinsym.f90
spinsym.f90:44.6:

use prec ! single vs double precision
1
Fatal Error: Wrong module version '0' (expected '9') for file 'prec.mod' opened at (1)
make: *** [spinsym.o] Error 1


I understand prec.mod is created during the compilation of the code but how do i dictate the module version. Any help would be greatly appreciated
<span class='smallblacktext'>[ Edited Mon Jun 10 2013, 07:15PM ]</span>
Last edited by mgrossman on Thu Jun 06, 2013 7:14 pm, edited 1 time in total.

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

Errors in Instillation

#4 Post by admin » Thu Jun 27, 2013 10:04 am

if you re-compiled with the updated gcc-version WITHOUT having deleted
all previously compiled routines, I suppose this error is just due to incompatibilities of the compiler versions.
Please check if the error persists if you
'rm *.a *.o' in vasp.5.lib
and
'make clean' in vasp.5.3.3
and re-compile the vasp.5.lib and the code.
Last edited by admin on Thu Jun 27, 2013 10:04 am, edited 1 time in total.

mgrossman
Newbie
Newbie
Posts: 3
Joined: Tue Apr 30, 2013 9:48 pm

Errors in Instillation

#5 Post by mgrossman » Thu Sep 12, 2013 5:20 pm

I am now having a problem with the compiled pead.o binary file. The error is as fallows

pead.o:(.bss+0xb60): multiple definition of `__pead_MOD_epsilon_nscf'
pead.o:(.bss+0xb60): first defined here
pead.o:(.bss+0x838): multiple definition of `__pead_MOD_lborn'
pead.o:(.bss+0x838): first defined here
pead.o:(.bss+0xce0): multiple definition of `__pead_MOD_born_charges_pead'
pead.o:(.bss+0xce0): first defined here
pead.o: In function `__pead_MOD_pead_resetup_wdes':
pead.f90:(.text+0x27c90): multiple definition of `__pead_MOD_pead_resetup_wdes'
pead.o:pead.f90:(.text+0x27c90): first defined here
pead.o: In function `__pead_MOD_pead_setup':
pead.f90:(.text+0x27d10): multiple definition of `__pead_MOD_pead_setup'
pead.o:pead.f90:(.text+0x27d10): first defined here
pead.o: In function `__pead_MOD_pead_writer':
pead.f90:(.text+0x284c0): multiple definition of `__pead_MOD_pead_writer'
pead.o:pead.f90:(.text+0x284c0): first defined here
pead.o: In function `__pead_MOD_pead_reader':
pead.f90:(.text+0x28620): multiple definition of `__pead_MOD_pead_reader'
pead.o:pead.f90:(.text+0x28620): first defined here
pead.o:(.data+0x40): multiple definition of `__pead_MOD_fac'
pead.o:(.data+0x40): first defined here
collect2: ld returned 1 exit status

This is only some of the error and i have re-compiled the pead.o file many times and had the same error brought about. Any help would be greatly appreciated
Last edited by mgrossman on Thu Sep 12, 2013 5:20 pm, edited 1 time in total.

Post Reply