Hello,
We are calling MKL from C# code by using general mechanism described in article Using Intel® MKL in your C# program.
The code is using DSS (Direct Sparse Solver) for a large system of equations with numerous different right-hand sides. That is, it makes one call to dss_factor_real and a lot of subsequent calls to dss_solve_real. Generally it works fine. But sometimes, at an advanced interation, an error ocurrs in dss_solve_real:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
So far no particular trigger for this error was detected. In the past I have noticed that if a memory allocation occurs after creating internal dss structures (i.e. after dss_factor_real which obviously must take up a lot of space due to LU decomposition), then a subsequent call to a computing dss function will likely cause an error above. And therefore I am careful not to make any explicit allocations when dss handle is in use. But the error still occurs once in a while.
Just in case, threading is disabled by setting MKL_NUM_THREADS=1.
Any help will be greatly appreciated.