<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi, Jayesh,<br><br>I was trying the new 1.08p1 version of MPICH2 on Windows Vista64. I heard from you that we need <font style="" color="#0000ff" face="Arial"> the gcc libs, *.a, with 64-bit version</font><br>Could you please send a copy of that to me or somehow make it available online?<br><br>Many thanks for your help!<br><br>Ting<br><br><hr id="stopSpelling">From: leitingl@hotmail.com<br>To: jayesh@mcs.anl.gov<br>Date: Tue, 6 Jan 2009 11:45:21 +0000<br>CC: mpich-discuss@mcs.anl.gov<br>Subject: Re: [mpich-discuss] question regarding compiling/linking under MingW (MPICH2 1.08)<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Hi, Jayesh,<br>
<br>
Thanks a lot for your reply. Solution 1) works well on the Win64 machine.<br>
"<br>
<font color="#0000ff" face="Arial">However we don't ship the gcc libs, *.a, with 64-bit version of MPICH2. Let me know if you need them.). </font><br>"<br>
also, could you please make the gcc libs *.a available somehow?<br>
<br>
I didn't try cygwin because I heard about comflicts with mingw dll's, and also about the performance cost of using cygwin vs. mingw. But it's only rumors, I don't really know if there is any big performance impact. Currently, I am happy with MPICH2+mingw working.<br>
<br>
Many thanks for your help<br>
<br>
T.<br><br>
<hr id="EC_stopSpelling">
<br>
From: jayesh@mcs.anl.gov<br>To: leitingl@hotmail.com<br>CC: mpich-discuss@mcs.anl.gov<br>Subject: RE: [mpich-discuss] question regarding compiling/linking under MingW (MPICH2 1.08)<br>Date: Mon, 5 Jan 2009 16:55:15 -0600<br><br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009">Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"> Glad to know MPICH2+MingW is working for you in 32-bit windows.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"> There are two ways to fix your problem with MPICH2+MingW on 64-bit windows,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009">1) Use 32-bit version of MPICH2 on your 64-bit windows machine (Uninstall any 64-bit version of MPICH2 before you install 32-bit version of MPICH2). AFAIK Cygwin distributions are 32-bit and we provide default support for Cygwin+gcc on 32-bit platforms only.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009">2) Let us know if you want to build 64-bit binaries using MPICH2+MingW (The defns for windows fixed width ints - __int* - is in _mingw.h, which is included by all MingW header files. So include <sys/types.h> before including "mpi.h" and you should be able to get rid of errors with undefined MS-extended types. However we don't ship the gcc libs, *.a, with 64-bit version of MPICH2. Let me know if you need them.). </span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"> If you want to compile MPICH2 on windows (without using Visual Studio compiler) try compiling MPICH2 using Cygwin. Let us know if it works for you (We regularly test MPICH2+Cygwin. You won't have the problem with unsupported poll() if you use Cygwin - Cygwin libs do the abstraction for you.).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"> Let us know the results.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009">Regards,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_049304215-05012009">Jayesh</span></font></div><br>
<div class="EC_EC_OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma"><b>From:</b> mpich-discuss-bounces@mcs.anl.gov [mailto:mpich-discuss-bounces@mcs.anl.gov] <b>On Behalf Of </b>ting lei<br><b>Sent:</b> Sunday, January 04, 2009 5:46 PM<br><b>To:</b> mpich-discuss@mcs.anl.gov<br><b>Subject:</b> Re: [mpich-discuss] question regarding compiling/linking under MingW (MPICH2 1.08)<br></font><br></div>
<div></div>Hi,<br> <br>Thanks a lot for your reply. <br>I just read an infinitely long post that discusses whether __int64 is dead, and realized that I get into something taboo regarding ms specific vs c99. <br>There is a lot of discussion of aethetics there, ..., to no avail though.<br> <br>Just for the sake of the problem, I used the binary distribution for Win64. Below is my MPICH2/lib <br>$ ls /c/MPICH2/lib/<br>TraceInput.lib fmpe.lib irlog2rlog.lib mpi.lib<br>cxx.lib fmpich2.lib mpe.lib rlog.lib<br> <br>In the win32 version, I did see libmpi.a in the same folder. But I tried removing that file, and was able to compile and link.<br> <br>My last effort was to use <br>typedef long long MPI_Aint<br>and go back to mingw+gcc3.4.5+vista64, and the error message was:<br> <br>$ gcc -I /c/MPICH2/include/ test.c -L /c/MPICH2/lib/ -lmpi <br>C:/Users/ting/AppData/Local/Temp/cciBiEaP.o:test.c:(.text+0x38): undefined reference to `MPI_Init'<br>C:/Users/ting/AppData/Local/Temp/cciBiEaP.o:test.c:(.text+0x4b): undefined reference to `MPI_Comm_rank'<br>collect2: ld returned 1 exit status<br> <br>As a side note, I tried to compile one from source using mingw under Win64, <br>but it was complaining about missing poll() function etc. Somebody complained in a MingW list, but a mingw person believes that MPI under windows shouldn't<br>use poll() anyways. I tried to add some other code downloaded from the internet that fakes a poll(), then I got a problem with threads. And I realized that the job is<br>beyond a novice like me.<br> <br>Thanks again for your help,<br>hope some day this problem will disappear. But maybe the mingw idea was wrong -- a minimal set of unix functions with native winxx impl. Lovely little piece that brings <br>unix to the dull windows command line though.<br> <br> <br>T.<br><br><br><br>> Date: Sun, 4 Jan 2009 20:21:42 +0100<br>> From: ddkrause@uni-bonn.de<br>> To: mpich-discuss@mcs.anl.gov<br>> Subject: Re: [mpich-discuss] question regarding compiling/linking under MingW (MPICH2 1.08)<br>> <br>> Hi,<br>> <br>> ting lei wrote:<br>> > *Hi, Dorian*<br>> ><br>> > Thanks a lot for your prompt reply.<br>> > Your command line<br>> > > gcc -I /c/MPICH2/include/ test.c -L/c/MPICH2/lib/ -lmpi<br>> > solves the first problem perfectly on win32.<br>> <br>> Good to hear.<br>> <br>> ><br>> > On Win64, I see the following from line 333 onwards about MPI_Aint<br>> > "<br>> > /* Definitions that are determined by configure. */<br>> > typedef __int64 MPI_Aint;<br>> > typedef int MPI_Fint;<br>> > #define MPI_AINT_FMT_DEC_SPEC "%I64d"<br>> > #define MPI_AINT_FMT_HEX_SPEC "%I64x"<br>> > "<br>> > It seems that configure made a choice of __int64 for the Win64 package <br>> > instead of long under linux. Any idea how this might be solved?<br>> > I have also attached the output with the -E option in the attachment <br>> > err.txt for your reference.<br>> > BTW, I tried to manually change<br>> > typedef __int64 MPI_Aint;<br>> > to<br>> > typedef long MPI_Aint;<br>> > and then, I got:<br>> > gcc -I /c/MPICH2/include/ test.c -L /c/MPICH2/lib/ -lmpi <br>> > test.c: In function 'main':<br>> > test.c:15: warning: incompatible implicit declaration of built-in <br>> > function 'printf'<br>> > C:/Users/ting/AppData/Local/Temp/ccsAr9gj.o:test.c:(.text+0x22): <br>> > undefined reference to `_MPI_Init'<br>> > C:/Users/ting/AppData/Local/Temp/ccsAr9gj.o:test.c:(.text+0x36): <br>> > undefined reference to `_MPI_Comm_rank'<br>> > collect2: ld returned 1 exit status<br>> ><br>> > or the following for using g++:<br>> ><br>> > $ g++ -I /c/MPICH2/include/ test.c -L /c/MPICH2/lib/ -lmpi<br>> > C:/Users/ting/AppData/Local/Temp/ccPO9opx.o:test.c:(.text+0x22): <br>> > undefined reference to `_MPI_Init'<br>> > C:/Users/ting/AppData/Local/Temp/ccPO9opx.o:test.c:(.text+0x36): <br>> > undefined reference to `_MPI_Comm_rank'<br>> > collect2: ld returned 1 exit status<br>> ><br>> <br>> You said that you downloaded the binary distribution, correct? I have no <br>> experiences with MPICH2 on Windows<br>> but I would suspect that the libraries were build with Microsofts C/C++ <br>> compiler cl and on Win64 the MingGW gcc<br>> compiler and cl are not compatible. __int64 is a Microsoft specific <br>> extension to C/C++ (http://msdn.microsoft.com/en-us/library/29dh1w7z.aspx).<br>> Also it seems that gcc does some sort of name-mangling (adding an <br>> underscore to the function name). This is rather strange<br>> for a C compiler...<br>> <br>> Probably you'r right that its a gcc 4.3 issue. Maybe some else has more <br>> insight into this.<br>> <br>> Interestingly he doesn't say that he can't find libmpi.a. Are you sure <br>> that it is not there?<br>> <br>> BTW: typedef long MPI_Aint might be a problem because sizeof(long) = 4 <br>> on Windows at least with the Microsoft compiler. Don't know what<br>> gcc does in this situation.<br>> <br>> Dorian<br>> <br>> ><br>> ><br>> > Thanks again.<br>> ><br>> > T.<br>> ><br>> ><br>> > > Date: Sun, 4 Jan 2009 18:29:23 +0100<br>> > > From: ddkrause@uni-bonn.de<br>> > > To: mpich-discuss@mcs.anl.gov<br>> > > Subject: Re: [mpich-discuss] question regarding compiling/linking <br>> > under MingW (MPICH2 1.08)<br>> > ><br>> > > Hi<br>> > ><br>> > > ting lei wrote:<br>> > > > Hi,<br>> > > ><br>> > > > Sorry to bother all. I have some questions regarding using MPICH2 <br>> > 1.08<br>> > > > with MingW<br>> > > ><br>> > > > I tried compile MPICH2 1.08 on two different machines, and have met<br>> > > > different problems. I was wondering if someone with a lot experience<br>> > > > could help me out here. thanks in advance.<br>> > > ><br>> > > > 1) The most successful attempt was on a win32 platform, XPSP3 with<br>> > > > MingW+gcc3.4.5<br>> > > > The command line I used was:<br>> > > > gcc -I /c/MPICH2/include/ -lmpi -L/c/MPICH2/lib/ test.c<br>> > > > and I get the following error:<br>> > > > C:/DOCUME~1/ting/LOCALS~1/Temp/cc40AD3K.o:test.c:(.text+0x38):<br>> > > > undefined reference to `MPI_Init'<br>> > > > C:/DOCUME~1/ting/LOCALS~1/Temp/cc40AD3K.o:test.c:(.text+0x4b):<br>> > > > undefined reference to `MPI_Comm_rank'<br>> > > > collect2: ld returned 1 exit status<br>> > ><br>> > > Could you try<br>> > ><br>> > > gcc -I /c/MPICH2/include/ test.c -L/c/MPICH2/lib/ -lmpi<br>> > ><br>> > > Since your testprogram depends on the mpi library you need to specify<br>> > > the library after your program because the linker goes from left to <br>> > right.<br>> > > ><br>> > > > It seems that the library file libmpi.a is corrected specified,<br>> > > > because if I change it to -lmpi1 it will report<br>> > > > c:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:<br>> > > > cannot find -lmpi1<br>> > > > collect2: ld returned 1 exit status<br>> > > ><br>> > > ><br>> > > > 2) My less successful attempt was on a Win64 (Vista64) platform with<br>> > > > MingW + gcc4.3:<br>> > > > I tried installing the mpich2-1.0.8-win-x86-64.msi. but<br>> > > > a) after the installation, I couldn't find libmpi.a in MPICH2\lib<br>> > > > folder as I was able to in case 1).b) when I am compiling the toy <br>> > test<br>> > > > program, I get many errors like this:<br>> > > ><br>> > > > In file included from test.c:1:<br>> > > > c:/MPICH2/include/mpi.h:334: error: expected '=', ',', ';', 'asm' or<br>> > > > '__attribute__' before 'MPI_Aint'<br>> > > ><br>> > > > Is this a gcc4.x problem?<br>> > ><br>> > > Did you take a look at mpi.h line 334? On Linux I can see typedef long<br>> > > MPI_Aint; . Could you compile with the -E flag to see the preprocessor<br>> > > output? Maybe something is overwriting long?<br>> > ><br>> > > ><br>> > > > Best<br>> > > ><br>> > > > T<br>> > > ><br>> > > ><br>> > > > <br>> > ------------------------------------------------------------------------<br>> > > > From: jayesh@mcs.anl.gov<br>> > > > To: leitingl@hotmail.com<br>> > > > CC: mpich-discuss@mcs.anl.gov<br>> > > > Subject: RE: [mpich-discuss] (no subject) - mingw<br>> > > > Date: Tue, 2 Dec 2008 13:34:18 -0600<br>> > > ><br>> > > > Hi,<br>> > > > You could try installing MPICH2 on windows (from the installer<br>> > > > available at<br>> > > > <br>> > http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads) <br>> ><br>> > > > and compile your code and link with the gcc libs (*.a) provided with<br>> > > > the installation (MPICH2\lib directory).<br>> > > ><br>> > > > Regards,<br>> > > > Jayesh<br>> > > ><br>> > > > <br>> > ------------------------------------------------------------------------<br>> > > > *From:* mpich-discuss-bounces@mcs.anl.gov<br>> > > > [mailto:mpich-discuss-bounces@mcs.anl.gov] *On Behalf Of *ting lei<br>> > > > *Sent:* Tuesday, December 02, 2008 1:31 PM<br>> > > > *To:* mpich-discuss@mcs.anl.gov<br>> > > > *Subject:* [mpich-discuss] (no subject)<br>> > > ><br>> > > > Hi,<br>> > > ><br>> > > > This might be a newbie question.<br>> > > > I see in this thread that people can compile MPICH2 with MingW. I <br>> > tried that with MingW (gcc 4.3 and 3.4x) several times but<br>> > > > I was never able to get past the ./configure step.<br>> > > > /"I have compiled a C executable using the MPICH2 Windows <br>> > libraries and //MinGW./"<br>> > > > Could someone please give me some pointers how to compile such an <br>> > executable?<br>> > > > More specifically, do I have to compile MPICH2 itself from source <br>> > using MinGW then use some program such as mpicc??<br>> > > > or should I just compile a regular c program and run it with <br>> > mpiexec.exe ?<br>> > > > If I were to compile MPICH2 itself with MingW, what other packages <br>> > do I need except the latest version of MingW?<br>> > > ><br>> > > ><br>> > > > Many thanks for your help<br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > > <http://clk.atdmt.com/MRT/go/127032869/direct/01/><br>> > > > <br>> > ------------------------------------------------------------------------<br>> > > > It’s the same Hotmail®. If by “same” you mean up to 70% faster. Get<br>> > > > your account now.<br>> > > > <br>> > <http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008><br>> > ><br>> ><br>> > ------------------------------------------------------------------------<br>> > Send e-mail faster without improving your typing skills. Get your <br>> > Hotmail® account. <br>> > <http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008><br>> <br><br><br>
<hr>
Life on your PC is safer, easier, and more enjoyable with Windows Vista®. <a href="http://clk.atdmt.com/MRT/go/127032870/direct/01/">See how </a><br><hr>Send e-mail anywhere. No map, no compass. <a href="http://windowslive.com/oneline/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_anywhere_122008">Get your Hotmail® account now.</a><br /><hr />Insert movie times and more without leaving Hotmail®. <a href='http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009' target='_new'>See how.</a></body>
</html>