[MPICH] Problems w/ MPICH2 on Windows+Cygwin

David Ashton ashton at mcs.anl.gov
Fri Jul 15 18:18:25 CDT 2005


1) Exit code 128 means that a dll was missing.  In this case it means that
you have a dll in your path that is not in the system path.  When you don't
use -localonly the smpd process manager is used and it runs as a service
under the system account with the system path.  You need to make sure that
all dlls that your application requires are located in the system path or in
the same location as your application.  In this case it probably means the
cygwin dlls need to be added to the system path.

2) You can link with -lmpich2.  The lib part is assumed.  If you link with
-lmpi then you get the wrapper dll that allows you to select any of the
various channel implementations of mpich2 at run-time.  If you link with
-lmpich2 then you only get the socket channel implementation.  We have seen
problems with -mpi under cygwin.  If -lmpi does not work then use -lmpich2.

-David Ashton

-----Original Message-----
From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of
justinsea at optonline.net
Sent: Friday, July 15, 2005 2:55 PM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] Problems w/ MPICH2 on Windows+Cygwin

Hello,

I am having strange problems trying to get the MPICH2 example program
(exmaples/icpi.c) to work. I have MPICH2 1.0.2 and the latest Cygwin
installed on a Windows XP machine. I compiled the program from a DOS command
box:

C:\MPICH2\examples>gcc -Ic:/mpich2/include -Lc:/mpich2/lib icpi.c -lmpi

Then, running the program like this:

C:\MPICH2\examples>mpiexec -n 4 -exitcodes a.exe
rank: node: exit code
0: %HOST%: 128
1: %HOST%: 128
2: %HOST%: 128
3: %HOST%: 128

However, if I added the "-localonly" option to mpiexec, it seems to work
fine.

The same problem applies to other MPI programs I tried.

On a separate note, page 21 of the MPICH2 User's Guide seems to indicate
that Cygwin user should use libmpich2.a instead of mpi.lib. Does anyone know
a way to tell the link to use libmpich2.a? I have the following problems,
e.g.:

$ gcc -Ic:/mpich2/include -Lc:/mpich2/lib icpi.c -llibmpich2
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot
find -llibmpich2
collect2: ld returned 1 exit status

Thanks in advance for any help you can provide!





More information about the mpich-discuss mailing list