Boost logo

Boost-MPI :

Subject: Re: [Boost-mpi] Thread API
From: Matthias Troyer (troyer_at_[hidden])
Date: 2012-11-29 06:30:12


On Nov 29, 2012, at 12:06 PM, Alain O Miniussi <alain.miniussi_at_oca.eu> wrote:

> On Wed, 2012-11-28 at 14:22 -0600, Hal Finkel wrote:
>>> So, to summarize, we have 3 issues:
>>> 1) syntax: lower vs upper case and mt->threading.
>>> 2) throw an exception if the requested level is not available
>>> 3) macro to control availability of MPI[1|2|3] features
>
> In the attached patch:
> 1 -> done
> 3 -> not done, I think those macro should be introduced separately, not
> in the same commit.
> 2 -> done, but more precisely:
> The ctors that took one level requirement now takes a preferred and a
> required level. If the required level could not be provided, an
> exception is thrown from the ctor *after* MPI_Finalize is call.
> This seems necessary since otherwise, MPI_Abort would get called in the
> dtor and the application would quit without MPI_Finalize getting called.
> Also, that behavior introduces an error that does not mirror an MPI
> error (in the MPI standard). Seems to be the first one, which explain
> that I modified the exception hierarchy: We now have a base generalist
> exception class (which only take a message) and an derived api_exception
> that correspond to the previous exception class (and that contains all
> the info related with the MPI standard error). Since the code often ask
> a corresponding MPI error code, I choose to bind it to MPI_SUCCESS by
> default (indicating that as far as the MPI standard is concerned, there
> is no problem) api_exception systematically overrides that code.
>
> I also added a istream>>level operator, is nothing else, it will enable
> lexical_cast.
>
> Thanks for reading !

Hi Alain,

What's the motivation for the hierarchy of exception classes? Where do you need it?

Matthias


Boost-Commit list run by troyer at boostpro.com