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
2
votes
2answers
103 views

Finding a program that can find integer solutions for large values of a variable

I've the following code: ...
12
votes
0answers
226 views

Why does Mathematica consume so much memory when reading binary data?

There are somewhat similar questions on here, but I didn't find a satisfying answer for this case: I import a 1.7 GB binary data file using the following command: ...
0
votes
0answers
23 views

Export to ExpressionML extreme memory consumption

I have a big variable, data, that is (roughly) a large list of polynomials in x with numerical coefficients at high precision (...
4
votes
1answer
67 views

Reduce memory cost with three matrices multiplication

My program is eating up all my RAM and the operation is related to 3 matrices multiplication, as the code shown below. example code: ...
1
vote
1answer
59 views

Notebook to run on batches of files

I have a notebook that Imports files from a folder and processes and stores outputs into another folder. It works well with small number of files, however, when there's a large number of input files,...
10
votes
1answer
115 views

Memory leak with FindMaximum/Minimum inside of Module

This is my first question here. I have to solve coupled first order ODE-s and find the maximum of a function which depends on the solution of the ODE. I have to do this calculation in large quantities,...
0
votes
0answers
26 views

Sequential production of Eigenvectors?

I have to deal with very large matrices in Mathematica (dimensions $10^4\times10^4$ at least). Obtaining the eigenvalues of these matrices is not so difficult since, it is not memory intensive or ...
3
votes
1answer
88 views

Recursive solution to the extended Josephus problem [duplicate]

The Josephus Problem is described here, with extension of killing every $k$th problem. In the simple case where every other person is killed, we can also use the binary trick. ...
6
votes
2answers
391 views

Is it possible to Clear (recover memory from) a specific index to a variable, while leaving other indices to the same variable untouched?

Consider the following method commonly used to clear a typical variable: ...
3
votes
0answers
75 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
74 views

Mathematica quits its calculations automatically

I am trying to plot the ListPlot3D but mathematica quits calculations without any warning or error. ...
14
votes
1answer
201 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
59 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
32 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
220 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
89 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
33 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,...
6
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
25 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
47 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
48 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
70 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
52 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
64 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
78 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
29 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
63 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
35 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
58 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
107 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
622 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
67 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
226 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
95 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
48 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
189 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
80 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
112 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
125 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
117 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
96 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
184 views

ByteCount on Function

I was comparing RAM and CPU efficiency for List, Rule, Association, Function. The following code ...
2
votes
1answer
137 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
245 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
108 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
56 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
126 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
244 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. ...