help me: compile undefined reference ...
netscape
yshzh... at gmail.com
Mon Dec 28 21:45:19 UTC 2009
Dear *,*
I am trying to compile the latest CP2K on our linux cluster, Dual-Core
AMD Opteron x86_64 GNU/Linux. Using Intel Fortran compiler ifort
(version 10.1), the serial CP2K version was successfully installed
using Linux-x86-64-intel.sopt. But when I come to the MPI parallel
version, it has tortured me for several days, and no lucky at all. I
first installed the mpich2, all binary files like mpicc and mpif90 are
appeared. Under the help of scalapack_installer_0.96, I compiled BLAS,
BLACS, lapack-3.2.1 and scalapck-1.8.0 by mpicc and mpif90 without any
error. A ifort64_mp ACML was downloaded from website.
In my Linux-x86-64-intel.popt file:
CC = /home/zhang/software/cp2k/intel/mpich2-ifort/bin/mpicc
CPP =
FC = /home/zhang/software/cp2k/intel/mpich2-ifort/bin/mpif90
LD = /home/zhang/software/cp2k/intel/mpich2-ifort/bin/mpif90
AR = ar -r
DFLAGS = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK -
D__FFTW3
CPPFLAGS =
FCFLAGS = $(DFLAGS) -I /home/zhang/software/cp2k/intel/include -I /
home/zhang/software/cp2k/intel/acml4.3.0/ifort64_mp/include -mp -O3 -
xW -heap-arrays 64 -funroll-loops -fpp -free
FCFLAGS2 = $(DFLAGS) -I /home/zhang/software/cp2k/intel/include -I /
home/zhang/software/cp2k/intel/acml4.3.0/ifort64_mp/include -mp -O1 -
xW -heap-arrays 64 -fpp -free
LDFLAGS = $(FCFLAGS) -I /home/zhang/software/cp2k/intel/include -I /
home/zhang/software/cp2k/intel/acml4.3.0/ifort64_mp/include
LIBS = /home/zhang/software/cp2k/intel/lib/lib/libscalapack.a \
/home/zhang/software/cp2k/intel/lib/lib/blacsF77.a \
/home/zhang/software/cp2k/intel/lib/lib/blacs.a \
/home/zhang/software/cp2k/intel/acml4.3.0/ifort64_mp/lib/
libacml.a \
/home/zhang/software/cp2k/intel/acml4.3.0/ifort64_mp/lib/
libacml_mv.a \
/home/zhang/software/cp2k/intel/lib/libfftw3.a
OBJECTS_ARCHITECTURE = machine_intel.o
graphcon.o: graphcon.F
$(FC) -c $(FCFLAGS2) $<
With this script file, it generates lots of undefined reference error
messages when it's trying to use libscapack.a. For example,
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a
(pdelget.o):pdelget.f:(.text+0x2cb): more undefined references to
`lsame_'
follow
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a
(PB_Cstypeset.o): In function `PB_Cstypeset':
PB_Cstypeset.c:(.text+0x176): undefined reference to
`saxpy_'
PB_Cstypeset.c:(.text+0x181): undefined reference to
`scopy_'
PB_Cstypeset.c:(.text+0x18c): undefined reference to
`sswap_'
PB_Cstypeset.c:(.text+0x197): undefined reference to
`sgemv_'
PB_Cstypeset.c:(.text+0x1a2): undefined reference to
`ssymv_'
PB_Cstypeset.c:(.text+0x1ad): undefined reference to
`ssymv_'
PB_Cstypeset.c:(.text+0x1b8): undefined reference to
`strmv_'
PB_Cstypeset.c:(.text+0x1c3): undefined reference to
`strsv_'
PB_Cstypeset.c:(.text+0x1fa): undefined reference to
`sger_'
PB_Cstypeset.c:(.text+0x205): undefined reference to
`sger_'
PB_Cstypeset.c:(.text+0x210): undefined reference to
`ssyr_'
PB_Cstypeset.c:(.text+0x21b): undefined reference to
`ssyr_'
PB_Cstypeset.c:(.text+0x226): undefined reference to
`ssyr2_'
PB_Cstypeset.c:(.text+0x231): undefined reference to
`ssyr2_'
PB_Cstypeset.c:(.text+0x23c): undefined reference to
`sgemm_'
PB_Cstypeset.c:(.text+0x247): undefined reference to
`ssymm_'
PB_Cstypeset.c:(.text+0x252): undefined reference to
`ssymm_'
PB_Cstypeset.c:(.text+0x25d): undefined reference to
`ssyrk_'
PB_Cstypeset.c:(.text+0x268): undefined reference to
`ssyrk_'
PB_Cstypeset.c:(.text+0x273): undefined reference to
`ssyr2k_'
PB_Cstypeset.c:(.text+0x27e): undefined reference to
`ssyr2k_'
PB_Cstypeset.c:(.text+0x289): undefined reference to
`strmm_'
PB_Cstypeset.c:(.text+0x294): undefined reference to
`strsm_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdtran.o): In
function `pbdtran_':
pbdtran.f:(.text+0xc0): undefined reference to
`lsame_'
pbdtran.f:(.text+0xe5): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdtran.o): In
function `pbdtr2af_':
pbdtran.f:(.text+0x1f86): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdtran.o): In
function `pbdtr2bt_':
pbdtran.f:(.text+0x22d8): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdtran.o): In
function `pbdtr2at_':
pbdtran.f:(.text+0x25f9): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a
(pbdmatadd.o):pbdmatadd.f:(.text+0xd9): more undefined references to
`lsame_'
follow
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdmatadd.o):
In function `pbdmatadd_':
pbdmatadd.f:(.text+0x34f1): undefined reference to
`daxpy_'
pbdmatadd.f:(.text+0x351c): undefined reference to
`lsame_'
pbdmatadd.f:(.text+0x358d): undefined reference to
`daxpy_'
pbdmatadd.f:(.text+0x3d13): undefined reference to
`dcopy_'
pbdmatadd.f:(.text+0x3d3e): undefined reference to
`lsame_'
pbdmatadd.f:(.text+0x3da3): undefined reference to
`dcopy_'
pbdmatadd.f:(.text+0x4045): undefined reference to
`dscal_'
pbdmatadd.f:(.text+0x4070): undefined reference to
`lsame_'
pbdmatadd.f:(.text+0x40bb): undefined reference to
`dscal_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdtrsrt.o): In
function `pbdtrsrt_':
pbdtrsrt.f:(.text+0x62): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbdtrget.o): In
function `pbdtrget_':
pbdtrget.f:(.text+0x49): undefined reference to
`lsame_'
pbdtrget.f:(.text+0x28f): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a
(PB_Cdtypeset.o): In function `PB_Cdtypeset':
PB_Cdtypeset.c:(.text+0x185): undefined reference to
`daxpy_'
PB_Cdtypeset.c:(.text+0x190): undefined reference to
`dcopy_'
PB_Cdtypeset.c:(.text+0x19b): undefined reference to
`dswap_'
PB_Cdtypeset.c:(.text+0x1a6): undefined reference to
`dgemv_'
PB_Cdtypeset.c:(.text+0x1b1): undefined reference to
`dsymv_'
PB_Cdtypeset.c:(.text+0x1bc): undefined reference to
`dsymv_'
PB_Cdtypeset.c:(.text+0x1c7): undefined reference to
`dtrmv_'
PB_Cdtypeset.c:(.text+0x1d2): undefined reference to
`dtrsv_'
PB_Cdtypeset.c:(.text+0x209): undefined reference to
`dger_'
PB_Cdtypeset.c:(.text+0x214): undefined reference to
`dger_'
PB_Cdtypeset.c:(.text+0x21f): undefined reference to
`dsyr_'
PB_Cdtypeset.c:(.text+0x22a): undefined reference to
`dsyr_'
PB_Cdtypeset.c:(.text+0x235): undefined reference to
`dsyr2_'
PB_Cdtypeset.c:(.text+0x240): undefined reference to
`dsyr2_'
PB_Cdtypeset.c:(.text+0x24b): undefined reference to
`dgemm_'
PB_Cdtypeset.c:(.text+0x256): undefined reference to
`dsymm_'
PB_Cdtypeset.c:(.text+0x261): undefined reference to
`dsymm_'
PB_Cdtypeset.c:(.text+0x26c): undefined reference to
`dsyrk_'
PB_Cdtypeset.c:(.text+0x277): undefined reference to
`dsyrk_'
PB_Cdtypeset.c:(.text+0x282): undefined reference to
`dsyr2k_'
PB_Cdtypeset.c:(.text+0x28d): undefined reference to
`dsyr2k_'
PB_Cdtypeset.c:(.text+0x298): undefined reference to
`dtrmm_'
PB_Cdtypeset.c:(.text+0x2a3): undefined reference to
`dtrsm_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pdswap_.o): In
function `pdswap_':
pdswap_.c:(.text+0x1505): undefined reference to
`dcopy_'
pdswap_.c:(.text+0x1ab2): undefined reference to
`dswap_'
pdswap_.c:(.text+0x1d68): undefined reference to
`dcopy_'
pdswap_.c:(.text+0x23b3): undefined reference to
`dswap_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbztrnv.o): In
function `pbztrnv_':
pbztrnv.f:(.text+0x6d): undefined reference to
`lsame_'
pbztrnv.f:(.text+0x8d): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbzvecadd.o):
In function `pbzvecadd_':
pbzvecadd.f:(.text+0x191): undefined reference to
`lsame_'
pbzvecadd.f:(.text+0x31c): undefined reference to
`lsame_'
pbzvecadd.f:(.text+0x730): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a
(pbzvecadd.o):pbzvecadd.f:(.text+0xabb): more undefined references to
`lsame_'
follow
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbzvecadd.o):
In function `pbzvecadd_':
pbzvecadd.f:(.text+0x138f): undefined reference to
`zcopy_'
pbzvecadd.f:(.text+0x1909): undefined reference to
`zaxpy_'
pbzvecadd.f:(.text+0x1bd7): undefined reference to
`zscal_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pbztrst1.o): In
function `pbztrst1_':
pbztrst1.f:(.text+0x51): undefined reference to
`lsame_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a
(PB_Cztypeset.o): In function `PB_Cztypeset':
PB_Cztypeset.c:(.text+0x198): undefined reference to
`zaxpy_'
PB_Cztypeset.c:(.text+0x1a3): undefined reference to
`zcopy_'
PB_Cztypeset.c:(.text+0x1ae): undefined reference to
`zswap_'
PB_Cztypeset.c:(.text+0x1b9): undefined reference to
`zgemv_'
PB_Cztypeset.c:(.text+0x1cf): undefined reference to
`zhemv_'
PB_Cztypeset.c:(.text+0x1da): undefined reference to
`ztrmv_'
PB_Cztypeset.c:(.text+0x1e5): undefined reference to
`ztrsv_'
PB_Cztypeset.c:(.text+0x21c): undefined reference to
`zgerc_'
PB_Cztypeset.c:(.text+0x227): undefined reference to
`zgeru_'
PB_Cztypeset.c:(.text+0x23d): undefined reference to
`zher_'
PB_Cztypeset.c:(.text+0x253): undefined reference to
`zher2_'
PB_Cztypeset.c:(.text+0x25e): undefined reference to
`zgemm_'
PB_Cztypeset.c:(.text+0x269): undefined reference to
`zsymm_'
PB_Cztypeset.c:(.text+0x274): undefined reference to
`zhemm_'
PB_Cztypeset.c:(.text+0x27f): undefined reference to
`zsyrk_'
PB_Cztypeset.c:(.text+0x28a): undefined reference to
`zherk_'
PB_Cztypeset.c:(.text+0x295): undefined reference to
`zsyr2k_'
PB_Cztypeset.c:(.text+0x2a0): undefined reference to
`zher2k_'
PB_Cztypeset.c:(.text+0x2ab): undefined reference to
`ztrmm_'
PB_Cztypeset.c:(.text+0x2b6): undefined reference to
`ztrsm_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pzswap_.o): In
function `pzswap_':
pzswap_.c:(.text+0x1505): undefined reference to
`zcopy_'
pzswap_.c:(.text+0x1ab2): undefined reference to
`zswap_'
pzswap_.c:(.text+0x1d68): undefined reference to
`zcopy_'
pzswap_.c:(.text+0x23b3): undefined reference to
`zswap_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pzscal_.o): In
function `pzscal_':
pzscal_.c:(.text+0x25e): undefined reference to
`zscal_'
pzscal_.c:(.text+0x34a): undefined reference to
`zscal_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pzgemv_.o): In
function `pzgemv_':
pzgemv_.c:(.text+0x6a4): undefined reference to
`zgemv_'
pzgemv_.c:(.text+0xade): undefined reference to
`zgemv_'
pzgemv_.c:(.text+0xe5e): undefined reference to
`zscal_'
pzgemv_.c:(.text+0xf3a): undefined reference to
`zscal_'
/home/zhang/software/cp2k/intel/lib/lib/libscalapack.a(pzhemv_.o): In
function `pzhemv_':
pzhemv_.c:(.text+0x80e): undefined reference to
`zscal_'
pzhemv_.c:(.text+0x9de): undefined reference to
`zgemv_'
pzhemv_.c:(.text+0xa75): undefined reference to
`zgemv_'
pzhemv_.c:(.text+0x1118): undefined reference to
`zscal_'
pzhemv_.c:(.text+0x13c1): undefined reference to
`zgemv_'
pzhemv_.c:(.text+0x1469): undefined reference to
`zgemv_'
pzhemv_.c:(.text+0x1796): undefined reference to
`zscal_'
pzhemv_.c:(.text+0x1903): undefined reference to `zscal_'
Any idea is welcomed and thanks in advance
Zhang
More information about the CP2K-user
mailing list