Why do I get an insufficient memory exception when transferring large matrix using PutFullMatrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 9 Avr 2018
Réponse apportée : MathWorks Support Team
le 18 Avr 2018
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.
Réponse acceptée
MathWorks Support Team
le 9 Avr 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.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!