Skip to main content

Timeline for NIntegrate and memory use

Current License: CC BY-SA 3.0

13 events
when toggle format what by license comment
Jun 16, 2020 at 9:23 history edited CommunityBot
Commonmark migration
Apr 13, 2017 at 12:55 history edited CommunityBot
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Aug 20, 2015 at 9:10 history edited Alexey Popkov CC BY-SA 3.0
added 579 characters in body
Aug 20, 2015 at 5:16 comment added ilian @Alexey NIntegrate uses mostly "Numeric"; the max bytes refer to the size of a single entry in the cache table but by default there can be up to 7147 of them. Of course, setting "Cache" -> False will put a stop to it.
Aug 20, 2015 at 2:50 comment added Alexey Popkov @ilian What option controls the NIntegrate cache size? The "Numeric" option has suboptions "CacheTableLength" -> 1021, "CacheKeyMaxBytes" -> 1000000, "CacheResultMaxBytes" -> 1000000 what seemingly tells us that the cache should not exceed 2 Mb, but as it is seen from the "Update" section the cache size grows up to 8 Mb and there is no sign that it will stop.
Aug 20, 2015 at 2:40 comment added ilian @Alexey Not infinitely, I believe, since the cache size is bounded (and can be controlled via SystemOptions["CacheOptions"]).
Aug 20, 2015 at 2:28 history edited Alexey Popkov CC BY-SA 3.0
added 491 characters in body
Aug 20, 2015 at 2:19 comment added Alexey Popkov @ilian You are right, without NIntegrate I get the same picture as in the "UPDATE 2" section. But is it right that without ClearSystemCache[] we get infinitely growing memory usage just for caching?
Aug 19, 2015 at 22:38 comment added ilian @AlexeyPopkov Does the plot still look increasing if you replace NIntegrate[]; with foo; or nothing? I think it just reflects temporary allocation needed by Table to build lst2 but that memory is not lost -- if you try evaluating the same piece of code multiple times and check the actual value of MemoryInUse[] after each time, does it always grow or does it stabilize? Of course, remember to set $HistoryLength=0 before this experiment.
Aug 19, 2015 at 22:12 history migrated from stackoverflow.com (revisions)
Aug 18, 2015 at 19:11 comment added Alexey Popkov @MichaelE2 I updated the answer.
Aug 18, 2015 at 14:25 comment added Michael E2 What happens if you ClearSystemCache[]? It seems to go from a modest rate of increase to a negligible one.
Aug 18, 2015 at 10:33 history answered Alexey Popkov CC BY-SA 3.0