<pre>Hi Jayesh <br><br>Thank you very much for your reply.<br><br>I tried both methods as follows:<br><br><br>I installed windows MPICH2 and used gcc on cygwin trying to link with libmpi.a, the path in cygwin is:<br><br>******************************<br>
$ echo $PATH<br>/cygdrive/f/Program Files/MPICH2/lib:/cygdrive/f/Program<br>Files/MPICH2/include:/u<br>sr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/f/WINDOWS/system32:/cygdrive<br>/f/WINDOWS:/cygdrive/f/WINDOWS/System32/Wbem:/cygdrive/f/Program<br>
Files/CVSNT/:/c<br>ygdrive/f/Program Files/CMake 2.6/bin:/usr/bin<br>******************************<br><br>and mpi.h is found:<br>******************************<br>$ which mpi.h<br>/cygdrive/f/Program Files/MPICH2/include/mpi.h<br>
******************************<br><br><br>and libmpi is found:<br>******************************<br>$ which libmpi.a<br>/cygdrive/f/Program Files/MPICH2/lib/libmpi.a<br>******************************<br><br>however when I compile, mpi.h is not found (I tried with -libmpi.a and<br>
-libmpi and get the same errors below):<br><br>******************************<br>$ gcc -c -g -libmpi.a main.c<br>main.c:25:17: mpi.h: No such file or directory<br>In file included from utils.h:12,<br> from main.c:27:<br>
******************************<br><br>As for the second method, when I try to configure mpich2, it is not working:<br><br>******************************<br>$ ./configure<br>./configure: line 9: $'\r': command not found<br>
./configure: line 14: $'\r': command not found<br>./configure: line 18: $'\r': command not found<br>./configure: line 20: syntax error near unexpected token `$'{\r''<br>'/configure: line 20: `print_error() {<br>
******************************<br><br>I tried with sh and bash and both give me the above output. I don't have<br>other shells and not sure if installing it will help.<br><br><br>Thank you very much for your help, very appreciated,<br>
<br>Kind Regards,<br><br>Manal</pre><br><br><div class="gmail_quote">2008/10/28 Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span> There are two ways you can compile your MPI
program using MPICH2 on windows,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>1. Install MPICH2 on windows</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span># Use MS Visual Studio compiler to compile your MPI
source to generate an exe (Use mpi.lib while linking).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span># Use gcc from cygwin to compile your MPI source (Use
libmpi.a while linking).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>2. Configure/make/install MPICH2
on Cygwin</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span># Use the mpicc script after installing MPICH2 to
compile your MPI program.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span> Let us know if you need further
information.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Regards,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Jayesh</span></font></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a>
[mailto:<a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a>] <b>On Behalf Of </b>Manal
Helal<br><b>Sent:</b> Sunday, October 26, 2008 11:31 PM<br><b>To:</b>
<a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br><b>Subject:</b> [mpich-discuss] need to compile
unix code as windows exe<br></font><br></div><div><div></div><div class="Wj3C7c">
<div></div>Hi<br><br>I need to compile Unix code under windows generating an exe
file. I downloaded cygwin with gcc and make (that what I use on Solaris and
Linux flavors) , and downloaded mpich2 for windows which didn't contain mpicc
this is what I use in my make files.<br><br>Will you please advise on the
easiest efficient way to compile Unix code on a windows platform and link to
mpich in the compilation process? sorry if it is a basic question, I searched
google, and couldn't get an easy step by step tutorial that covers all
requirements.<br><br>Thank you very much in advance, <br><br>Kind Regards,
<br><br>Manal<br></div></div></div>
</blockquote></div><br>