[MPICH] MPICH2 and Glut on Windows
David Ashton
ashton at mcs.anl.gov
Thu Oct 13 00:45:47 CDT 2005
Carl,
This is a bug in mpi.lib that has been fixed for the next release. For now
you will have to link with the specific MPICH2 channel you want to run.
This usually means linking with mpich2.lib but you could also link with
mpich2shm.lib, mpich2sshm.lib, mpich2ssm.lib, or mpich2mt.lib.
The advantage of mpi.lib is that you can choose the channel you want at run
time and you can turn logging on or off. But as long as you just want to
run MPI over sockets without logging you can link with mpich2.lib.
-David Ashton
-----Original Message-----
From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Carl
Sent: Wednesday, October 12, 2005 10:16 PM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] MPICH2 and Glut on Windows
Hi,
I've just downloaded MPICH2 binaries for a few Windows
XP computers. MPICH2 is working fine for me, except
glut doesn't seem to work with it.
I've managed to reduce my program down to the
following code, which I'm compiling with VS.NET 2003
and running on XP Pro.
#include <mpi.h>
#include <stdio.h>
#include "GL/glut.h"
int main (int argc, char** argv)
{
int supported_thread_level;
//MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE,
&supported_thread_level);
MPI_Init(&argc, &argv);
printf("42!");
glutInit(&argc, &argv[0]); // a glut call
MPI_Finalize();
return 0;
}
When I run it using mpiexec, I get no output and it
just exits. When I run it stand-alone, I get a message
box saying: "The application failed to initialize
properly (0xc0000142). Click on OK to terminate the
application."
Google tells me this usually is a dll throwing an
exception when it is initialized.
What's strange is that if I comment out EITHER the
lines containing MPI_Init() and MPI_Finalize() OR the
glutInit() line, the program executes fine and prints
out "42!". Presumably this means that when glut32.dll
and the MPICH2 dlls are both being initialized,
something bad is happening. I've tried this on
multiple computers using various glut32.dll's I've
downloaded.
I can't use the debugger because this problem is
happening before it even executes main(). I thought
that it might be a thread issue, but using
MPI_Init_thread didn't change anything.
Any Thoughts?
Thanks,
Carl
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
More information about the mpich-discuss
mailing list