Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am running a pretty large optimization problem which actually consists of an outer an inner optmization problem. I use ParametricNDSolve for solving a ODE system. When the optimization is done, Mathematica uses almost all of my RAM memory. If I try Remove["Global`*"] the memory used is still the same.

Is there an easy way to check where the RAM in used?

share|improve this question
    
Does setting $HistoryLength=0 help? –  user21 Jun 6 '13 at 10:57
    
What happens when you quit the kernel? –  Sjoerd C. de Vries Jun 6 '13 at 11:47
    
$HistoryLength=0 does not solve the issue..When I quiet the kernel the RAM used is decreased to the amount that is used when Mathematica is started. –  jaclea Jun 9 '13 at 11:57

1 Answer 1

I used to have the same problem.

It would've helped if you had posted your code here. Anyways I had the same problem and I completely solved it by changing the method. try all of these methods see which one suits your problem more

  • TimeIntegration
  • BoundaryValues
  • DiscontinuityProcessing
  • EquationSimplification
  • IndexReduction
  • DAEInitialization
  • PDEDiscretization

Hope it will solve your problem.

share|improve this answer
    
The problems is pretty large, but I will try to create a small example to illustrate the problem.. I will take a deeper look at the methods you mentioned and see if it helps! –  jaclea Jun 9 '13 at 11:57
    
I haven't found any solution to the problem above. Is anyone aware of problems with NDSolve and memory management? I call NDSolve inside a Module which is called several times during the optimization. When the optimization is done a large amount of memory has disappeared somewhere. It's not in the global context since I dont free up the memory when Removing the global context. –  jaclea Feb 28 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.