[gmx-users] MPI problem——Cannot compile and link MPI code with cc

Mark Abraham Mark.Abraham at anu.edu.au
Mon Mar 29 13:35:36 CEST 2010


On 29/03/2010 10:24 PM, DreamCatcher wrote:
> Hello gmx-users,
>         I am trying to install a MPI version of Gromacs that I come
> across some problems as follows:
> [celeste at celeste gromacs-4.0.7]$ sudo ./configure
> --prefix=/home/programmes/gromacs --disable-float --enable-mpi

Don't use sudo for configure. It doesn't need it and you risk trashing 
your system if something in configure doesn't work quite right. Use sudo 
for the "make install" step only. This is not the cause of your problem, 
however.

> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking how to create a ustar tar archive... gnutar
> checking for cc... cc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether cc accepts -g... yes
> checking for cc option to accept ISO C89... none needed
> checking for style of include used by make... GNU
> checking dependency style of cc... gcc3
> checking dependency style of cc... gcc3
> checking for mpxlc... no
> checking for mpicc... no
> checking for mpcc... no
> checking for hcc... no
> checking whether the MPI cc command works... configure: error: Cannot
> compile and link MPI code with cc
>
>         I have installed MPICH2 in my PC and export the PATH where the
> mpicc is.Yet,as a matter of fact,the prompts above indicates that there
> isn't an mpicc in my PC.Could anybody tell me what the hell the problem
> is. How can I fix it?

Does "which mpicc" immediately before a failing configure show the 
correct executable? If it does, if you're setting the PATH manually, the 
only think I can think is that your shell environment in which the 
configure stuff gets executed is over-writing PATH in the dotfiles, not 
appending to it. Thus, you lose the effect of your PATH setting. So you 
could check for and/or fix that. Alternatively, try "./configure 
--blahblahblah MPICC=/path/to/mpicc"

>       Another question, I am use a PC with dual-CPU, is it neccissary to
> install an MPI version? Will the difference between a gmx with or
> without a MPI in such a system be big enough to save our CPU time when
> implement a molecular dynamics? My system may contains about 10000 or
> more atoms.

Yes. MPI is the only way you can derive any advantage, which will be 
considerable.

Mark



More information about the gromacs.org_gmx-users mailing list