PTL logo

From: Douglas Gregor (dgregor_at_[hidden])
Date: 2008-02-07 13:26:36

On Wed, 2008-02-06 at 21:06 -0500, Elward,Bob wrote:
> I’ve recently downloaded and installed MPI.NET. Looks really
> interesting, thank you for putting this together, great work.
> A few starter questions:
> 1) I’ve install this on a machine running Vista, Visual Studio
> 2008 and .NET Framework 3.5. I’ve run one or two of your samples and
> also written a couple of very simple programs myself and it all seems
> to work. Any reason for me to think that it won’t work on this
> configuration? How about on Windows Server 2008?

I can't think of any reason why this particular combination wouldn't
work, but of course it's completely different from the environment in
which we've developed MPI.NET.

> 2) When running my simple programs with a command like “mpiexec –
> n 4 MPI_Template” (4 processes all on my PC) they hang more often that
> I would have thought they should, 30-40% of the time! Should I expect
> this behavior when running all the processes on the same PC? Or does
> this seem odd to you and might it me something w/ VS 2008 or the 3.5
> framework?

That's very... disturbing. This should not happen, and has not happened
for us on any of our CCS 2003 clusters or XP machines. It could be any
of Vista, VS 2008, or .NET 3.5... we'll need to try some more
combinations to see what triggers the issue. I'm planning to update one
of my development machines to VS 2008/.NET 3.5, so we'll see what
happens when I do so.

> 3) In mapping the MPI.dll from Microsoft you chose to use
> “unsafe” directives everywhere. My approach with DLLs would be to
> work out the correct P/Invoke structures and avoid “unsafe”
> altogether, however, this requires an hugh amount of time. Did you
> choose your approach for time savings or some sort of performance
> reason?

Time savings, mainly. In the development version of MPI.NET, we've
eliminated many of the unsafe constructs in the low-level MPI interface
(e.g., replacing pointers with "out" or "ref", as appropriate). I expect
we'll end up eliminating most of the "unsafe" specifiers over time.

> 4) You made use of ILMerge.exe which is no longer distributed
> (but available for download from MSDN) after .NET Framework 2.0, to
> merge the MPI and MPIUtils assemblies into one. Instead of this have
> you looked into using pertial classes?

The basic problem is that we have some C# code and some CIL code that we
want to put in the same assembly, but the only way I've found to do that
is to create two different assemblies and merge them together. As far as
I know, partial classes won't help with this, because I still can't
directly put C# and CIL into the same assembly.

> 5) I’ve tried to find the documentation on the actual Microsoft
> MPI.dll routines. I can’t seem to find it anywhere on MSDN. Could
> you point me to where the documentation is hidden?

MPI is a standard, so I use the standard itself:

MPI.NET is based on MPI 1.1, with a little bit of MPI 2.0 thrown in.

For platform-specific issues, I just peek into the mpi.h header :)

> Thanks, I look forward to playing with some finite element programming
> in C# and parallelizing it locally using Parallel FX and across
> machines using MPI.NET.

Sounds fun!

        - Doug