In MKL 10.3.6, when linking with LP64, the routine mkl_ddnscsr segfaults when attempting to write a dense matrix (job=1) with more than about 231 (i.e. INT_MAX) entries. When linking with ILP64, there is no error. I did not see this behavior mentioned in the documentation, is it expected? ANSWER: YES (see MKL User's Guide)
The attached test code attempts to create the dense matrix eN * eNT (i.e. an N-by-N zero matrix with a 1 in the lower right corner) from its CSR representation.
Platform: 64-bit Linux, Composer XE 2011 (sp1.6.233), MKL 10.3.6, 4x10 Westmere-EX with 128GB RAM
To build, do
$ source compilervars.sh intel64
then after downloading the two files, type
$ mv Makefile.txt Makefile; make
$ ./test_lp64 46341
$ ./test_lp64 46342
produces a segfault on my platform; the ILP64 version
$ ./test_ilp64 46342
succeeds. Note that N = 46341 ~= (231)1/2 ~= (INT_MAX)1/2, which seems to be related.
I notice that there was a bug fix in the more recent version 10.3.12 (DPD200292943) concerning mkl_?dnscsr, when working with an upper triangular matrix. I am working with a full matrix so I assume this is unrelated.