[CPMD-list] IFC: "undefined reference"

Axel Kohlmeyer axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Wed Feb 25 15:55:31 CET 2004


On Wed, 25 Feb 2004, Dr. Balasubramanian Sundaram wrote:

BS> Dear All,
BS> 
BS>     I have been having this trivial, yet nagging problem, and thought
BS> I should seek help to preserve my sanity!
BS> 
BS> Details: CPMD 3.7.2, IFORT (IFC's new name): version 8.0, 
BS> P4 at 3.0 GHz (with HT), Mandrake Linux 9.2 (kernel 2.4.22), with
BS> Intel's MKL version 6.0, gcc, lam-mpi version 7.0.4
BS> 
BS> I compiled lam-mpi using ifort compiler, using "FFLAGS=-us" option
BS> (i.e., equivalent of "-assume underscore"). lam-mpi compiled fine,
BS> and I could compile and run their examples/pi/fpi code properly 
BS> on two nodes.

dear bala,

stupid question: why are you messing with the underscoring, when
you are compiling cpmd _and_ lam with the intel compiler anyway?

BS> 
BS> I have problems at the link stage for CPMD. I provide at the end of this
BS> mail, my Makefile. Here, I give the output of the command,
BS> 
BS> /home/bala/lam-7.0.4/tools/wrappers/mpif77 -showme
BS> 
BS> OUTPUT: 
BS> ifort -I/usr/include -llammpio -llamf77mpi -lmpi -llam -lutil

hmm. you seem to be running lam from the compilation directory.
most likely you are not picking up the new libraries, but
an old set, that is installed in the default library search
path. if my assertion is correct, than you would have to run
'make install' first. alternatively, you may be able to get
away with telling the linker via -L/home/bala/lam-7.0.4/and/so/on...
where to pick up the new libraries. but then again, you will
run into trouble when you start the lam daemons, since lamboot
will not find the matching executables.


BS> 
BS> All CPMD routines compile fine, but at the linker stage, I get the
BS> error message,
BS> =================
BS> my_para.o(.text+0x6): In function `my_start_':
BS> : undefined reference to `mpi_init_'
BS> my_para.o(.text+0xbe5): In function `my_end_':
BS> : undefined reference to `mpi_finalize_'
BS> =================
BS> 
BS> I appreciate your help,
BS> 
BS> Thanks,
BS> 
BS> Regards,
BS> Bala
BS> -------------------------MAKEFILE HEADER--------------------------
BS> 
BS> FFLAGS = -c -r8 -w90 -w95 -O3 -pc64 -axM -ip -tpp7 -us
BS> 
BS> LFLAGS =  \
BS>          -L/opt/intel/mkl60/lib/32 -lmkl_lapack \
BS>          -lmkl_ia32 -lmkl_p4 -lguide \
BS>          -static-libcxa -Xlinker -Bstatic -lsvml         \
BS> 	 /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/libg2c.a  \
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

you should not need this. this is the g77 runtime. in fact it 
may collide with the intel fortran runtime.

hope this helps,
	axel kohlmeyer.


BS> 	 -Vaxlib -Xlinker -Bdynamic
BS> CFLAGS = -c -O2 -Wall
BS> CPP = /lib/cpp -P -C -traditional 
BS> 
BS> CPPFLAGS = -D__Linux -D__PGI -DLAPACK -DFFT_DEFAULT \
BS>                -DMP_LIBRARY=__MPI -DMYRINET -DLINUX_IFC  
BS> NOOPT_FLAG = 
BS> 
BS> CC = /home/bala/lam-7.0.4/tools/wrappers/mpicc
BS> FC = /home/bala/lam-7.0.4/tools/wrappers/mpif77
BS> LD = /home/bala/lam-7.0.4/tools/wrappers/mpif77
BS> ---------------------------------------------------------------------
BS> _______________________________________________
BS> CPMD-list mailing list
BS> CPMD-list at cpmd.org
BS> http://www.cpmd.org/mailman/listinfo/cpmd-list
BS> 
BS> 

-- 


=======================================================================
Dr. Axel Kohlmeyer                        e-mail: axel.kohlmeyer at rub.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================





More information about the CPMD-list mailing list