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

Jayesh Krishna jayesh at mcs.anl.gov
Tue Nov 30 04:47:29 CST 2010


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