0

I have have c++ code in which I parallelize some Monte Carlo Simulations using Rcpp and RcppParallel's parallelFor. The execution is, as expected, much faster then when using a non-parallel loop.

However, after running the code for a night or two, after stopping it. My computer is extremely slow. This persists even if I end/kill all R-processes and is only solved by a reboot.

Question: Since the problem only appears after running code for 1-2 days I cannot produce a MWE. I can also not see anything that clogs up my Computer in the Task-Manager (in fact, it typically shows that the task manager itself takes up most of the CPU). Any pointers on where to start looking for what's responsible for said issue?

sheß
  • 484
  • 4
  • 20
  • 1
    Obseve the processes memory usage. Maybe you have an inadvertent leak? – Dirk Eddelbuettel Nov 03 '20 at 15:49
  • that would require a "new" somewhere in my code, no? since i only use armadillo, RcppParallel and my own code does not include any "new" statements, this seems unlikely. Or is there some way to cause leaks implicitly (I pass matrices around a lot by reference between functions) – sheß Nov 05 '20 at 17:30
  • 1
    Yes, use of `new` without delete is an obvious one, but C++ can allocate object from other operations too. – Dirk Eddelbuettel Nov 06 '20 at 13:47

0 Answers0