Re: Help Needed>Compiling source namd mpi enabled for a linux cluster

From: Vincent Kraeutler (vincent_at_kraeutler.net)
Date: Fri Jul 27 2007 - 03:47:40 CDT

I don't know the exact solution, but I can spell out the error message
in a way that strongly suggests a set of possible solutions. Tracking
back your error message to the point where a fatal error first appears,
you find:

Daniel.G.Roberts_at_sanofi-aventis.com wrote:
> [snip]
>
>
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libc.a(malloc.o)(.text+0x14fc):
In function `free':
> : multiple definition of `free'
>
/global/bwsn001/home/users1/nm67371/NAMD_2.6_Source/charm-5.9/mpi-linux/bin/../lib/libmemory-defa
> ult.o(.text+0x35bc): first defined here
> /usr/bin/ld: Warning: size of symbol `free' changed from 29 in
/global/bwsn001/home/users1/nm6737
> 1/NAMD_2.6_Source/charm-5.9/mpi-linux/bin/../lib/libmemory-default.o
to 175 in /usr/lib/gcc/i386-
> redhat-linux/3.4.5/../../../libc.a(malloc.o)
>
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libc.a(malloc.o)(.text+0x3058):
In function `malloc
> ':
> : multiple definition of `malloc'

[snip]

i.e. 'malloc' is defined in both
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libc.a (i.e. your standard
C library) and in
~/NAMD_2.6_Source/charm-5.9/mpi-linux/bin/../lib/libmemory-default.o
(i.e. your charm library).

personally, i would suggest you go over your charm install, making sure
that the charm library is not statically linked with your C library (in
which case i suppose malloc et al. will become part of your charm
library, and subsequent attempts to link to both your charm library and
the standard library will fail). in particular, the following looks
suspicious

$ ./build charm++ mpi-linux
--basedir=/global/bwsn002/software/ia32/mpi/mpich-1.2.7/ch_p4
--no-build-shared -verbose -O -DCMK_OPTIMIZE=1

(note the --no-build-shared), Instead, I would try

$ ./build charm++ mpi-linux
--basedir=/global/bwsn002/software/ia32/mpi/mpich-1.2.7/ch_p4 -verbose
-O -DCMK_OPTIMIZE=1

Cheers,
v.


This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:46:41 CST