Questions tagged [memory]

Questions about RAM usage, including optimizing memory use, avoiding and fixing leaks and releasing unused memory.

Filter by
Sorted by
Tagged with
3
votes
0answers
60 views

Is there a maximum amount of RAM Mathematica can manage?

We are performing full diagonalization of large matrices using Mathematica, in order to study certain statistical measures of eigenstates in certain problems of quantum physics. We have been using ...
0
votes
1answer
67 views

Mathematica quits its calculations automatically

I am trying to plot the ListPlot3D but mathematica quits calculations without any warning or error. ...
13
votes
1answer
175 views

Memory leak in the system function: how to free memory without restarting the kernel?

$HistoryLength = 0; Warming up: TextSentences[StringJoin@RandomChoice[Join[Alphabet["Russian"], {" ", "."}], 100]]; No ...
5
votes
0answers
30 views

Possible NetTrain[] memory leak when training in GPU

I've just moved to Mathematica 12.0 (from 11.3) and sometimes NetTrain[] will fail with the following error: ...
0
votes
0answers
28 views

CoefficientRules for huge expressions

Is there some idea to get the coefficients for a very complicated, huge, and explicit polynomial expression to avoid insufficient memory problem? I am trying to use GroebnerBasis`DistributedTermsList ...
22
votes
1answer
205 views

Possible Memory Leak Issues in NestWhile

Consider the following code snippet: NestWhile[{#[[1]]+1,Pause@.001;ConstantArray[0,{100, 100}]}&, {1}, (#[[1]] <= 10000) &, 2] In theory, when ...
2
votes
0answers
84 views

Mathematica running out of RAM while executing NDSolve

I am playing with Mathematica to solve the 2D-wave equation with the code below: ...
0
votes
0answers
31 views

Triangulations of a convex polygon

I have a piece of code which finds all triangulations of a convex polygon. It is known that a number of such triangulations for a given $n$-gon is is given by ($n-2$)th Catalan Number, so for instance,...
5
votes
1answer
1k views

Computing elements of a 1000 x 60 matrix exhausts RAM

I am trying to compute a 1000 x 60 matrix or list of lists (and ideally this should go up to 1000 x 500 or 1000 x 1000). Each element is the result of a FindRoot ...
0
votes
0answers
16 views

SystemException[“MemoryAllocationFailure”] with long evaluation involving FindRoot

I had earlier posted my code in a previous question, but I am reposting my code here: ...
2
votes
0answers
44 views

How to use SPARQLExecute for SPARQLSelect on Entities?

When using SPARQLSelect on Entity Types the entire entity store is downloaded to the local cache. For example, ...
2
votes
0answers
45 views

MemoryAllocationFailure: Finding 90% Confidence ellipses for 2d PDFs with *tiny* densities

I'm trying to find a 90% confidence ellipse for a complicated, and tiny "Gaussian-esque" PDf. These pdf is the result of many, many ugly marginalizations and transformations so I can't quite list the ...
1
vote
0answers
68 views

Memory leak in simple program

I am trying to solve a simple optimization problem on the sphere, and for some reason, I got some memory leak that I am not able to solve. To decompose the problem in step, what I wan to do is Take ...
4
votes
0answers
50 views

SystemException[“MemoryAllocationFailure”] with DSolve and using TimeConstrained

Report to WRI CASE:4238154 There is a similar question where SystemException["MemoryAllocationFailure"] is generated by DSolve ...
2
votes
0answers
52 views

Simplifying long expressions leads to memory allocation failure

I am currently trying to manipulate a number of expressions into a particular form that will allow me to determine their poles and zeros: ...
1
vote
0answers
54 views

How can I efficiently call an external Python script that needs to run continuously?

I am writing a Mathematica program that tries to run 100+ Python programs, via StartProcess[], continuously. It seems to work when I run < 100 programs, but, at ...
2
votes
0answers
28 views

How to iterate over Orbit of PermutationGroup?

Another day, another permutation group question. I'm given a g=PermutationGroup[...], and a list l={1, 3, 3, 2, ...}. I know I ...
2
votes
0answers
61 views

Memory leak in SmithDecomposition?

While trying to compute a large number of Smith decompositions in Mathematica 11.0 under Windows 10, my computer keeps running out of memory for no apparent reason. Here is a self-contained example ...
0
votes
0answers
34 views

How can I get an array of very large primes when I don't have a lot of memory?

I would like to perform computations on an array of primes within the range $[2,10^{15}]$. For the moment, I am selecting such an array using the command: ...
2
votes
0answers
56 views

Memory leakage when exporting “.mov” files

I am using Mathematica 11.3 with Windows 10. When calling Export to export a List of Images as a QuickTime movie, the memory used by Mathematica 11.3 increases ...
4
votes
1answer
88 views

Memory consumption problem when reading png images with Image`ImportExportDump`ImageReadPNG

For importing png images I use often: image = First@Image`ImportExportDump`ImageReadPNG[fileName] (see: ?*`*PNG*) since this is faster than: ...
3
votes
1answer
73 views

Prevent MMA from saving results in Out[] [duplicate]

MMA automatically saves every result which then can be called via Out[] where the argument needs to be given as %n and ...
20
votes
1answer
584 views

Generating and rendering extremely large graphs

I'm interested in generating and rendering extremely large graphs, i.e., ones having $10^6 \to 10^8$ vertices. (These graphs will ultimately be rendered in PDF or PNG and printed on large, poster-...
5
votes
0answers
63 views

How to prevent the message: Not enough memory to display a cell

While running a single-cell GUI application that repeatedly changes and refreshes its content I got this message: There was not enough memory to display a cell... I found in this old MathGroup thread ...
0
votes
1answer
53 views

How to optimize this script?

fx8350, 16Gb ram just need to solve this: 13, 19, 19, 16, 26, 33, 26, 31, 5, 24, 21, 34, 35, 35, 35, 20, 7, 12, 18, 17, 6, 8, 15, 24, 2, 17, 15, 22, 29, 15, 21
4
votes
1answer
222 views

estimation of values using NMaximize over symbolic array entries

I'm trying to generate instances of a dataset that satisfy specific conditions, based on the following equation: Each of four non-zero terms (term 1, A; term 3, B; term 4, C; term 5, D) is a scalar. ...
0
votes
0answers
82 views

Mathematica quits kernel with a beep sound on MacBook Pro (2015)

Mathematica sometimes quits kernel while I'm trying to plot a bunch of eigenvalues of a matrix vs some parameter, accompanied by a beep sound. It didn't used to do this at all, so I don't think its ...
3
votes
0answers
44 views

How can I prevent ParallelTable[] from freezing?

I have spent some time trying to figure this out. I have a function that appears to be the reason my program is freezing. I am using both MemoryConstrained[] and <...
3
votes
2answers
166 views

Schrödinger equation for a hydrogen atom and lack of memory

I'm trying to solve the Schrödinger equation for a hydrogen atom in the Cartesian coordinate system. This is my code ...
3
votes
1answer
60 views

SystemException[“MemoryAllocationFailure”] with compile and speed issues

I am trying to run a code that gives out a matrix but, I seem to encounter some memory issues while trying to run it. The code is: ...
0
votes
1answer
92 views

Increasing the speed of sparse array

I am trying to find a sparse matrix of the size Col x Rows = 16777216 x 1024 where all the elements are 0 except the ones given ...
6
votes
1answer
116 views

Clever caching of a recursively defined function

I've got a function of the form f[n,s] where n is a natural number and s is a finite ...
5
votes
1answer
113 views

How do computational resources required for NDSolve scale with integration time?

In a nutshell I have a large system of ODE. When I integrate the system from x = 0 to x = dx, ...
0
votes
1answer
78 views

Why does Table[] slow down exponentially with increasing length? [closed]

I haven't been able to find anything to specifically answer my question: When using Table[], I find that, for a program I am working on (I would post the code but ...
5
votes
3answers
181 views

ByteCount on Function

I was comparing RAM and CPU efficiency for List, Rule, Association, Function. The following code ...
2
votes
1answer
132 views

Flattening large list of lists

Part of my code takes in list of lists of around 200 integers and produce a new list of lists. Following the approach in this post and this post, I created the new list using the linked list approach ...
1
vote
0answers
192 views

Kernel shutting down automatically with no error

What are the possible reasons why a kernel exits and the computation simply stops without printing out an error message? In case the specific scenario is required, it is as follows but perhaps the ...
5
votes
1answer
103 views

Packing and unpacking of arrays with Map/Table

How can I create function, that will not unpack packed arrays with Map/Table. For example I want read bytes from opened stream (this is my original goal): ...
1
vote
1answer
55 views

Memory consumption for importing numerical data from an ascii file

I am importing a file which contains data consinsting of 8918347 lines and 6 columns of the following type: ...
2
votes
1answer
88 views

Memory usage for large matrices

I have a quick and probably naive question about how MMA (11.2) handles memory (I am very novice with numerical calculation using MMA..). I have to work with large matrices (of sizes over $30000^2$)....
11
votes
2answers
226 views

Managing memory for video frames

I am trying to import a gif animation, which is about 80MB. The goal is to convert the image to grayscale, and then do some calculation on ImageData for each frame. ...
0
votes
0answers
136 views

NDSolve and memory used

I am trying to solve a PDE with NDSolve, but it turns out that it uses a lot of RAM memory. In fact my PC stalled serveral times. I tried with two different computers and with Mathematica versions v11....
4
votes
0answers
61 views

Possible memory leak in URLRead? (MMA v11.3)

I was writing a API with a lot of http requests, when I noticed Mathematica was slowly using more and more memory, and after some debugging I think the culprit is ...
1
vote
0answers
99 views

Memory use for large computation

I am running a "big" program on my 32G RAM laptop. When MMA is running, roughly there is about 28G RAM "available" to use. So I did a bit of a test. ...
1
vote
0answers
50 views

Mathematica breaks [closed]

I write the following command. After running for seconds (less than a minute), Mathematica breaks and nothing is displayed. Why? a = Tuples[{1, I, -I}, {1, 20}] ...
3
votes
1answer
66 views

Memory issue of SparseArray between Notebook window and Wolfram Documentation window

Recently I'm trying creating a 80000 x 80000 sparse array in Mathematica, and I discovered a strange thing when using SparseArray[]. Code: ...
3
votes
1answer
50 views

How to assess GeoZoomLevel for GeoElevationData

I'd like to fetch at most 10 000 points from GeoElevationData, regardless of the location's specification. From my experience it usually fetches ~100-400k points ...
0
votes
0answers
47 views

Memory management using blocking but in vain

I have trained a classifier named c and want to apply it to testing set. However, due to the huge size of testing set, I have to make prediction in blocks/groups to ...
6
votes
1answer
150 views

Code in separate cells causes a kernel crash [duplicate]

Bug introduced in 11.2 If I put the following code in separate cells the Kernel crashes (dies). If I put them together in the same cell it works fine. Version 11.3.0 for Windows. ...
3
votes
1answer
80 views

SystemException[“MemoryAllocationFailure”] bug in Histogram/Bincounts

I'd like to share a pernicious problem with BinCounts and therefore also Histogram. The minimized problem is as follows: ...