Why do I get an insufficient memory exception when transferring large matrix using PutFullMatrix

1 visualización (últimos 30 días)
The customer is executing MATLAB code from the C# code. When transfering 12424x14666 matrix via PutFullMatrix(), the customer receives the following error saying
Out of memory exception: Infufficient memotry to continue the execution of the program.
The code works fine when the size of the matrix is much smaller. The size of the matrix is approx. 5 GB and the machine has 64 GB memory.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 9 de Abr. de 2018
This restriction with large arrays seems to be imposed by Microsoft and does not seem to be specific to MATLAB. According to Microsoft MSDN documentation, One of the reasons for this exception is when an attempt to create a large array (exceeding 2GB) in a 64-bit process is made in a .NET process. Please refer to the following link for more information on possible reasons for this exception:
Please find the sub section "You are attempting to create a large array in a 64-bit process" in "Remarks" section of the above link to obtain detailed explanation about this exception.
As a workaround for this issue, try to create and send smaller matrices from C# and combine them in MATLAB if possible. If that is not possible, contact Microsoft technical support to use configuration file setting to enable arrays whose total size exceeds 2 GB.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by