Our client (a bank) has used MKL 6.0 in a financial calculation library written in unmanaged C++. We have then linked this into a server application written in .Net (primarily C#). We accessed the library firstly through P/Invoke and more recently through IJW from managed C++.
Since many of the financial calculations are intensive, we make extensive use of the threading provided by .Net and, in general, spin up a new thread when a new user request comes in and terminate the thread when the calculation has completed (bear in mind that .Net threads aren't easily reuasble and do not necessarily have a one-to-one correspondance with OS threads). Now we have facilities to limit the maximum number of concurrent threads, but even so we are running into problems with MKL.
After someperiod of operation we get a message from the OMP Run-time library indicating that we have hit the maximum number of threads as specified in the KMP_ALL_THREADS env variable (32). We don't have this many threads concurrently executing, so I'm surprised to see this message.
All thoughts / ideas are welcome. I wonder if MKL requires threads to detach themselves and we are experiencing a cleanup problem.
Thanks in Advance