<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008> The size of libmpi.a installed on your machine
should not be 0KB. Uninstall/Re-install MPICH2 on your
machine.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008> Please find below a simple command to compile
helloworld.c using cygwin gcc and the gcc libs installed with MPICH2
installation on windows,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008>===============================================================</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008>gcc -I /cygdrive/c/progra~1/MPICH2/include -L
/cygdrive/c/progra~1/MPICH2/lib helloworld.c -lmpi</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008><SPAN
class=004051514-29102008>===============================================================</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008><SPAN
class=004051514-29102008></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008><SPAN class=004051514-29102008> Let us know if you
still have problems compiling your MPI program.</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008><SPAN
class=004051514-29102008></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008><SPAN
class=004051514-29102008>Regards,</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008><SPAN
class=004051514-29102008>Jayesh</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004051514-29102008></SPAN></FONT> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mpich-discuss-bounces@mcs.anl.gov
[mailto:mpich-discuss-bounces@mcs.anl.gov] <B>On Behalf Of </B>Manal
Helal<BR><B>Sent:</B> Wednesday, October 29, 2008 1:41 AM<BR><B>To:</B> Dmitri
Chubarov<BR><B>Cc:</B> mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> Re:
[mpich-discuss] need to compile unix code as windows exe<BR></FONT><BR></DIV>
<DIV></DIV>Thank you for your reply, <BR><BR>sorry for not trying that, I always
link with mpicc, but it is not working under cygwin so far, <BR><BR>I
tried gcc -lmpi, it seems working better but I think the 0 kb libmpi.a problem
is the one now, <BR><BR>here is the
output:<BR><BR>**************************<BR>/cygdrive/f/Program
Files/MPICH2/lib/libmpi.a: file not recognized: File truncat<BR>ed<BR>collect2:
ld returned 1 exit status<BR>**************************<BR><BR>I tried repairing
the windows mpich2, but the file didn't change, and I unisiatlled and removed
the Program Files/MPICH2, and still the file size is 0 kb, and the same output
when linking with gcc<BR><BR>please advise, <BR><BR>thank you very much,
<BR><BR>Manal<BR><BR>
<DIV class=gmail_quote>2008/10/29 Dmitri Chubarov <SPAN dir=ltr><<A
href="mailto:dmitri.chubarov@gmail.com"
target=_blank>dmitri.chubarov@gmail.com</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Normally
you should specify -lmpi on the command line to link against<BR>libmpi.a the
same holds for libmpich.a (-lmpich) or libm.a (-lm).<BR>That's a decades old
UNIX convention. Would you please try that.<BR>
<DIV>
<DIV></DIV>
<DIV><BR>On Wed, Oct 29, 2008 at 11:57 AM, Manal Helal <<A
href="mailto:manalorama@gmail.com" target=_blank>manalorama@gmail.com</A>>
wrote:<BR>> Hello<BR>><BR>> I tried the following from the configure
script, just to create the<BR>> references for the windows
installation:<BR>><BR>> ln -s libmpich.a libmpi.a<BR>> ln -s
libmpich.so.1 libmpi.so.1<BR>><BR>> I just also found that the windows
mpich2 installation installed a 0 kb<BR>> libmpi.a in the "Program
Files\MPICH2\lib" path?!<BR>><BR>> I think I am on the wrong direction
all together, please help,<BR>><BR>> Kind Regards,<BR>><BR>>
Manal<BR>><BR>><BR>> 2008/10/29 Manal Helal <<A
href="mailto:manalorama@gmail.com"
target=_blank>manalorama@gmail.com</A>><BR>>><BR>>> I think I
can make the gcc compiler see the mpi.h by adding the -I<BR>>> argument
and the folder of the mpi.h and similarly the -L to the library<BR>>>
path, this compiled the code with no problems.<BR>>><BR>>> However
it is not linking to libmpi or libmpi.a, giving me the following<BR>>>
errors:<BR>>><BR>>>
*********************************************************<BR>>>
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:<BR>>>
cannot find<BR>>> -libmpi.a<BR>>> collect2: ld returned 1
exit status<BR>>>
*********************************************************<BR>>><BR>>>
this happens when I use -libmpi or -libmpi.a in the gcc
command<BR>>><BR>>> I think this has to do with the library
reference name not defined to link<BR>>> with, I am not sure how to
solve this, google gives me general explanation<BR>>> on library
names,<BR>>><BR>>> I am not sure if I should post this in gcc or
linux forums, but I hope<BR>>> someone here could
help,<BR>>><BR>>> thanks again,<BR>>><BR>>>
Manal<BR>>><BR>>> 2008/10/28 Jayesh Krishna <<A
href="mailto:jayesh@mcs.anl.gov"
target=_blank>jayesh@mcs.anl.gov</A>><BR>>>><BR>>>>
Hi,<BR>>>> There are two ways you can compile your MPI program
using MPICH2 on<BR>>>> windows,<BR>>>><BR>>>> 1.
Install MPICH2 on windows<BR>>>> # Use MS Visual Studio compiler to
compile your MPI source to generate an<BR>>>> exe (Use mpi.lib while
linking).<BR>>>> # Use gcc from cygwin to compile your MPI source
(Use libmpi.a while<BR>>>> linking).<BR>>>><BR>>>>
2. Configure/make/install MPICH2 on Cygwin<BR>>>><BR>>>> #
Use the mpicc script after installing MPICH2 to compile your
MPI<BR>>>> program.<BR>>>><BR>>>> Let us know
if you need further information.<BR>>>><BR>>>>
Regards,<BR>>>> Jayesh<BR>>>>
________________________________<BR>>>> From: <A
href="mailto:owner-mpich-discuss@mcs.anl.gov"
target=_blank>owner-mpich-discuss@mcs.anl.gov</A><BR>>>> [mailto:<A
href="mailto:owner-mpich-discuss@mcs.anl.gov"
target=_blank>owner-mpich-discuss@mcs.anl.gov</A>] On Behalf Of Manal
Helal<BR>>>> Sent: Sunday, October 26, 2008 11:31 PM<BR>>>>
To: <A href="mailto:mpich-discuss@mcs.anl.gov"
target=_blank>mpich-discuss@mcs.anl.gov</A><BR>>>> Subject:
[mpich-discuss] need to compile unix code as windows
exe<BR>>>><BR>>>> Hi<BR>>>><BR>>>> I need
to compile Unix code under windows generating an exe file. I<BR>>>>
downloaded cygwin with gcc and make (that what I use on Solaris and
Linux<BR>>>> flavors) , and downloaded mpich2 for windows which
didn't contain mpicc this<BR>>>> is what I use in my make
files.<BR>>>><BR>>>> Will you please advise on the easiest
efficient way to compile Unix code<BR>>>> on a windows platform and
link to mpich in the compilation process? sorry if<BR>>>> it is a
basic question, I searched google, and couldn't get an easy step
by<BR>>>> step tutorial that covers all
requirements.<BR>>>><BR>>>> Thank you very much in
advance,<BR>>>><BR>>>> Kind
Regards,<BR>>>><BR>>>>
Manal<BR>>><BR>><BR>><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></BODY></HTML>