[mpich-discuss] Build MPICH2-1.3.1 with MinGW?

Jayesh Krishna jayesh at mcs.anl.gov
Tue Nov 30 12:43:35 CST 2010


Hi,
 Hmmm... static linking (MPICH2 cxx wrapper lib) could have helped I guess. I will check this out and let you know.
 AFAIK, mingw compilers do not support libraries compiled with Visual Studio. The *.lib libraries available in the lib directory are compiled with Visual Studio.

Regards,
Jayesh
----- Original Message -----
From: Rick Rankin <rick.rankin at yahoo.com>
To: Jayesh Krishna <jayesh at mcs.anl.gov>
Cc: mpich-discuss at mcs.anl.gov
Sent: Tue, 30 Nov 2010 11:35:19 -0600 (CST)
Subject: Re: [mpich-discuss] Build MPICH2-1.3.1 with MinGW?

Jayesh,

Thank you for your quick response. 


I'm very familiar with Cygwin and have a full Cygwin installation on my computer; however, we've ruled out the use of the Cygwin compiler on this project for a number of reasons. One of the biggest reasons we ruled out Cygwin is the additional runtime penalty imposed by Cygwin's posix layer, which ironically, is exactly the piece MPICH2 needs. We;re writing a large simulation that will be inherently slow due to its nature. We certainly don't want add any unnecessary runtime penalties.

I am confused about something, though. Can the Nemesis channel be compiled with Visual Studio? If so, then with the proper ifdefs, MinGW should be able to use the same API that Visual Studio uses, or am I missing something?

Thanks,

Rick




----- Original Message -----
From:Jayesh Krishna <jayesh at mcs.anl.gov>
To:Rick Rankin <rrankin1424-mpi at yahoo.com>
Cc:mpich-discuss at mcs.anl.gov
Sent:Tuesday, November 30, 2010 3:47:29 AM
Subject:Re: [mpich-discuss] Build MPICH2-1.3.1 with MinGW?

Hi,
You cannot compile Nemesis (the default/recommended channel in MPICH2) with the MinGW compiler suite because MinGW does not provide a complete POSIX runtime environment.
Install Cygwin on your machine and you should be able to build MPICH2 using gcc/g77/gfortran from Cygwin. Alternately, you can install MPICH2 on Windows using the windows installers (try the latest stable release) available at http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads . The Windows installers provide MinGW compatible libraries (*.a) in the lib directory (We do not provide compiler wrappers like mpicc, so you will have to provide the MPICH2 include path and lib path explicitly when you compile your code).
Let us know if you have any issues.

Regards,
Jayesh
----- Original Message -----
From: Rick Rankin <rrankin1424-mpi at yahoo.com>
To: mpich-discuss at mcs.anl.gov
Sent: Mon, 29 Nov 2010 22:25:14 -0600 (CST)
Subject: [mpich-discuss] Build MPICH2-1.3.1 with MinGW?

Hello,

I'm wondering if it's currently possible to build MPICH2-1.3.1 with the current MinGW compiler (gcc-4.5.0)? I've searched the mailing list archives, and it appears to be possible, but there are no specific instructions, at least none that I've found so far.

When I run './configure' from MSYS bash, it gets to a point where it complains about missing shared memory support:

checking for mmap... no
checking for munmap... no
checking for shmget... no
checking for shmat... no
checking for shmctl... no
checking for shmdt... no
configure: error: cannot support shared memory:  need either sysv shared memory functions or mmap in order to support shared memory
configure: error: channels/nemesis configure failed
configure: error: src/mpid/ch3 configure failed

I've tried a number of different configure options, but so far haven't hit on a combination that works.

I've also tried installing the binary 32-bit distribution. While I can probably get that to work if I only use the C bindings, I'd like to be able to use the C++ bindings. The problem appears to be that the MinGW library in the distribution, libmpicxx.a, appears to have been built with a version of MinGW gcc configured for SJLJ exception handling, while the current MinGW distribution is configured for Dwarf-2 exceptions. This difference results in a number of undefined externals:

$ g++ -ID:/tools/mpich2/include mpitest.cpp -LD:/tools/mpich2/lib -lmpicxx -lmpi
D:/tools/mpich2/lib/libmpicxx.a(initcxx.o):initcxx.cxx:(.text+0x456): undefined reference to `__gxx_personality_sj0'
D:/tools/mpich2/lib/libmpicxx.a(initcxx.o):initcxx.cxx:(.text+0x47b): undefined reference to `_Unwind_SjLj_Register'
D:/tools/mpich2/lib/libmpicxx.a(initcxx.o):initcxx.cxx:(.text+0x4e8): undefined reference to `_Unwind_SjLj_Resume'
D:/tools/mpich2/lib/libmpicxx.a(initcxx.o):initcxx.cxx:(.text+0x4fe): undefined reference to `_Unwind_SjLj_Unregister'
...

This is why I'd like to be able to build from source.

Thank you,

Rick
_______________________________________________
mpich-discuss mailing list
mpich-discuss at mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list