Hi,
My question follows up this old thread:
https://software.intel.com/fr-fr/forums/intel-math-kernel-library/topic/...
I have a similar problem with LAPACKE_dsytrf_work and other LAPACKE_xxx_work functions. Using Gennady's code:
int work_sz = -1; // workspace query; optimal size is returned in tmp info = LAPACKE_dsytrf_work(LAPACK_ROW_MAJOR, 'L', m, NULL, m, NULL, (double *)&tmp, work_sz);
I get LAPACKE_dsytrf_work fails with "Parameter 3 was incorrect":
Major version: 11 Minor version: 3 Update version: 3 Product status: Product Build: 20160413 Processor optimization: Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors ================================================================ Intel MKL ERROR: Parameter 3 was incorrect on entry to DSYTRF. info=-4 tmp=-92559631349317830736831783200707727132248687965119994463780864.0000
When doing a workspace query, NULL for a and ipiv should be valid parameters, right? It seems that passing a dummy pointer workaround the issue only on the surface. Visual Studio reports a stack corruption around ipiv:
Run-Time Check Failure #2 - Stack around the variable 'ipiv' was corrupted.
As the OP mentioned, passing some allocated space (e.g. int ipiv[10]) kinda works but I would prefer a better option.
Thanks, Samuel