[gmx-users] Compiling with MPICH
lindahl at sbc.su.se
Mon Sep 27 11:46:23 CEST 2004
Your MPI library seems to be dependent of pthreads, so you'll have to
add that library to the link stage too.
For reference, the MPI test in the configure script tries to compile &
link a trivial MPI program that calls MPI_Initialize but nothing else.
For a correctly installed MPI library all necessary headers paths and
libraries should be added automatically when you compile with "mpicc".
On Sep 26, 2004, at 5:50 PM, Amadeu Sum wrote:
> I am having some problems compiling Gromacs with MPICH. When I run
> configure, it stops at:
> checking whether the MPI cc command works... configure: error: Cannot
> compile and link MPI code with mpicc
> I have read previous posting with similar problem, but I believe I
> have been setting the correct path and variables as suggested. Here is
> how I am running configure:
>> CPPFLAGS="-I/usr/local/fftw-mpi/include -I/usr/local/mpich/include
>> -I/usr/local/gm/include" LDFLAGS="-L/usr/local/fftw-mpi/lib
>> -L/usr/local/mpich/lib -L/usr/local/gm/lib" LIBS="-lmpich -lgm -lm
>> -static" ./configure --prefix=/usr/local/gromacs_mpi --disable-float
>> --enable-mpi --enable-all-static --without-x --without-xml
> I have also tried to export those variables instead of specifying as
> show above and I still get the same problem. I also tried not
> specifying the path to mpicc, but instead use MPICC=cc, and that got
> me to the same place too.
> If I look at the config.log file, I see:
> configure:3422: mpicc -o conftest -g -O2 -I/usr/local/fftw-mpi/include
> cal/mpich/include -I/usr/local/gm/include -L/usr/local/fftw-mpi/lib
> /mpich/lib -L/usr/local/gm/lib conftest.c -lmpich -lgm -lm -static >&5
> /usr/local/mpich/lib/libmpich.a(gmpi_malloc.o)(.text+0x46): In
> function `malloc_
> : undefined reference to `pthread_self'
> /usr/local/mpich/lib/libmpich.a(gmpi_malloc.o)(.text+0xa9): In
> function `malloc_
> (** and a bunch more of similar undefined references **)
> Can anyone give me some clues to what may be the problem?
> I am doing this in a P4 machine with RH9 and the GNU compiler.
> Thanks in advance,
> gmx-users mailing list
> gmx-users at gromacs.org
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
More information about the gromacs.org_gmx-users