Hello,
I have a problem with the complex multiplication on large arrays. The following code leads to segmentation fault in vzMul:
const MKL_INT cLength = std::pow(2, 30) + 1; /* MKL_INT = int = int32 */ const size_t cLengthInBytes = cLength * sizeof(MKL_Complex16); const int cAlignment = 64; MKL_Complex16* pDataComplex1 = static_cast<MKL_Complex16*>(mkl_malloc(cLengthInBytes, cAlignment)); MKL_Complex16* pDataComplex2 = static_cast<MKL_Complex16*>(mkl_malloc(cLengthInBytes, cAlignment)); MKL_Complex16* pDataComplex3 = static_cast<MKL_Complex16*>(mkl_malloc(cLengthInBytes, cAlignment)); for (uint32_t i = 0; i < cLength; i++){ pDataComplex1[i].real = 1.0; pDataComplex1[i].imag = 0.0; pDataComplex2[i].real = 0.0; pDataComplex2[i].imag = 1.0; } vzMul(cLength, pDataComplex1, pDataComplex2, pDataComplex3); mkl_free(pDataComplex1); mkl_free(pDataComplex2); mkl_free(pDataComplex3);
According to the definition of MKL_INT as int32 it should be allowed to insert arrays of length int32Max = 2^31 - 1. There isn't any limitation mentioned in the documentation. The same issue seems to exist for vzAbs.
I use MKL Version 2019.0.1 Build 20180928