mkl_ddnscsr I/LP64 behavior [solved]

mkl_ddnscsr I/LP64 behavior [solved]

In MKL 10.3.6, when linking with LP64, the routine mkl_ddnscsr segfaults when attempting to write a dense matrix (job[0]=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

Running 

$ ./test_lp64 46341

succeeds, while

$ ./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.

Thanks!

AllegatoDimensione
Download makefile.txt938 byte
Download test.cpp1.32 KB
3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

"... the routine mkl_ddnscsr segfaults when attempting to write a dense matrix with more than about 2^31 (i.e. INT_MAX) entries I did not see this behavior mentioned in the documentation, is it expected?"

The LP64 library routines would have been compiled with 4-byte integers for array indices and integer variables used as loop counters. Failures in the routines should be expected when 4-byte integers are no longer sufficient for the current problem size.

Best Reply

" I did not see this behavior mentioned in the documentation..." - that's not correct, please refer to the mkl User's Guide - Using the ILP64 Interface vs. LP64 Interface

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi