[mpich-discuss] need to compile unix code as windows exe

Manal Helal manalorama at gmail.com
Wed Oct 29 00:57:18 CDT 2008


Hello

I tried the following from the configure script, just to create the
references for the windows installation:

ln -s libmpich.a libmpi.a
ln -s libmpich.so.1 libmpi.so.1


I just also found that the windows mpich2 installation installed a 0 kb
libmpi.a in the "Program Files\MPICH2\lib" path?!

I think I am on the wrong direction all together, please help,

Kind Regards,

Manal


2008/10/29 Manal Helal <manalorama at gmail.com>

> I think I can make the gcc compiler see the mpi.h by adding the -I argument
> and the folder of the mpi.h and similarly the -L to the library path, this
> compiled the code with no problems.
>
> However it is not linking to libmpi or libmpi.a, giving me the following
> errors:
>
> *********************************************************
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot
> find
>  -libmpi.a
> collect2: ld returned 1 exit status
> *********************************************************
>
> this happens when I use -libmpi or -libmpi.a in the gcc command
>
> I think this has to do with the library reference name not defined to link
> with, I am not sure how to solve this, google gives me general explanation
> on library names,
>
> I am not sure if I should post this in gcc or linux forums, but I hope
> someone here could help,
>
> thanks again,
>
> Manal
>
> 2008/10/28 Jayesh Krishna <jayesh at mcs.anl.gov>
>
>  Hi,
>>  There are two ways you can compile your MPI program using MPICH2 on
>> windows,
>>
>> 1. Install MPICH2 on windows
>> # Use MS Visual Studio compiler to compile your MPI source to generate an
>> exe (Use mpi.lib while linking).
>> # Use gcc from cygwin to compile your MPI source (Use libmpi.a while
>> linking).
>>
>> 2. Configure/make/install MPICH2 on Cygwin
>>
>> # Use the mpicc script after installing MPICH2 to compile your MPI
>> program.
>>
>>  Let us know if you need further information.
>>
>> Regards,
>> Jayesh
>>
>>  ------------------------------
>> *From:* owner-mpich-discuss at mcs.anl.gov [mailto:
>> owner-mpich-discuss at mcs.anl.gov] *On Behalf Of *Manal Helal
>> *Sent:* Sunday, October 26, 2008 11:31 PM
>> *To:* mpich-discuss at mcs.anl.gov
>> *Subject:* [mpich-discuss] need to compile unix code as windows exe
>>
>> Hi
>>
>> 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.
>>
>> 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.
>>
>> Thank you very much in advance,
>>
>> Kind Regards,
>>
>> Manal
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20081029/77ff3c44/attachment.htm>


More information about the mpich-discuss mailing list