Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [memory]

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

2
votes
0answers
41 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 ...
2
votes
1answer
60 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
72 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
530 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
52 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
52 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
214 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
48 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
39 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
132 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
51 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
75 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
90 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
100 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
59 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
174 views

ByteCount on Function

I was comparing RAM and CPU efficiency for List, Rule, Association, Function. The following code ...
2
votes
1answer
105 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
92 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
85 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
47 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
68 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
195 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
120 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
55 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 ...
0
votes
0answers
27 views

What's “expr”, “opts”, “s”, “uspec” in Names[“Global`*”] [closed]

SYSTEM: Win7 SP1 X64 Eng - MMA X64 On a very random occasion, I did something and some undesired result came up. So I checked Names["Global*"]`. All I had ...
1
vote
0answers
80 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
52 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
45 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
45 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
141 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
69 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: ...
2
votes
3answers
118 views

Problem with writing a basic function to produce number of multiples

I'm working my way through Wolfram Challenges, the first question was Ok but tripped myself up on the second question. I have a basic function which takes a positive integer n and returns the number ...
18
votes
0answers
149 views

Inefficient memory storage for Dataset

Why Dataset doesn't serialize its contents, isn't it the whole point? I expect it to behave similar to python's pandas.DataFrame,...
5
votes
0answers
63 views

Memory Usage Inexplicably High

I have written a code in Mathematica which creates as a result an array with 19280 arrays, each with 4 elements. The first three being numbers and the fourth being another array with 914 elements. It ...
-2
votes
2answers
347 views

How does this code behave with more than 32GiB RAM? [closed]

The point here is to test how many bits are reserved in a 64-bit kernel for the reference count. For example, ByteCount[5] reports 16 bytes for a machine integer; ...
14
votes
2answers
528 views

How to force Mathematica to clean up the cache

(see the bottom of this question for the MWE) I'm working with a set of numerical data: numerous (a few thousands) files in the style of list of vectors (quadruplets x, y, vx, vy). Files are named as ...
1
vote
1answer
36 views

Set of order preserving functions

I have a partial order defined on a finite set, 13 elements, represented as a directed graph. I'm trying to work with the set of order preserving functions from this poset into a finite subset of the ...
0
votes
1answer
375 views

Best Mac for Mathematica [closed]

I am looking to buy a new Apple laptop or desktop for running Mathematica. What Mac is best, especially if I want to run numerical simulations in Mathematica? (A similar question was asked a few ...
5
votes
1answer
178 views

More efficient way of storing data than PackedArray

I have a compiled function cfun that produces a very large array of data. I learned that compiled functions automatically use PackedArrays. I just wonder whether ...
8
votes
2answers
136 views

How to prevent spikes in memory usage during simple numerical evaluation?

I've noticed strange peaks in memory usage (several GB) during evaluation of my code, sometimes freezing operating system. Nailed it down to numerical evaluation of "bignum" expressions like this: <...
0
votes
0answers
30 views

Use a swap file / partition on Raspberry Pi?

Would Mathematica's performance and stability improve if I set up a swap file or partition on my Pi 3? I'm going to be trying out the Multi-view Reconstruction functionality in Mathematica 11, if ...
0
votes
0answers
49 views

abort the whole notebook conditionally

The whole notebook is one task, but due to Memoryconstrianed the notebook may abort some steps in the middle. As long as this happens, I would like to abort the whole subsequent code, too. Is there ...
0
votes
2answers
45 views

Reading a tabulation of data with brackets and commas: OpenRead

While I can read a data file containing the one/multiple line(s) of 1.314 -4.32 6.44 342.3 using ...
1
vote
0answers
67 views

Clean memory after calculation [duplicate]

I make numerical calculation series with integrals in each term (Mathematica 11.1, system Linux Mint 18). I use ParallelSum with 4 kernels. I start $HistoryLength = 0 at the beginning. MemoryUsed[] ...
5
votes
0answers
94 views

Techniques in debugging with preview of possibly large expressions + garbage collection issues

First of all, all appreciate all suggestions how to rephrase the title to make it more friendly. Here's the background: Let's say your top level procedure flow is complicated, involves url calls, ...
1
vote
0answers
37 views

Full memory from defining a single function

I want to work with a function that is sum of products of HeavisideThetas. Mathematica crashes when I try to define the function. I tried this in Mathematica 9.0 and 11.2 on two different computers. ...
0
votes
0answers
58 views

How to export this data/string more efficiently if possible at all? [duplicate]

Previously I asked a related question about my test data. Looking at the size of the data ans // ByteCount 9602605504 ...
0
votes
0answers
48 views

Prevent running out of memory when doing SpectrogramArray?

I was using SpectrogramArray[Import@"myFile", 22050, 22050]to transfrom a piano mp3 file so that I can (probably?) generate a midi file from that mp3. The step size ...
1
vote
0answers
65 views

Is there a way to know how much Java heap space to set?

I have already set it to be 4GB. Needs["JLink`"] ReinstallJava[JVMArguments -> "-Xmx4096m"] However, when exporting a dataset to Excel sheet, I still get the ...