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

From: Vincent Kraeutler (
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: wrote:
> [snip]
In function `free':
> : multiple definition of `free'
> ult.o(.text+0x35bc): first defined here
> /usr/bin/ld: Warning: size of symbol `free' changed from 29 in
> 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)
In function `malloc
> ':
> : multiple definition of `malloc'


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
(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

$ ./build charm++ mpi-linux
--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


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