Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPI] Efficient way to have views on arrays
From: Matthieu Brucher (matthieu.brucher_at_[hidden])
Date: 2008-12-21 03:19:49


2008/12/21 Matthias Troyer <troyer_at_[hidden]>:
>
> On Dec 19, 2008, at 9:30 PM, Matthieu Brucher wrote:
>
>> Hi,
>>
>> I've started to use the MPI Boost library in conjunction with the
>> usual C library. I'lm trying to get as much as possible done with
>> Boost directly.
>> I'd like to use it in a parallel finite difference loop. This means
>> that before each iteration I have to send a strip of my computed data
>> to each neighbor (getting the neighbors is done through a C MPI
>> function). This can be done with MPI_Type_vector (constant-stride
>> data) in C. Does someone know how it can be done with Boost.MPI ?
>
> This is not directly supported but will be easy to add by overloading the
> get_mpi_datatype function and specializing the is_mpi_datatype traits class
> for your type. get_mpi_datatype should create the appropriate MPI Datatype
> using MPI_Type_vector.

OK, I will have to create a new wrapper class over my data for this. I
would like to define the underlying MPI_Type_vector only once
(besides, the documentation says it is automatically used somewhere,
but where?), in case the MPI library uses some optimizations.

> The nicer way will be to make tis more general by creating a strided_array
> wrapper for Boost.Serialization and to overload get_mpi_datatype for that
> wrapper - this will make it more useful for other classes.

This would be outside my current knowledge of both Boost.Serialization
and Boost.MPI. But indeed, it would be great.

Matthieu

-- 
Information System Engineer, Ph.D.
Website: http://matthieu-brucher.developpez.com/
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn: http://www.linkedin.com/in/matthieubrucher

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net