Page 1 of 1

Shared Object Files...

Posted: Thu Mar 05, 2009 4:03 pm
by ey
Hello all,
I am running fedora core 10 with Intel Fortran Compiler 11.0.081. The system has dual quad core of Xeon for a total of 8 processors.
and i am trying to install Vasp.4.6, Starting from the included makefile.linux_ifc_P4 Makefile... Also im a new user of both linux releases and vasp.

After the changes in Makefile that are pointed out in the forum, an executable vasp file is created, but when i tried to open, it couldnot load the shared libraries..
Here is the Makefile:

---------------------------------------------------------------------

.SUFFIXES: .inc .f .f90 .F

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

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=ifort
# fortran linker
FCL=$(FC)

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

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



CPP = $(CPP_) -DHOST=\"LinuxIFC\" \
-Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc \
# -DRPROMU_DGEMV -DRACCMU_DGEMV

#-----------------------------------------------------------------------
# general fortran flags (there must a trailing blank on this line)
#-----------------------------------------------------------------------

FFLAGS = -FR -lowercase -assume byterecl

#-----------------------------------------------------------------------
# optimization
#-----------------------------------------------------------------------

OFLAG=-O0 -xW

OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =

OBJ_NOOPT =
DEBUG = -FR -O0
INLINE = $(OFLAG)


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

BLAS=-L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread

# even faster Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
#BLAS= /opt/libs/libgoto/libgoto_p4_512-r0.6.so



LAPACK=-L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread

# use the mkl Intel lapack
#LAPACK= -lmkl_lapack

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

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

# options for linking (for compiler version 6.X, 7.1) nothing is required
LINK =
# compiler version 7.0 generates some vector statments which are located
# in the svml library, add the LIBPATH and the library (just in case)
#LINK = -L/opt/intel/compiler70/ia32/lib/ -lsvml

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

#FFT3D = fft3dfurth.o fft3dlib.o
FFT3D = fftw3d.o fft3dlib.o /usr/local/lib/libfftw3.a


#=======================================================================
#-----------------------------------------------------------------------
# fortran linker for mpi: if you use LAM and compiled it with the options
# suggested above, you can use the following line
#-----------------------------------------------------------------------

#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)
#-----------------------------------------------------------------------

#CPP = $(CPP_) -DMPI -DHOST=\"LinuxIFC\" -DIFC \
# -Dkind8 -DNGZhalf -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc \
# -DMPI_BLOCK=500 \
## -DRPROMU_DGEMV -DRACCMU_DGEMV

#-----------------------------------------------------------------------
# location of SCALAPACK
# if you do not use SCALAPACK simply uncomment the line SCA
#-----------------------------------------------------------------------

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 = -L../vasp.4.lib -ldmy \
# ../vasp.4.lib/linpack_double.o $(LAPACK) \
# $(SCA) $(BLAS)

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

# fftw.3.0.1 is slighly faster and should be used if available
#FFT3D = fftmpiw.o fftmpi_map.o fft3dlib.o /opt/libs/fftw-3.0.1/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 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
#-----------------------------------------------------------------------

fft3dlib.o : fft3dlib.F
$(CPP)
$(FC) -FR -lowercase -O1 -xW -unroll0 -vec_report3 -c $*$(SUFFIX)
fft3dfurth.o : fft3dfurth.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

radial.o : radial.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symlib.o : symlib.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symmetry.o : symmetry.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

dynbr.o : dynbr.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

broyden.o : broyden.F
$(CPP)
$(FC) -FR -lowercase -O2 -c $*$(SUFFIX)

us.o : us.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

wave.o : wave.F
$(CPP)
$(FC) -FR -lowercase -O0 -c $*$(SUFFIX)

LDApU.o : LDApU.F
$(CPP)
$(FC) -FR -lowercase -O2 -c $*$(SUFFIX)




----------------------------------------------------------------------------------------

These are some compilation output lines at the end:

.
.
..
..
LDApU.f90(261): (col. 7) remark: LOOP WAS VECTORIZED.
LDApU.f90(262): (col. 7) remark: LOOP WAS VECTORIZED.
LDApU.f90(267): (col. 10) remark: LOOP WAS VECTORIZED.
./preprocess <sphpro.F | /usr/bin/cpp -P -C -traditional >sphpro.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c sphpro.f90
./preprocess <paw.F | /usr/bin/cpp -P -C -traditional >paw.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c paw.f90
./preprocess <us.F | /usr/bin/cpp -P -C -traditional >us.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -O1 -c us.f90
./preprocess <ebs.F | /usr/bin/cpp -P -C -traditional >ebs.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c ebs.f90
./preprocess <wavpre.F | /usr/bin/cpp -P -C -traditional >wavpre.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c wavpre.f90
./preprocess <wavpre_noio.F | /usr/bin/cpp -P -C -traditional >wavpre_noio.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c wavpre_noio.f90
./preprocess <broyden.F | /usr/bin/cpp -P -C -traditional >broyden.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -O2 -c broyden.f90
broyden.f90(1422): (col. 16) remark: LOOP WAS VECTORIZED.
broyden.f90(1433): (col. 16) remark: LOOP WAS VECTORIZED.
broyden.f90(1324): (col. 11) remark: LOOP WAS VECTORIZED.
broyden.f90(1329): (col. 13) remark: LOOP WAS VECTORIZED.
broyden.f90(1333): (col. 15) remark: LOOP WAS VECTORIZED.
broyden.f90(1333): (col. 15) remark: LOOP WAS VECTORIZED.
broyden.f90(1360): (col. 22) remark: LOOP WAS VECTORIZED.
broyden.f90(1371): (col. 19) remark: LOOP WAS VECTORIZED.
broyden.f90(1394): (col. 16) remark: LOOP WAS VECTORIZED.
broyden.f90(172): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(294): (col. 7) remark: LOOP WAS VECTORIZED.
broyden.f90(365): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(366): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(367): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(368): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(455): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(458): (col. 10) remark: LOOP WAS VECTORIZED.
broyden.f90(650): (col. 15) remark: LOOP WAS VECTORIZED.
broyden.f90(650): (col. 15) remark: LOOP WAS VECTORIZED.
broyden.f90(709): (col. 7) remark: LOOP WAS VECTORIZED.
./preprocess <dynbr.F | /usr/bin/cpp -P -C -traditional >dynbr.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -O1 -c dynbr.f90
./preprocess <rmm-diis.F | /usr/bin/cpp -P -C -traditional >rmm-diis.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c rmm-diis.f90
./preprocess <reader.F | /usr/bin/cpp -P -C -traditional >reader.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c reader.f90
./preprocess <writer.F | /usr/bin/cpp -P -C -traditional >writer.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c writer.f90
./preprocess <tutor.F | /usr/bin/cpp -P -C -traditional >tutor.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c tutor.f90
./preprocess <xml_writer.F | /usr/bin/cpp -P -C -traditional >xml_writer.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c xml_writer.f90
./preprocess <brent.F | /usr/bin/cpp -P -C -traditional >brent.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c brent.f90
./preprocess <stufak.F | /usr/bin/cpp -P -C -traditional >stufak.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c stufak.f90
./preprocess <fileio.F | /usr/bin/cpp -P -C -traditional >fileio.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c fileio.f90
./preprocess <opergrid.F | /usr/bin/cpp -P -C -traditional >opergrid.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c opergrid.f90
./preprocess <stepver.F | /usr/bin/cpp -P -C -traditional >stepver.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c stepver.f90
./preprocess <dipol.F | /usr/bin/cpp -P -C -traditional >dipol.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c dipol.f90
./preprocess <xclib.F | /usr/bin/cpp -P -C -traditional >xclib.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c xclib.f90
./preprocess <chgloc.F | /usr/bin/cpp -P -C -traditional >chgloc.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c chgloc.f90
./preprocess <subrot.F | /usr/bin/cpp -P -C -traditional >subrot.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c subrot.f90
./preprocess <optreal.F | /usr/bin/cpp -P -C -traditional >optreal.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c optreal.f90
./preprocess <davidson.F | /usr/bin/cpp -P -C -traditional >davidson.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c davidson.f90
./preprocess <edtest.F | /usr/bin/cpp -P -C -traditional >edtest.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c edtest.f90
./preprocess <electron.F | /usr/bin/cpp -P -C -traditional >electron.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c electron.f90
./preprocess <shm.F | /usr/bin/cpp -P -C -traditional >shm.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c shm.f90
./preprocess <pardens.F | /usr/bin/cpp -P -C -traditional >pardens.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c pardens.f90
./preprocess <paircorrection.F | /usr/bin/cpp -P -C -traditional >paircorrection.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c paircorrection.f90
./preprocess <optics.F | /usr/bin/cpp -P -C -traditional >optics.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c optics.f90
./preprocess <constr_cell_relax.F | /usr/bin/cpp -P -C -traditional >constr_cell_relax.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c constr_cell_relax.f90
./preprocess <stm.F | /usr/bin/cpp -P -C -traditional >stm.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c stm.f90
./preprocess <finite_diff.F | /usr/bin/cpp -P -C -traditional >finite_diff.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c finite_diff.f90
./preprocess <elpol.F | /usr/bin/cpp -P -C -traditional >elpol.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c elpol.f90
./preprocess <setlocalpp.F | /usr/bin/cpp -P -C -traditional >setlocalpp.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c setlocalpp.f90
./preprocess <aedens.F | /usr/bin/cpp -P -C -traditional >aedens.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c aedens.f90
./preprocess <fftw3d.F | /usr/bin/cpp -P -C -traditional >fftw3d.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -O0 -xW -c fftw3d.f90
./preprocess <fft3dlib.F | /usr/bin/cpp -P -C -traditional >fft3dlib.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -O1 -xW -unroll0 -vec_report3 -c fft3dlib.f90
./preprocess <main.F | /usr/bin/cpp -P -C -traditional >main.f90 -DHOST=\"LinuxIFC\" -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc
ifort -FR -lowercase -assume byterecl -FR -O0 -c main.f90
rm -f vasp
ifort -o vasp main.o 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 symmetry.o symlib.o lattlib.o random.o 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 fftw3d.o fft3dlib.o /usr/local/lib/libfftw3.a -L../vasp.4.lib -ldmy ../vasp.4.lib/linpack_double.o -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread


---------------------------------------------------------------


after running Makefile and getting executable files:

$ ./vasp
./vasp: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory

-----------------------------------------------------------------------

a problem in LAPACK line or somewhere else, didnt understand...
i need some help.
Thanks a lot.

Shared Object Files...

Posted: Fri Mar 06, 2009 9:25 am
by pafell
I'd suggest changing FCL line to
FCL=$(FC) -static-intel
This will link intel libraries statically.
If you don't want to link statically, you could also add path to mkl libraries using mklvarsem64t.sh script in mkl's tools subdirectory. For example add sth like this (with correct path) to your .bashrc:
source /opt/intel/mkl/10.1.1.019/tools/environment/mklvarsem64t.sh
This change of course will be taken at next logon, or you can "load" it by: source ~/.bashrc
Above will work only when you are using bash as your shell. For (t)csh this is a bit different.

As this is ifort 11.x, and you are using core2 cpus, you could try OFLAG=-O3 -msse4.1 -xSSE4.1 which utilizes more cpu performance.

Pawel Lesniak

Shared Object Files...

Posted: Fri Mar 06, 2009 12:58 pm
by ey
Thank you for your suggestions, i applied all, but couldnt make it work yet.
i changed IF compiler version to 10.1.022 instead 11.x since my MKL version is also 10.xxx. but Still the same problem remains. ?

I am not sure that the LAPACK and BLAS lines and also SCA line completely true here.
there are different paths for the same files; for example, for the file libmkl_lapack.a,
1.) /opt/intel/Compiler/11.0/081/mkl/lib/em64t
2.) /opt/intel/mkl/10.1.1.019/lib/em64t
3.) /opt/intel/mkl/10.1.1.019/lib/64...

which one should be addressed in Makefile?

<span class='smallblacktext'>[ Edited Fri Mar 06 2009, 02:40PM ]</span>

Shared Object Files...

Posted: Fri Mar 06, 2009 4:10 pm
by admin
please check:
1) is the path to your BLAS included in the $LD_LIBRARY_PATH during the runtime of your job? (give a line
echo $LD_LIBRARY_PATH
in your job runscript, the output will be seen in the job.stdout file.

2) please check if a libmkl_intel_lp64.a file is in that directory. If the archive file is not there, but just the shared object (so) file, please load this one by
adding /opt/intel/mkl/10.1.1.019/lib/libmkl_intel_lp64.so
to the BLAS (instead of -lmkl_intel_lp64).

Shared Object Files...

Posted: Fri Mar 06, 2009 9:51 pm
by pafell
You can use ifort version 11.0 (I'm using this version) with MKL 10. It doesn't matter.

You should use definitely em64t, not 64. It doesn't matter if you'are using 1.) or 2.) of your MKL libraries.

I personally comment out all BLAS and LAPACK lines in makefile, and add (order matters):
LAPACK=
BLAS=-Wl,-rpath,/opt/intel/mkl/10.1.0.015/lib/em64t -Wl,--start-group /opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_sequential.a /opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_core.a -Wl,--end-group -lpthread
This makes me sure MKL libs are compiled in statically.
Of course you should change 10.1.0.015 to 10.1.1.019, if you'd like to try it out. This type of linking allows you to use executables without access to mkl libs.

If you'd like to link MKL libs dynamically, and you've added mklvarsem64t.sh to your .bashrc, then you could try these setting in makefile:
FC=ifort
FCL=$(FC) -static-intel
OFLAG=-O3 -msse4.1 -xSSE4.1
LAPACK=
BLAS=-L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_lapack -lmkl -lguide -pthread
Also check if /opt/intel/mkl/10.1.1.019/lib/em64t is in:
echo $LD_LIBRARY_PATH
If LD_LIBRARY_PATH is empty, or doesn't contain path given above, check if you are actually loading mklvarsem64t.sh, by:
echo $MKLROOT
You should see path to MKL.

I understand that we are talking about single computer, not a part of cluster.

After successful compilation check results you'll get for test cases. It's possible that you'll have to change OFLAG to use lower optimisation instead of -O3.

Shared Object Files...

Posted: Mon Mar 09, 2009 10:30 am
by ey
Thank you very much Pawel, it has worked. Here is the final form of my Makefile.

----------------------------------------------------------------------------------------------------------------------------



.SUFFIXES: .inc .f .f90 .F

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

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=ifort
# fortran linker
FCL=$(FC)


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

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

CPP = $(CPP_) -DHOST=\"LinuxIFC\" \
-Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc \
# -DRPROMU_DGEMV -DRACCMU_DGEMV


FFLAGS = -FR -lowercase -assume byterecl

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

OFLAG=-O3 -xW
OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =

OBJ_NOOPT =
DEBUG = -FR -O0
INLINE = $(OFLAG)


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

LAPACK=

BLAS=-Wl,-rpath,/opt/intel/mkl/10.1.1.019/lib/em64t -Wl,--start-group /opt/intel/mkl/10.1.1.019/lib/em64t/libmkl_intel_lp64.a /opt/intel/mkl/10.1.1.019/lib/em64t/libmkl_sequential.a /opt/intel/mkl/10.1.1.019/lib/em64t/libmkl_core.a -Wl,--end-group -lpthread



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

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

LINK =
#FFT3D = fftw3d.o fft3dlib.o /usr/local/lib/libfftw3.a
FFT3D = fft3dfurth.o fft3dlib.o

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 = -L../vasp.4.lib -ldmy \
# ../vasp.4.lib/linpack_double.o $(LAPACK) \
# $(SCA) $(BLAS)

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

# fftw.3.0.1 is slighly faster and should be used if available
#FFT3D = fftmpiw.o fftmpi_map.o fft3dlib.o /opt/libs/fftw-3.0.1/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 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
#-----------------------------------------------------------------------

fft3dlib.o : fft3dlib.F
$(CPP)
$(FC) -FR -lowercase -O1 -xW -unroll0 -vec_report3 -c $*$(SUFFIX)
fft3dfurth.o : fft3dfurth.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

radial.o : radial.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symlib.o : symlib.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symmetry.o : symmetry.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

dynbr.o : dynbr.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

broyden.o : broyden.F
$(CPP)
$(FC) -FR -lowercase -O2 -c $*$(SUFFIX)

us.o : us.F
$(CPP)
$(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

wave.o : wave.F
$(CPP)
$(FC) -FR -lowercase -O0 -c $*$(SUFFIX)

LDApU.o : LDApU.F
$(CPP)
$(FC) -FR -lowercase -O2 -c $*$(SUFFIX)