I'm using the data fitting routines in MKL (w_mkl_220.127.116.11) for spline interpolation. The fortran routine where these are called is used in a C++ OpenMP multi-threaded application, inside a parallel for loop for completely independent datasets.
The first attempt produced random crashes and wrong results, which suggested a possible data race. When I added a OMP CRITICAL section around the task creation (dfdNewTask1D) and destruction (dfDeleteTask) the code started working perfectly, producing the same results as the single core invocation.
I think the task creation and destruction is not currently thread safe, but a (admittedly quick) look at the manual did not warn about this.
Is this a known issue?
Thanks and regards,