I have a problem when using OpenMP on Intel parallel, I don't know how to catch exception out of loop parallel.
The problem is explaind as below:
// program code with C language
#pragma omp parallel for schedule(auto) num_threads(3)
For(I = 0; I < n; i++)
// test code with C++ language
Test program crashed and can't catch exception of Foo().
Follow spec 3.0 of OpenMP say reason that:
"A throw executed inside a parallel region must cause execution to resume within the same parallel region,
and the same thread that threw the exception C/C++ must catch it.."
For more detail, please refer to link: http://www.openmp.org/mp-documents/spec30.pdf (page 35).
Have any way to catch exception of Foo() at Test code?