Nearly Identical: How to expand TeX's “main memory size”? (pgfplots memory overload)
I'm getting the same error as the other question, but the answer there is not handling my issue. I believe the error from the other question was due to using many images in the same file; my error is due (I think) to having a lot of memory usage in one image alone. Thus, the externalizing solution doesn't seem to be working.
I'm trying to generate a tree diagram for a paper I'm writing. It involves the exponential growth of nodes by 3's up to 3^8 = 6,561 for a total of ~9,000 total nodes.
Here is the code:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{shapes,trees}
\usetikzlibrary{external}
\tikzexternalize
\begin{document}
\begin{tikzpicture}
[grow cyclic,
level 1/.style={level distance=30mm,sibling angle=120},
level 2/.style={level distance=30mm,sibling angle=60},
level 3/.style={level distance=10mm,sibling angle=50},
level 4/.style={level distance=6mm,sibling angle=30},
level 5/.style={level distance=4mm,sibling angle=10},
level 6/.style={level distance=2mm,sibling angle=7},
level 7/.style={level distance=2mm,sibling angle=7},
every node/.style={circle,draw,inner sep=1.5pt},
dot/.style={circle,fill,inner sep=0.5pt}]
\node {\tiny{you!}}
child foreach \x in {1,2,3} {node[dot] {}
{child foreach \x in {1,2,3} {node[dot] {}
{child foreach \x in {1,2,3} {node[dot] {}
{child foreach \x in {1,2,3} {node[dot] {}
{child foreach \x in {1,2,3} {node[dot] {}
{child foreach \x in {1,2,3} {node[dot] {}
{child foreach \x in {1,2,3} {node[dot] {}}}}}}}}}}}}}};
\end{tikzpicture}
\end{document}
I've tried calling this via pdflatex -shell-escape file, but it seems that the last iteration is what kills it. It generates fine if I just remove one of the iterative steps. In other words, 3^6 nodes works, but not 3^7. I'm actually trying to go to 3^8.
Any suggestions?
Here is the exact error while running pdflatex -shell-escape file that halts:
! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "test-figure0" "\def\tikzexternalrealjob{t
est}\input{test}"' did NOT result in a usable output file 'test-figure0' (expec
ted one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system c
alls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also name
d 'write 18' or something like that. Or maybe the command simply failed? Error
messages can be found in 'test-figure0.log'. If you continue now, I'll try to t
ypeset the picture.
Again, running with just one less level compiles fine (without -shell-escape or externalization), so I don't think this message is indicating that anything is wrong with my code, but I could be wrong.
--extra-mem-top=2000000– Ulrike Fischer Jul 26 '11 at 08:44pdflatex: unrecognized option '--extra-mem-top=10000000'. Any suggestions? – Hendy Aug 02 '11 at 02:10texmf.cnffiles in the search path, and values from in earlier files override those in later files, so you could try to put a smalltexmf.cnfin the folder of your document. – Ulrike Fischer Aug 02 '11 at 07:53