Simulink Memory Allocation Error after multiple simulations.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have combed the website for an answer, but I have not been able to find one (other than install more RAM / use 64 bit PC). However, I think my PC specification should be sufficient.
I am using Matlab 2010b SP2 with a 32bit Windows and 4 GB installed RAM. I have a very large model with a lot of objects, parameters, variables, etc., however most models reference other existing models. I also read about 100 variables of some actual data into the workspace, sampled at 5 msec (50 sec duration) and saved as double.
I can run the simulation. I can log my signals, and I can check my scopes. There are no errors.
After I run the simulation multiple times (example: Run the simulation, Simulation completes, check a scope, close the scope, change a value in my workspace, Run the simulation, Simulation completes, check scope....), let us say three or four times, I encounter a memory error. It does not depend on what variable I change. It only depends on the number of simulations. Even if I do not change the workspace or model, and I just re-simulate, the error will occur after 3 or 4 times. Upon one of the [Run the simulation] steps, while the model compiles all of referenced modules, the error occurs.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error
Message: Model Error
Source: Unknown
Report: Simulink
Conclusion: メモリ割り当てエラー (which I have translated as meaning memory allocation error - Yes, I am using a JP version)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I have tried reloading my workspace. I have tried using pack. The only way I can get the simulation to run is if I close Matlab and restart Matlab. However, it does seem to complete more of compiling, and once in a while successfully compile, if I do not use Matlab for a period of time (e.g. lock my PC screen and go for a cup of coffee for 15 minutes). Regardless, the only consistent fix is close and restart Matlab.
Is there a way to clear out / reset the memory used by Simulink so that it can complete the new simulation? I assume because it can run the simulation once, it should be able to re-run the simulation an infinite number of times.
As a post script, I cannot upgrade Matlab, I cannot add more than 4G to my laptop, closing other programs does not seem to help (Task manager shows 0.5 GB available anyway), a 64-bit PC is not available, and I cannot change my model.
If further details are needed, I will try to provide them.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Multicore Processor Targets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!