Dear Wolfgang, Thank you for the quick response.
This is actually very difficult to achieve. I made that work for the 9.3 > release when you use `new_task()`, and I think one could probably make > that > work for `new_thread()` as well based on features C++11/14 provides. But I > don't think this is easily possible when using WorkStream and it's not > clear > to me to begin with what kind of semantics this would have. Your best bet > is > to ensure that functions you call via WorkStream do not throw exceptions. > > This is exactly what I am trying to do now. I have a few more (un)related questions: 1. Thus this issue would not exist for simple parallel tasks involving a reduction operation, such as computing average stresses over the domain, using Threads::new_task? 2. The ExceptionBase::print_stack_trace() function does not print anything if I catch an exception thrown using AssetThrow(cond, dealii::ExcMessage()) or even my own MyException class derived from ExceptionBase. How do I ensure that the stack trace is "populated". I tried using the set_fields() function but it did not help. 3. Considering the parallelization of stress averaging, how could I do a reduction operation to ensure summation of the thread local stresses into a "global" variable once I have distributed the computation using the idea described on pg-10 pf Video Lecture-40 slides? Is Workstream the only solution, or is there some less involved alternative, since I just need to sum the return values of the Compute_stressSumOnCellRange() function? > As for turning Assert into throwing exceptions instead of aborting the > program: The way we treat the conditions used in Assert statements is that > they are irrecoverable: There is nothing you can do to make the program do > anything useful if you trigger an Assert, and as such aborting the program > is > the correct choice: You just need to fix the program. A properly debugged > program should never run into an Assert statement. > > This was just for the purpose of testing the procedure. Thanks and best regards, Paras -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAEU6zmQ3awEynNnc9PCT8cy6Vh1Xc1EC%3DjgVJEEHGyYxmXgmiQ%40mail.gmail.com.
