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

learn more… | top users | synonyms

2
votes
1answer
74 views

PolynomialRemainder memory

This calculation makes the kernel crash because it needs so much memory. Thoughts on how to get around this? ...
1
vote
1answer
138 views

NDSolve memory usage

I am trying to solve numerically a system of linear ODEs with some quickly varying driving functions. The basic command is: ...
11
votes
0answers
195 views

Memory usage of compiled function: C vs WVM

Reported to WRI [CASE:3406803] Why does generating an array in "C"-compiled function uses 50% more memory than doing same thing in ...
9
votes
0answers
407 views

How can I find the source of a memory leak?

I found a really weird issue using NDSolve`ProcessEquations inside module. We start by setting HistoryLength to 0. After this we define a function which takes in an integer and creates a Table of ...
8
votes
0answers
134 views

What is stored in FrontEnd memory?

I quit the kernel, and closed all notebooks, leaving only the startup window. Yet when I open a new notebook, MemoryInUse[$FrontEnd] reveals that the FrontEnd still ...
6
votes
0answers
470 views

NDSolve and memory usage

After some googling, i've found similar problems around, but didn't find a 100% satisfactory answer, so let me ask here: I'd like to solve a 1+1 problem using the method of lines. In spherical ...
5
votes
0answers
140 views

Memory leak when looping over FindInstance in version 10.0.0

Bug introduced in 10.0 and fixed in 10.1 When I run the following (simplified) code with FindInstance, my MemoryInUse is ...
5
votes
0answers
84 views

Possible JLink memory leak (during) object creation

Using MMA 9.0.1 on win7-64. When creating a large number of java objects I noticed memory being consumed in huge quantities (several Gb). This memory is returned/deallocated after my call ...
4
votes
0answers
306 views

Module in numerical model for NonlinearModelFit is slow and leaks memory

I am trying to make a NonlinearModelFit where the model is the result of a numerical calculation. My code works, but it is very slow and also seems to have a memory ...
4
votes
0answers
302 views

Memory problem with producing complex graphics of general type

The problem I am about to ask has appeared once here: Memory Leak in Frontend - anyone know a workaround?. However, in this question I would like to put it in a bit different context. Problem recipe: ...
3
votes
0answers
12 views

EventLocator in NDSolve seemingly hogs memory in Windows, but not Mac

I have written a function (ftest in my code) which does the following: Takes a vector {x,vx,vy} as input Numerically solves (with high precision) a specific ...
3
votes
0answers
194 views

Increasing MaxPoints in NDSolve results in memory issue

I am interested in increasing "MaxPoints" in NDSolve's "MethodOfLines" in attempt to increase the resolution of the plot of the solution of linearly damped wave equation with transparent boundary ...
3
votes
0answers
173 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
3
votes
0answers
263 views

Project Euler (memory and speed issues)

Let n be a positive integer. An integer triple (a, b, c) is called a factorisation triple of n if: 1 ≤ a ≤ b ≤ c a·b·c = n. Define f(n) to be a + b + c for the factorisation triple (a, b, c) of n ...
2
votes
0answers
69 views

NDSolve produces zombies

I am using Mathematica 10.1 and when I execute NDSolve then there are temporary variables produced every time I call it. This seems not to happen when I explicitly ...
2
votes
0answers
78 views

Is there a way to specify which kernel is used to import files (SOLVED)?

Following up on a previous question in which I encountered a memory leak in the JSON importer I have created a SandBox script that will run the Import and analysis on a separate kernel, which be ...
2
votes
0answers
78 views

MatrixRank of a large but sparse matrix

I want to find the rank of a very sparse, quite rectangular matrix mat, but I'm running out of RAM (I have 16 GB) if I try to use ...
2
votes
0answers
80 views

Pros/Cons to updating in place

There are often times when I have to update a list. The following is an example: ...
2
votes
0answers
111 views

Memory used by SparseArray objects

In dealing with a quantum mechanics problem, I am representing some many-body states in two different ways in Mathematica. For two parameters n and ...
2
votes
0answers
54 views

Does Mathematica support out-of-core Associations?

I often find myself collecting data in an Association[] which outgrows my computer's main memory. Does Mathematica support any out-of-core equivalent? Ideally, I ...
2
votes
0answers
242 views

Fast export of large numerical data

Edit It seems that the bottelneck is not due to eigen value problem. I will esit the question soon. I have a 6000by6000 matrix which I got after some calculations. I want to get the eigenvalues and ...
2
votes
0answers
64 views

How to use nest to reduce the memory eatting of mma?

I enconter a problem about number: If we have 5+3+2=151022 9+2+4=183652 8+6+3=482466 5+4+5=202541 then 7+2+5=? It is easy to get the first two group of numbers? for the ...
2
votes
0answers
51 views

distributing definitions in an .m file and memory

I am dealing with a huge table stored in an .m file of size 4 GBs. Somehow when I call the table in .nb file it seems the memory increases not by 4 GBs but more than 10GBs (roughly checking from task ...
2
votes
0answers
88 views

Problem with files size

I need to work with long time series, but I notice that this generates huge files that Mathematica doesn't handle well at all: even opening/saving one of this files is difficult, and the kernel quits ...
2
votes
0answers
137 views

Memory consumed by NMaximize with NDSolve

I'm using NMaximize on a function that calls NDSolve, and running out of memory. I created the following minimal example that (I ...
2
votes
0answers
421 views

Clearing memory of a subkernel in a Do loop

I have a Do loop, which saves data directly to a .txt file. However when I leave it running for long periods of time the RAM ...
2
votes
0answers
299 views

Is mathematica storing information it shouldn't store?

I'm seeking to find solutions to a numerical integration with a large set of parameter combinations (basically, I'm doing a brute parameter sampling). Yet, I believe the memory of the computer is ...
1
vote
0answers
77 views

Possible memory leak in FindMinimum? (MMA v10.0)

So I was running some code when I noticed Mathematica was gulping memory, and after some debugging I think the culprit is found. It turned out the function ...
1
vote
0answers
63 views

How to delete InterpolationFunction created by NDSolve/ParametricNDSolve?

I have faced a uncommon problem. The situation is that I need use ParametricNDSolve/ParametricNDSolveValue to solve ODEs system in the non-linear model fitting process. So every iteration generating a ...
1
vote
0answers
78 views

Lower memory usage and speed nested loops

I'm trying to make some tracking with Mathematica. ...
1
vote
0answers
53 views

Running out of memory when doing non-commutative arithmetic

I need to calculate particular coefficients of the composition of two power series in non-commutative variables. The code below which works fine truncates power series in degree $n=5$. For $n=6$ (the ...
1
vote
0answers
39 views

Imported variables (.mx) are emptied occassionally (Linux, v10.0.2)

I have a severe problem with variables being "emptied" occassionally. I am not able to reproduce the behavior but this is basically what happens: 1) store list ...
1
vote
0answers
62 views

Does Sum calculate all terms before summing them?

After calculating the sum of a large number of large objects, using B = Sum[RandomInteger[{0, 1}, {10^6}], {100}]; I find that ...
1
vote
0answers
81 views

Should I Remove the initial symbols of Module?

Often we use Module to construct complicate function. Consider that Module create new vars every time we run the function, should I remove the initial values at the end of Module-function?Or should I ...
1
vote
0answers
56 views

ImageAssemble and Export gif takes too much memory

Errr.... First Let's create some gifs: ...
1
vote
0answers
91 views

Avoid copying memory for each subkernel

Here is a simplified example illustrating my issue; ...
1
vote
0answers
161 views

Memory issue when using LinearSolve

When I use LinearSolve to solve a large system of linear equations where the left hand side is a matrix and the right hand side is a vector, the process takes a ...
1
vote
0answers
135 views

Heavy duty operations, RAM, and Readyboost

I occasionally work with large 3D arrays and found that with calculations that take a long time, Mathematica completely fills my available RAM (6056 MB minus other active operations [mostly svchost]), ...
1
vote
0answers
155 views

FindRoot runs out of memory in Windows but not on Mac

I am using FindRoot to find solutions to a large, highly oscillatory equation which I generated using other code. When I run ...
0
votes
0answers
57 views

frequent slow evaluations for trivial expressions, large memory loaded

After loading a lot of data into memory and evaluating several hundred expressions without any problems, trivial expressions such as (1+2) take about 5-10 seconds to evaluate. Sometimes they are ...
0
votes
0answers
34 views

Why does NDSolve and ParametricNDSolveValue show different memory manage in same loop?

This is a follow-up question about How to delete InterpolationFunction created by NDSolve/ParametricNDSolve?. In the previous question, J. M.♦ and Albert Retey showed $HistoryLength = 0 and Clear[] ...
0
votes
0answers
55 views

ButterworthFilterModel consumes the memory too much

I have a simple filter which is a result of the these questions here and here I have to use this filter in a Do loop but I found that this filter consume the ...
0
votes
0answers
116 views

Out of Memory Error

I am currently constructing matrices, but I'm having problems with memory. When I evaluate some cells, the kernel quits due to lack of memory. I tried ...
0
votes
0answers
162 views

Constructing and Reducing Tuples in a Memory Efficient Manner

This question is extension of a question I started here: Reduce the output from tuples by including symmetry? and will focus on higher order arrays and issues of optimization (similar to what I've ...
0
votes
0answers
98 views

Applying the square root of operator on polynomial functions

I am trying to apply an "operation" on polynomial functions: apply the operator $(\frac{\partial f}{\partial x}-y\frac{\partial f}{\partial z})^2+(\frac{\partial f}{\partial y}+x\frac{\partial ...