[Cplex] Integrating OpenMP and Cilk into C++

Olivier Giroux OGiroux at nvidia.com
Wed Jun 26 21:53:57 CEST 2013

There remains the issue of dropping exceptions on the floor, just arbitrarily, when there is more than one thrown by parallel tasks and/or the caller.  The papers seen so far (across the board, not just yours) do not really address this.  Maybe it's because we all believe we should teach users to explicitly catch exceptions inside each task instead, which avoids propagation to the caller -- that or it's just the expedient approach for implementations.

The following is not documented in any paper, but some of us in Bristol explored the idea of a narrow language feature that would allow certain destructors to participate in the flow of exception handling so that either libraries or users could control what happens when more than one exception is thrown by a parallel construct.  For example, the destructor of a future-like type could decide which exception to drop, or how to combine the exceptions into a bag-of-exceptions, or call a user lambda that takes 2 exceptions.

This is just an idea, there are clearly no implementations that support this.  I mention it because exception-handling is not done very well by any of the options on the table.  It seems like we could do better.


-----Original Message-----
From: cplex-bounces at open-std.org [mailto:cplex-bounces at open-std.org] On Behalf Of Pablo Halpern
Sent: Wednesday, June 26, 2013 12:09 PM
To: cplex at open-std.org
Subject: Re: [Cplex] Integrating OpenMP and Cilk into C++

On 6/25/2013 5:28 AM, Al Grant wrote:
> Cilk Plus does a better job of percolating exceptions up to the 
> spawning task, but the description in
> http://software.intel.com/sites/products/documentation/doclib/iss/2013
> /compiler/cpp-lin/GUID-4E7C022C-557B-4366-9F67-30AAD4C2C6E1.htm
> suggests there are some non-obvious issues with exception-handling 
> regions stopping parallelism happening - they have a workaround 
> involving a 1-iteration cilk_for loop.  I would hope this wouldn't be 
> necessary in any standardized language features.

The proposal we are preparing for the C++ committee does not have this wart.  Instead, each try block would comprise a task block, eliminating the need to sync before entering a try block.


Cplex mailing list
Cplex at open-std.org
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

More information about the Cplex mailing list