Dear SIESTA users,
i want to compile the parallel version of SIESTA with the Portland Group
Compiler PGF90 version 5.1-3. The compilation process works very well
but at the last step when linking all the object files together to the
binary "siesta" i get the following errors:
---------------------------------------------------------------------------------
alloc.o: In function `alloc_alloc_report__':
alloc.o(.text+0x5a4): undefined reference to `mpi__integer_s_mpi_bcast_t__'
alloc.o(.text+0x5e2): undefined reference to
`mpi__character_s_mpi_bcast_t__'
alloc.o: In function `alloc_print_report__':
alloc.o(.text+0x10983): undefined reference to `mpi__r8_s_mpi_reduce_t__'
alloc.o(.text+0x109c5): undefined reference to `mpi__r8_v_mpi_reduce_t__'
alloc.o(.text+0x10a18): undefined reference to
`mpi__integer_s_mpi_bcast_t__'
alloc.o(.text+0x10a60): undefined reference to `mpi__r8_s_mpi_send_t__'
alloc.o(.text+0x10aaf): undefined reference to `mpi__r8_s_mpi_recv_t__'
phonon.o: In function `phonon_phonon_check__':
phonon.o(.text+0xbf): undefined reference to `mpi__logical_s_mpi_bcast_t__'
phonon.o: In function `phonon_phonon_setup__':
phonon.o(.text+0x692): undefined reference to `mpi__integer_s_mpi_bcast_t__'
phonon.o(.text+0x6c2): undefined reference to `mpi__integer_v_mpi_bcast_t__'
phonon.o(.text+0x6fb): undefined reference to
`mpi__character_v_mpi_bcast_t__'
phonon.o(.text+0x739): undefined reference to `mpi__r8_s_mpi_bcast_t__'
writewave.o: In function `writewave_initwave_':
writewave.o(.text+0x487): undefined reference to
`mpi__logical_s_mpi_bcast_t__'
writewave.o(.text+0x50d): undefined reference to `mpi__r8_s_mpi_bcast_t__'
writewave.o(.text+0x6c2): undefined reference to
`mpi__character_s_mpi_bcast_t__'
---------------------------------------------------------------------------------
and so on. There are in every function the same symbols which are
undefined. But these symbols are a part of SIESTA itself and are not
external.
Some data:
arch.make
---------------------------------------------------------------------------------
SIESTA_ARCH=pgf90-mpich
#
FC=pgf90
FC_ASIS=$(FC)
#
#FFLAGS= -fast
FFLAGS= -fast -Msecond_underscore
#FFLAGS_DEBUG= -g -O0
FFLAGS_DEBUG= -g -O0 -Msecond_underscore
RANLIB=echo
#COMP_LIBS=dc_lapack.a
COMP_LIBS=linalg.a
#
NETCDF_LIBS= # /usr/local/netcdf-3.5/lib/pgi/libnetcdf.a
NETCDF_INTERFACE= # libnetcdf_f90.a
DEFS_CDF= # -DCDF
#
MPI_INTERFACE=libmpi_f90.a
MPI_INCLUDE=/usr/local/include
DEFS_MPI=-DMPI
#
# There are (were?) some problems with command-line processing compatibility
# that forced the extraction of "pgi.aux" and "pgiarg" as independent
# libraries (details unfortunately lost)
#
#LIBS= -L/usr/local/lib/pgi \
# -lscalapack -l1upblas -l1utools -l.pgi.aux -lredist \
# -lfblacs -llapack -lblas \
# -l1umpich -lpgiarg $(NETCDF_LIBS)
LIBS= -L/usr/local/lib -lg2c -llamf77mpi -lmpi -llam $(NETCDF_LIBS)
SYS=bsd
DEFS= $(DEFS_CDF) $(DEFS_MPI)
#
#
# Important (at least for V5.0-1 of the pgf90 compiler...)
# Compile atom.f without optimization.
#
atom.o:
$(FC) -c $(FFLAGS_DEBUG) ./atom.f
#
.F.o:
$(FC) -c $(FFLAGS) $(DEFS) $<
.f.o:
$(FC) -c $(FFLAGS) $<
.F90.o:
$(FC) -c $(FFLAGS) $(DEFS) $<
.f90.o:
$(FC) -c $(FFLAGS) $<
#
---------------------------------------------------------------------------------
Makefile
---------------------------------------------------------------------------------
#
# Copyright (c) Fundacion General Universidad Autonoma de Madrid:
# E.Artacho, J.Gale, A.Garcia, J.Junquera, P.Ordejon, D.Sanchez-Portal
# and J.M.Soler, 1996-2003
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Makefile for siesta
#
.SUFFIXES: .f .F .o .a .f90 .F90
#
default: what siesta gen-basis
#
include arch.make
#
# Uncomment the following line for debugging support
#
#FFLAGS=$(FFLAGS_DEBUG)
#
what:
@echo
@echo "Compilation architecture to be used: ${SIESTA_ARCH}"
@echo "If this is not what you want, create the right"
@echo "arch.make file using the models in Sys"
@echo
@echo "Hit ^C to abort..."
@sleep 2
#
SYSOBJ=$(SYS).o
#
# Note that machine-specific files are now in top Src directory.
#
OBJS = arw.o atomlwf.o bands.o bessph.o cgwf.o chkdim.o chkgmx.o \
chempot.o coceri.o conjgr.o constr.o coxmol.o cross.o \
denmat.o detover.o dfscf.o dhscf.o diagon.o digcel.o fft3d.o \
diagg.o diagk.o diagkp.o diag2g.o diag2k.o diagpol.o \
diagsprl.o dipole.o dismin.o dnaefs.o dot.o dynamics.o \
efield.o egandd.o ener3.o extrapol.o extrapolon.o \
fermid.o fixed.o forhar.o gradient.o grdsam.o \
hsparse.o idiag.o initatom.o initdm.o inver.o \
iodm.o iohs.o iolwf.o iorho.o ioxv.o ipack.o \
kgrid.o kgridinit.o kinefsm.o ksv.o ksvinit.o linpack.o \
madelung.o matel.o meshmatrix.o memory.o meshsubs.o \
minvec.o mulliken.o naefs.o neighb.o nlefsm.o \
on_subs.o ordern.o outcell.o outcoor.o overfsm.o \
paste.o pdos.o pdosg.o pdosk.o phirphi.o pixmol.o plcharge.o \
timestamp.o propor.o pulayx.o \
ranger.o ran3.o recipes.o reclat.o redata.o redcel.o \
reinit.o reord.o rhoofd.o rhoofdsp.o rhooda.o \
savepsi.o shaper.o timer.o \
vmb.o vmat.o vmatsp.o volcel.o xc.o xijorb.o \
cellxc.o cdiag.o rdiag.o \
cgvc.o iocg.o ioeig.o iofa.o iokp.o iomd.o repol.o typecell.o \
ofc.o poison.o readsp.o radfft.o \
siesta.o io.o \
spin_init.o coor.o transfer.o \
broadcast_basis.o sig.o eggbox.o
#
FDF=libfdf.a
$(FDF):
(cd fdf ; $(MAKE) module)
#
# Routines using fdf calls.
#
dhscf.o initdm.o iodm.o iohs.o iolwf.o iorho.o grdsam.o : $(FDF)
recoor.o outcoor.o ioxv.o kgrid.o kgridinit.o ksv.o : $(FDF)
redata.o siesta.o diagon.o pdos.o plcharge.o: $(FDF)
coor.o cgvc.o iocg.o ioeig.o iofa.o iokp.o iomd.o repol.o ofc.o : $(FDF)
readsp.o eggbox.o : $(FDF)
#
atom.o basis_specs.o: $(FDF)
gen-basis.o: $(FDF)
#
#
# This is crude but will have to do for now.
# Note : precision must be the first module
#
MOD_OBJS=precision.o atom.o atmparams.o atmfuncs.o listsc.o \
memoryinfo.o numbvect.o parallel.o sorting.o \
atomlist.o ionew.o atm_types.o old_atmfuncs.o radial.o parsing.o\
alloc.o phonon.o spher_harm.o periodic_table.o version.o \
basis_types.o pseudopotential.o basis_specs.o sys.o basis_io.o\
chemical.o xml.o writewave.o
COM_OBJS=$(OBJS) $(SYSOBJ)
ALL_OBJS=$(MOD_OBJS) $(COM_OBJS)
#
arw.o: ionew.o
initatom.o: basis_specs.o basis_types.o basis_io.o
atom.o: basis_types.o
basis_specs.o: pseudopotential.o basis_types.o chemical.o
basis_types.o: pseudopotential.o atmparams.o
atom.o initatom.o transfer.o plcharge.o : old_atmfuncs.o
basis_types.o atom.o old_atmfuncs.o atmfuncs.o: atmparams.o
atomlwf.o dhscf.o dnaefs.o : atmfuncs.o
efield.o matel.o mulliken.o outcoor.o : atmfuncs.o
overfsm.o shaper.o : atmfuncs.o
atomlist.o : atmfuncs.o
kinefsm.o naefs.o nlefsm.o overfsm.o : atmfuncs.o
siesta.o : atmfuncs.o phonon.o ordern.o hsparse.o
redata.o : phonon.o
dfscf.o hsparse.o : atmfuncs.o listsc.o
rhoofd.o rhoofdsp.o vmat.o vmatsp.o : listsc.o
hsparse.o minvec.o : sorting.o
chempot.o : numbvect.o
memory.o : memoryinfo.o
dhscf.o dfscf.o forhar.o rhooda.o rhoofd.o rhoofdsp.o : meshsubs.o
vmat.o vmatsp.o : meshsubs.o
dfscf.o rhoofd.o rhoofdsp.o vmat.o vmatsp.o : meshmatrix.o
siesta.o: atomlist.o
old_atmfuncs.o atomlist.o siesta.o atom.o: ionew.o
coor.o: atomlist.o
radial.o: xml.o
atm_types.o: radial.o
transfer.o: atm_types.o atmfuncs.o radial.o periodic_table.o
atmfuncs.o: atm_types.o radial.o
old_atmfuncs.o atmfuncs.o matel.o: spher_harm.o
#
diag2g.o diag2k.o diagg.o diagk.o diagkp.o diagsprl.o ionew.o: sys.o
atmfuncs.o atom.o basis_specs.o: sys.o
chkdim.o coor.o diagpol.o matel.o old_atmfuncs.o periodic_table.o: sys.o
pdos.o: xml.o atmfuncs.o atomlist.o
propor.o spher_harm.o pseudopotential.o: sys.o
redata.o dhscf.o: sys.o
#----------------------------------------------------
matel.o basis_io.o atom.o : radfft.o
#
basis_io.o: ionew.o atm_types.o atmfuncs.o radial.o sys.o chemical.o\
basis_types.o xml.o
basis_io.o: $(FDF) $(NETCDF_INTERFACE)
siesta.o bands.o efield.o fixed.o grdsam.o writewave.o: parsing.o
initdm.o repol.o ksv.o: parsing.o
#
siesta.o atomlist.o coor.o dfscf.o matel.o: alloc.o
#
broadcast_basis.o: atm_types.o
atom.o basis_specs.o: periodic_table.o
#
$(COM_OBJS): precision.o parallel.o $(MPI_INTERFACE)
#
# Interfaces to libraries
#
libmpi_f90.a:
@(cd MPI ; $(MAKE) )
libnetcdf_f90.a:
@(cd NetCDF ; $(MAKE) )
#
# Libraries that might need to be compiled
#
linalg.a: Libs/blas.f Libs/lapack.f
@echo "==> Compiling linalg.a in Libs..."
@(cd Libs ; $(MAKE) linalg.a)
dc_lapack.a: Libs/dc_lapack.f
@echo "==> Compiling dc_lapack.a in Libs..."
@(cd Libs ; $(MAKE) dc_lapack.a)
#
version:
@echo
@echo "==> Incorporating information about present compilation
(compiler and flags)"
@sed "s/SIESTA_ARCH/${SIESTA_ARCH}/g" version.F90 > temp0.F90
@sed "s/FFLAGS/${FC} ${FFLAGS}/g" temp0.F90 > compinfo.F90
@($(MAKE) -s "FC=$(FC)" "FFLAGS=$(FFLAGS)" compinfo.o)
@rm -f temp0.F90 compinfo.F90
@mv compinfo.o version.o
@echo
siesta: version $(MPI_INTERFACE) $(NETCDF_INTERFACE) $(FDF) \
$(COMP_LIBS) $(ALL_OBJS)
@echo "letzter Übersetzungschritt"
$(FC) -o siesta \
$(LDFLAGS) $(ALL_OBJS) $(FDF) $(MPI_INTERFACE)\
$(NETCDF_INTERFACE) $(COMP_LIBS) $(LIBS)
#
GEN-BASIS_OBJS=gen-basis.o basis_types.o precision.o\
basis_io.o chemical.o transfer.o atm_types.o\
atmparams.o atmfuncs.o old_atmfuncs.o radial.o spher_harm.o
io.o \
paste.o memoryinfo.o memory.o ionew.o \
chkdim.o basis_specs.o atom.o periodic_table.o\
pseudopotential.o dot.o xc.o recipes.o arw.o radfft.o\
bessph.o sys.o timer.o xml.o $(SYSOBJ)
# precision must be the first one here...
gen-basis.o: precision.o atom.o basis_types.o basis_specs.o basis_io.o
$(FDF)
gen-basis: version $(NETCDF_INTERFACE) $(MPI_INTERFACE) $(FDF) \
$(COMP_LIBS) $(GEN-BASIS_OBJS)
$(FC) -o gen-basis \
$(LDFLAGS) $(GEN-BASIS_OBJS) $(MPI_INTERFACE) $(FDF) \
$(NETCDF_INTERFACE) $(COMP_LIBS) $(LIBS)
#
clean:
@echo "==> Cleaning object, library, and executable files"
rm -f siesta gen-basis *.o *.a *.pcl *.pc
rm -f *.mod
(cd fdf ; $(MAKE) clean)
@if [ -d MPI ] ; then (cd MPI && $(MAKE) clean ) ; fi
(cd NetCDF ; $(MAKE) clean )
(cd Libs ; $(MAKE) clean )
pristine: clean
cp -fp Include/constr.f .
#
---------------------------------------------------------------------------------
It would be great if anybody can help me.
Thank you.
Sincerely, Markus