3

I am using Asymptote 2.37 on Windows 7. I'm trying to make some large scatter plots but get a memory error. When trying to process the following MWE

unitsize(10inch);
for (int i = 0; i < 140000; ++i)
{
    dot((unitrand(), unitrand()));
}

I get the error

error: out of memory

and no output image. Drawing 130,000 dots works, producing a 1.4Mb PDF in just a few seconds.

I don't believe the error is caused by any hardware limitation. I have 29Gb RAM available and plenty of hard drive space.

Is this an Asymptote bug or just a known limitation?

3
  • 1
    I have experienced similar problems with Asymptote on a Windows machine. The Windows version of Asymptote seems to be the problem as the out-of-memory error messages disappeared when I ran my code on a Linux machine.
    – Philipp
    May 18, 2016 at 17:32
  • 1
    This probably qualifies as a "known limitation." I'm guessing there's a setting somewhere when the binary is compiled that tells it the max amount of RAM the binary is allowed to use. If feasible, you might try recompiling Asymptote from source; on a mac the git instructions are the easiest to follow, but I don't know how that would work on a Windows machine. (Maybe with cygwin?) May 19, 2016 at 17:14
  • You could try the option -compact of asy. For me it solved the problem. Jun 18, 2018 at 19:47

0

You must log in to answer this question.

Browse other questions tagged .