<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Message: 5<br>
Date: Sun, 31 Jan 2010 00:34:22 +0530<br>
From: Chandan Choudhury <<a href="mailto:iitdckc@gmail.com">iitdckc@gmail.com</a>><br>
Subject: Re: [gmx-users] error: Cannot compile and link MPI code with<br>
mpicc<br>
To: Discussion list for GROMACS users <<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>><br>
Message-ID:<br>
<<a href="mailto:4e22679c1001301104r5f1d725bjd5824e68cb3cb1a7@mail.gmail.com">4e22679c1001301104r5f1d725bjd5824e68cb3cb1a7@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Ronald !!<br>
Thanks for your reply.<br>
I recompiled the openmpi. But while executing ./configure --enable-mpi in<br>
gromacs4.0.7 the following error is shown in config.log file.<br>
<br>
configure:4536: checking for mpicc<br>
configure:4552: found /usr/lib/mpi/gcc/openmpi/bin/mpicc<br>
configure:4563: result: mpicc<br>
configure:4577: checking whether the MPI cc command works<br>
configure:4601: mpicc -o conftest -g -O2 conftest.c >&5<br>
conftest.c:15:17: error: mpi.h: No such file or directory<br>
configure:4607: $? = 1<br>
configure: failed program was:<br>
| /* confdefs.h. */<br>
| #define PACKAGE_NAME "gromacs"<br>
| #define PACKAGE_TARNAME "gromacs"<br>
| #define PACKAGE_VERSION "4.0.7"<br>
| #define PACKAGE_STRING "gromacs 4.0.7"<br>
| #define PACKAGE_BUGREPORT "<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>"<br>
| #define PACKAGE "gromacs"<br>
| #define VERSION "4.0.7"<br>
| #define GMX_SOFTWARE_SQRT<br>
| #define GMX_QMMM_GAUSSIAN<br>
| #define BUILD_TIME "Mon Feb 1 14:07:34 EST 2010"<br>
| #define BUILD_USER "root@corsica"<br>
| #define BUILD_MACHINE "Linux 2.6.31.5-0.1-desktop i686"<br>
| /* end confdefs.h. */<br>
| #include <mpi.h><br>
| int<br>
| main ()<br>
| {<br>
| int argc; char **argv; MPI_Init(&argc,&argv);<br>
| ;<br>
| return 0;<br>
| }<br>
configure:4619: error: Cannot compile and link MPI code with mpicc<br>
<br>
<br>
--<br>
Chandan kumar Choudhury<br>
NCL, Pune<br>
INDIA<br>
<br>
<br>
On Sat, Jan 30, 2010 at 10:57 PM, Roland Schulz <<a href="mailto:roland@utk.edu">roland@utk.edu</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> your MPI installation has to be brogen. mpicc always has to be able to find<br>
> libmpi. Please reinstall mpi correctly.<br>
><br>
> Roland<br>
><br>
> On Sat, Jan 30, 2010 at 11:06 AM, Chandan Choudhury <<a href="mailto:iitdckc@gmail.com">iitdckc@gmail.com</a>>wrote:<br>
><br>
>> Hi gmx users !!<br>
>><br>
>> On compiling GMX paralley, following error was encountered. How can I<br>
>> tackle this.<br>
>> Kindly help.<br>
>><br>
>><br>
>> checking for mpicc... mpicc<br>
>> checking whether the MPI cc command works... configure: error: Cannot<br>
>> compile and link MPI code with mpicc<br>
>><br>
>> The config.log file reads<br>
>><br>
>> configure:4536: checking for mpicc<br>
>> configure:4552: found /usr/lib/mpi/gcc/openmpi/bin/mpicc<br>
>> configure:4563: result: mpicc<br>
>> configure:4577: checking whether the MPI cc command works<br>
>> configure:4601: mpicc -o conftest -g -O2 -I/usr/local/openmpi/include/<br>
>> conftest.c >&5<br>
>> /usr/lib/gcc/i586-suse-linux/4.4/../../../../i586-suse-linux/bin/ld:<br>
>> cannot find -lmpi<br>
>> collect2: ld returned 1 exit status<br>
>> configure:4607: $? = 1<br>
>> configure: failed program was:<br>
>> | /* confdefs.h. */<br>
>> | #define PACKAGE_NAME "gromacs"<br>
>> | #define PACKAGE_TARNAME "gromacs"<br>
>> #define PACKAGE_VERSION "4.0.7"<br>
>> | #define PACKAGE_STRING "gromacs 4.0.7"<br>
>> | #define PACKAGE_BUGREPORT "<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>"<br>
>> | #define PACKAGE "gromacs"<br>
>> | #define VERSION "4.0.7"<br>
>> | #define GMX_SOFTWARE_SQRT<br>
>> | #define GMX_QMMM_GAUSSIAN<br>
>> | #define BUILD_TIME "Sat Jan 30 21:42:50 IST 2010"<br>
>> | #define BUILD_USER "root@shiraz"<br>
>> | #define BUILD_MACHINE "Linux 2.6.31.5-0.1-desktop i686"<br>
>> | /* end confdefs.h. */<br>
>> | #include <mpi.h><br>
>> | int<br>
>> | main ()<br>
>> | {<br>
>> | int argc; char **argv; MPI_Init(&argc,&argv);<br>
>> | ;<br>
>> | return 0;<br>
>> | }<br>
>> configure:4619: error: Cannot compile and link MPI code with mpicc<br>
>><br>
>><br>
>> Chandan<br>
>><br>
>> --<br>
>> Chandan kumar Choudhury<br>
>> NCL, Pune<br>
>> INDIA<br>
>><br>
>> --<br>
<font color="#888888"><br>
******************************************<br></font></blockquote><div><br>Hi.<br>If u r using RHL or Fedora series..<br><br>Try this before reinstalling openmpi.<br><br>Its better to update the Compilers before installing MPI.<br>
<br>I did this in Fedora 10.i386.<br><br>yum install -y *gcc*<br><br>yum install -y *c++*<br></div></div><br>Then install open-mpi<br>as ./configure, make, make install.<br>If u still have the same problem<br><br>error: Cannot compile and link MPI code with mpicc.<br>
<br>Then remove the open-mpi installed folder.<br><br>then do yum install -y *open-mpi*<br><br>And then try installing gromacs with MPI.<br><br>Actually, the first option worked for me.<br>Also i prefer lam-mpi is the best.<br>
<br><br clear="all"><br>-- <br>B. Sarath Kumar, B.tech.<br>Anna University, Chennai<br>