[MPICH] MPICH2 and Glut on Windows

Carl carlpny at yahoo.com
Wed Oct 12 23:16:21 CDT 2005


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