[mpich-discuss] The setting of mpich2-1.3.2p1 with MinGW (GCC 4.5.2) on Win 7

孔涛 vision.kt at gmail.com
Wed Mar 2 09:13:48 CST 2011


Hi, everyone.

I got some problem when I set the MPICH2 with Gcc on my windows 7 system.

I want to compile some parallel program source files written by c++ with the
GCC complier,so I installed the  "editplus","mpich2-1.3.2p1-win-ia32.exe"
and "MinGW (GCC V4.5.2)" that I download from the offical website on my
windows 7 system. I give the following compiling settings of g++
------------
g++  -I D:\MathProgF\MPICH2\include -L D:\MathProgF\MPICH2\lib $(FileName)
-o $(FileNameNoExt) -lmpicxx -lmpi
----------
while I complie the following sourcefile
=======================================
#include <iostream>
#include <cmath>
#include <mpi.h>
using namespace std;

int main(int argc, char *argv[])
{
    //begin the main function
    int rank,size;
    MPI::Init(argc,argv);
    rank=MPI::COMM_WORLD.Get_rank();
    size=MPI::COMM_WORLD.Get_size();
    cout<<"I am "<<rank<<" of "<<size<<endl;
    MPI::Finalize();

    return 0;
}
============================
and I got the following information:
############
D:\MathProgF\MPICH2\lib/libmpi.a: file not recognized: File truncated
collect2: ld returned 1 exit status
Press any key to continue......
#############

Q: Can anyone tell me how to settle this problem, thank you very much! ^^

Kayneo



-- 
孔涛  山东大学数学学院 250100
Tao KONG  School of Mathematics, Shandong University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110302/563f75b5/attachment.htm>


More information about the mpich-discuss mailing list