Update: LINQ for MPI.NET

Exciting news on the LINQ for MPI.NET project.  It will include a multithreaded scoping model:

using(Scope.World)
{
    ...
}

Indicates that the Scope.Current is the entire cluster. Subsets can be obtained via:

using(Scope.World)
{
    using(Scope.Subset(...)) // numerous methods
    {
        if(Scope.SubsetID==2)
        {
            ...
        }
    }
}

and threads can be launched from any scope and maintain scope information. Each scope has a unique context that is of use of creating unique object id’s without synchronizing messages between object instances across the cluster or sub-cluster (discussed below). Also of use:

using(Scope.World)
{
    using(Scope.Asynchronous)
    {
        // nodes each in seperate context
    }
}

The other scopes for use by developers are Scope.Root and Scope.RootN(int n) which establish a root/rest context. The scoping works via a static class Scope that has a ThreadStatic Stack<>. The scoping syntax above utilizes properties of the static scope class that place scope objects on a stack which are removed when exiting the using scope. Methods called from within a scope can access the current communicator via the Scope.Current property and other functionalities are available through the static Scope object.

This simplifies the utilization of distributed objects which can utilize the calling MPI communicator context while utilizing .NET interfaces such as ICollection. Before developing this multithreaded scoping model, many of the methods of the distributed data objects had a communicator as a first parameter.

Of additional interest is a Context class which has the following properties: It is identical if and only if created in the same scope, thread and logical position and context. The Context objects are equal if and only if they are the same object. This means that distributed objects can have a property of type Context and thus each have a unique id for messaging purposes without synchronizing across the cluster or sub-cluster on object instantiation. This message-free distributed object instantiation appears quite fast and allows messages to routed in an object-based manner. This works via the multi-threaded scoping system. That is, the multi-threaded scoping context system allows objects to be constructed in a way that identical objects across nodes have identical identifiers without communication overhead on a cluster during object construction!

Linq for MPI.NET should be available for beta testing this week, initial release version expected within one month.

Leave a Reply

You must login to post a comment.