help me: compile undefined reference ...

sudipta sinha sudip... at gmail.com
Thu Apr 14 11:16:13 UTC 2016


Hi All,

Anyone has resolved this issue. I am also facing the same problem as Zhang 
mentioned.

I look forward your answer.

Best
Sudipta

On Wednesday, December 30, 2009 at 4:43:17 AM UTC+5:30, Luca wrote:
>
> You should report all details for a correct ansewer.
> Anyway the problem is the same and it relies on an inconsistency
> in adding a trailing undescore in the object file name.
> By default, ifort add a trailing underscore, therefore you do not have
> problems to compile the cp2k.sopt serial version.
> When you  use mpif90, mpicc gcc icc ifort etc. to compile libraries
> and cp2k.popt parallel
> version, you should check consistency of the compiler options.
> In your case I suggest you check underscore compatibility.
> you should see also in mpi and ifort manuals.
> In this mailing list there are a some notes for g95 compiler.
> If you have problem with ifort, you can follow these notes.
> good luck
>
> > Thanks, but there is no further information searching the mailing
> > list. While in my SLmake.in file of compiling scalapack, there has
> > F77           = /home/zhang/software/cp2k/intel/mpich2-ifort/bin/
> > mpif90
> > CC            = /home/zhang/software/cp2k/intel/mpich2-ifort/bin/mpicc
> > NOOPT         =  -mp
> > F77FLAGS      =  $(NOOPT) -O3
> > CCFLAGS       = -O3
> > SRCFLAG       =
> > F77LOADER     = $(F77)
> > CCLOADER      = $(F77)
> > F77LOADFLAGS  =
> > CCLOADFLAGS   =  -nofor_main
> >
> > CDEFS         = -DNO_IEEE $(USEMPI) -DAdd_
> >
> > ARCH          = ar
> > ARCHFLAGS     = cr
> > RANLIB        = /usr/bin/ranlib
> >
> > Since the compile error message is so long that I miss some beginning
> > part, I noticed that the lib files, libcp2k_base_lib.a
> > libcp2k_fft_lib.a  libcp2k_lib.a,  generated in CP2K/lib/Linux-x86-64-
> > intel/popt/ also have the undefined reference problems. Such as:
> >
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_types.o): In function
> > `kg_gpw_fm_mol_types_mp_kg_gpw_fm_mol_to_fm_mol_':
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_types.F:(.text+0xf48): undefined reference to `dcopy_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_utils.o): In function
> > `kg_gpw_fm_mol_utils_mp_read_mo_mol_restart_':
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x740): undefined reference to `dcopy_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x79f): undefined reference to `dcopy_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x7fe): undefined reference to `dcopy_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x222f): undefined referenceto `dcopy_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_utils.o):/home/zhang/
> > software/cp2k/intel/test/cp2k/makefiles/../src/kg_gpw_fm_mol_utils.F:
> > (.text+0x2371): more undefined references to `dcopy_' follow
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_utils.o): In function
> > `kg_gpw_fm_mol_utils_mp_mol_mo_random_':
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x79f1): undefined referenceto `dlarnv_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_utils.o): In function
> > `kg_gpw_fm_mol_utils_mp_fm_mol_syevx_':
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x7b8a): undefined referenceto `dlamch_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x7e40): undefined referenceto `ilaenv_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x7e86): undefined referenceto `ilaenv_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x8277): undefined referenceto `dsyevx_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_utils.o): In function
> > `kg_gpw_fm_mol_utils_mp_fm_mol_syevd_':
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x8c9a): undefined referenceto `dsyevd_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x8d07): undefined referenceto `dcopy_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../lib/Linux-
> > x86-64-intel/popt/libcp2k_lib.a(kg_gpw_fm_mol_utils.o): In function
> > `kg_gpw_fm_mol_utils_mp_fm_mol_power_':
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x9181): undefined referenceto `dlamch_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x9500): undefined referenceto `ilaenv_'
> > /home/zhang/software/cp2k/intel/test/cp2k/makefiles/../src/
> > kg_gpw_fm_mol_utils.F:(.text+0x9547): undefined referenceto `ilaenv_'
> >
> > Zhang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20160414/948bea84/attachment.htm>


More information about the CP2K-user mailing list