I'm using the QR factorization routines (?geqrf and ??mqr) extensively and it seems there is a major problem when using these routines when a workspace query is assumed (lwork = -1).
Attached is an example to reproduce the issue (with just dgeqrf, but it also appears with dormqr for instance).
$ module load mkl/126.96.36.199 && MKL_VERBOSE=1 ./a.out
MKL_VERBOSE Intel(R) MKL 11.3 Update 2 Product build 20160120 for Intel(R) 64 architecture Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled processors, Lnx 2.27GHz lp64 intel_thread NMICDev:0
MKL_VERBOSE DGEQRF(10,10,(nil),10,(nil),0x7ffd95e6d300,-1,0) 28.64ms CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:1 WDiv:HOST:+0.000
$ module load mkl/188.8.131.52 && MKL_VERBOSE=1 ./a.out
Intel MKL ERROR: Parameter 3 was incorrect on entry to DGEQRF.
Is there a workaround that doesn't require to modify my sources ? I'm using null pointers when lwork = -1 everywhere in my code so I would need to change many many routines in my projects, this is not feasible. Thanks.
Thanks for finding and reporting the issue. We have already fixed it internally. The fix will be available in the next release.
I'm afraid there's no workaround for this problem, we're sorry about that. So, please either modify your code or wait for new MKL release to update.