Page 1 of 1

compilation error with mpif90/g95 !!!

Posted: Tue Aug 29, 2006 10:49 am
by arijit
Dear VASP user,
After a lot of struggle, I am still not able to patallelize the VASP 4.6 on our Opteron AMD machine, as I am getting some funny problems as follows:
---------
...
/opt/mpichg9532/bin/mpif90 -c constr_cell_relax
./preprocess <stm.F | /lib/cpp -C -P -DMPI -Duse_collective -Dkind8 -DNGZhalf >stm.f
/opt/mpichg9532/bin/mpif90 -c stm
./preprocess <finite_diff.F | /lib/cpp -C -P -DMPI -Duse_collective -Dkind8 -DNGZhalf >finite_diff.f
/opt/mpichg9532/bin/mpif90 -c finite_diff
./preprocess <elpol.F | /lib/cpp -C -P -DMPI -Duse_collective -Dkind8 -DNGZhalf >elpol.f
/opt/mpichg9532/bin/mpif90 -c elpol
./preprocess <setlocalpp.F | /lib/cpp -C -P -DMPI -Duse_collective -Dkind8 -DNGZhalf >setlocalpp.f
/opt/mpichg9532/bin/mpif90 -c setlocalpp
make: Circular main <- main.o dependency dropped.
/opt/mpichg9532/bin/mpif90 -c main
/opt/mpichg9532/bin/mpif90 -c main
rm -f vasp
/opt/mpichg9532/bin/mpif90 -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 /users/phy/ra/asen/fftw-3.1.2/lib/libfftw3.a -L../vasp.4.lib ../vasp.4.lib/linpack_double.o -ldmy -xlic_lib=sunperf -L/usr/lib64/lmpi
g95: main.o: No such file or directory
g95: base.o: No such file or directory
g95: mpi.o: No such file or directory
g95: smart_allocate.o: No such file or directory
g95: xml.o: No such file or directory
g95: constant.o: No such file or directory
....
--------------
Could you please suggest me what went wrong? I would greatly appreciate if someone provides me graciously the correct makefile for it.

Best regards,
Arijit

compilation error with mpif90/g95 !!!

Posted: Tue Aug 29, 2006 5:47 pm
by tjf
Is your mpif90 producing object (.o) files?

compilation error with mpif90/g95 !!!

Posted: Thu Aug 31, 2006 5:41 am
by arijit
Dear tif,
Unfortunately, iI am not getting any object(.o) files. Here is the makefile:

.SUFFIXES: .inc .f .F
#-----------------------------------------------------------------------
# MPI version using SUN MPI from the hpc package:
# before compiling a few things must be done manually:
# 1. `IU5=5' to `IU5=35' in main.F
# 1. `IU5=5' to `IU5=35' in main.F
#-----------------------------------------------------------------------
#
FC=/opt/mpichg9532/bin/mpif90
F77=/opt/mpichg9532/bin/mpif77
FCL=$(FC)
CPP = ./preprocess <$*.F | /lib/cpp -C -P -DMPI -Duse_collective -Dkind8 -DNGZhalf >$*.f
MPI = -L/usr/lib64 -lmpi
LIB = -L../vasp.4.lib ../vasp.4.lib/linpack_double.o -ldmy -xlic_lib=sunperf $(MPI)
#FFT3D = fftmpi.o fftmpi_map.o fft3dlib.o /users/phy/ra/asen/fftw-3.0.1/lib/libfftw3.a
FFT3D = /users/phy/ra/asen/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 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

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

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

dos.o : dos.F
$(CPP)
$(FC) -c -free $*$(SUFFIX)

radial.o : radial.F
$(CPP)
$(FC) -c -free $*$(SUFFIX)

symmetry.o : symmetry.F
$(CPP)
$(FC) -c -free $*$(SUFFIX)
------------------------------------------------------
I would greatly appreciate receiving your valuable suggestions.
With regards,
arijit

compilation error with mpif90/g95 !!!

Posted: Thu Aug 31, 2006 9:36 am
by tjf
Showing me the makefile isn't going to help. You need to play with the preprocessor and compiler to make them produce object files. Start with, for example:

Code: Select all

./preprocess <finite_diff.F | /lib/cpp -C -P -DMPI -Duse_collective -Dkind8 -DNGZhalf >finite_diff.f
/opt/mpichg9532/bin/mpif90 -c finite_diff 
(taken from your first post) and see what you have to twig to make sure the intermediate fortran files are good and that you get objects. Then you can think about what you have to do to the makefile to make it hapen.

I suspect what's happening is that your local mpif90 is not picking up the processed .f files with a default fallback extension. You have to work out what you have to do to make the compile line work on your system, with your personal mpich build.

<span class='smallblacktext'>[ Edited Thu Aug 31 2006, 04:24PM ]</span>

compilation error with mpif90/g95 !!!

Posted: Wed Sep 06, 2006 8:13 am
by admin
please have a look whether there is a line
SUFFIX=.f90
in your makefile.
If necessary, add it

compilation error with mpif90/g95 !!!

Posted: Tue Sep 12, 2006 2:55 am
by arijit
Dear tjf & VASP admin,
Thank you so much for your valuable suggestions which helped me finally in obtaining the object (.o) files. However, I ended up with the following bug:
..................
..........................
/users/phy/ra/asen/MPI/bin/mpif77 -c main.f90
rm -f vasp
/users/phy/ra/asen/MPI/bin/mpif77 -o vasp main.o base.o mpi.o smart_a llocate.o xml.o constant.o jacobi.o main_mpi.o scala.o asa.o lattic e.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 dyn br.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 paircorrectio n.o optics.o constr_cell_relax.o stm.o finite_diff.o elpol.o setlocalp p.o /users/phy/ra/asen/fftw-2.1.5/mpi/fftw_mpi.o /users/phy/ra/asen/fftw-2.1. 5/mpi/fftw_f77_mpi.o /users/phy/ra/asen/fftw-2.1.5-install/lib/libfftw_mpi.a -L. ./vasp.4.lib -ldmy ../vasp.4.lib/linpack_double.o /users/phy/ra/asen/LAPACK/lapa ck_LINUX.a
ld: BFD 2.14.90.0.4 20030523 internal error, aborting at ../../bfd/elfcode.h lin e 226 in bfd_elf64_swap_symbol_in

ld: Please report this bug.

make: *** [vasp] Error 1

Please suggest me what changes need to be made in the makefile in resolving the above bug issue. It may be noted that I have succeeded in compiling the Siesta code in the parallel mode with the same mpich built on intel ifort/icc compilers.
With regards,
Arijit

compilation error with mpif90/g95 !!!

Posted: Wed Sep 13, 2006 9:52 am
by admin
this error must be due to an error in the installation of the gnu compiler and/or the libbfd.

compilation error with mpif90/g95 !!!

Posted: Thu Sep 14, 2006 2:08 am
by arijit
Dear Head Admin,
Though the problem of BFD error is cured by downloading binutils-2.17.50.0.3.tar.gz from ftp.kernel.org/pub/linux/devel/binutils and installing it, I come across with the following errors:
..........
........................
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 -L../vasp.4.lib -ldmy ../vasp.4.lib/linpack_double.o
main.o: In function `MAIN__':
main.f90:(.text+0x597a): undefined reference to `fftchk_'
main.f90:(.text+0x5b76): undefined reference to `fftchk_'
main.f90:(.text+0xbbc5): undefined reference to `fftini_'
main.f90:(.text+0xbbd2): undefined reference to `mapset_'
main.f90:(.text+0xbc1c): undefined reference to `mapset_'
main.f90:(.text+0xbc27): undefined reference to `mapset_'
main.f90:(.text+0xbc71): undefined reference to `mapset_'
main.f90:(.text+0xc0c0): undefined reference to `fftmakeplan_'
main.f90:(.text+0xf512): undefined reference to `fftwav_'
main.f90:(.text+0xf774): undefined reference to `fft3d_'
main.f90:(.text+0xf8af): undefined reference to `fft3d_'
main.f90:(.text+0xf8c7): undefined reference to `fft3d_'
main.f90:(.text+0xfa4f): undefined reference to `fftext_'
main.f90:(.text+0xfc31): undefined reference to `fftwav_'
mpi.o: In function `m_max_d_':
mpi.f90:(.text+0x6a2): undefined reference to `dcopy_'
mpi.o: In function `m_sumb_d_.':
mpi.f90:(.text+0x96b): undefined reference to `dcopy_'
mpi.o: In function `m_sumb_z_':
..............
....................
../vasp.4.lib/linpack_double.o: In function `zgefa_.':
linpack_double.f:(.text+0xcf1): undefined reference to `izamax_'
linpack_double.f:(.text+0xdd4): undefined reference to `zscal_'
linpack_double.f:(.text+0xe92): undefined reference to `zaxpy_'
../vasp.4.lib/linpack_double.o: In function `zgedi_':
linpack_double.f:(.text+0x1058): undefined reference to `zscal_'
linpack_double.f:(.text+0x10e1): undefined reference to `zaxpy_'
linpack_double.f:(.text+0x12e4): undefined reference to `zaxpy_'
linpack_double.f:(.text+0x1332): undefined reference to `zswap_'
make: *** [vasp] Error 1
..................................................
Can you please help me in resolving this?
With regards,
arijit .

compilation error with mpif90/g95 !!!

Posted: Tue Sep 26, 2006 9:12 am
by job
Upgrading binutils probably broke your linker. Unless you _really_ know what you're doing, replacing the system linker is usually a very bad idea.