[metapost] problems with memory in metapost
Yogeshwarsing Calleecharan
yogeshwarsing.calleecharan at ltu.se
Sat May 8 09:25:02 CEST 2010
Hi,
Thanks you for your very kind help. However it's still not working.
I have TexLive 2008 on a Win XP machine and I upgraded to metapost 1.208
some months back. This is what I did:
1. ran kpsewhich mpost.mem from the directory holding figu.mp
E:\paper1\may06\fotos\rplots\gnup\k03>kpsewhich mpost.mem
E:\paper1\may06\fotos\rplots\gnup\k03>
Nothing happens. I don't get any message. However if I look for
texmf.cnf say I do get
E:\paper1\may06\fotos\rplots\gnup\k03>kpsewhich texmf.cnf
c:/Program Files/texlive/2008/texmf.cnf
2. So I made a "normal" search for mpost.mem and found it in the folder:
C:\Program Files\texlive\2008\texmf-var\web2c\metapost
I ran run mpost -ini mpost in that directory:
C:\Program Files\texlive\2008\texmf-var\web2c\metapost>mpost -ini mpost
This is MetaPost, version 1.208 (kpathsea version 3.5.7dev) (INIMP)
(c:/Program Files/texlive/2008/texmf-dist/metapost/base/mpost.mp
(c:/Program Files/texlive/2008/texmf-dist/metapost/base/plain.mp
Preloading the plain mem file, version 1.004) )
Beginning to dump on file mpost.mem
(mem=mpost 2010.05.08)
at most 745 strings of total length 3693
3412 memory locations dumped; current usage is 1036&2302
507 symbolic tokens
Transcript written on mpost.log.
C:\Program Files\texlive\2008\texmf-var\web2c\metapost>
3. I went back to the directory holding figu.mp and tried again the
conversion to eps but I still have the same error message:
E:\paper1\may06\fotos\rplots\gnup\k03>mpost --sprologues=3
-soutputtemplate=\"%j
-%c.eps\" myfigu.mp
This is MetaPost, version 1.208 (kpathsea version 3.5.7dev)
(./myfigu.mp
! MetaPost capacity exceeded, sorry [main memory size=20000000].
_wc->withpen
.currentpen.withcolor.currentcolor
gpdraw->...ptpath[(EXPR0)]_sms((EXPR1),(EXPR2))_wc
.else:_ac.contour.ptpath[(...
l.48057 gpdraw(0,517.1a,166.4b)
;
Transcript written on myfigu.log.
E:\paper1\may06\fotos\rplots\gnup\k03>
Am I doing something wrong? Step 1 does not produce the result that you got.
Thanks again.
Best Regards,
Yogeshwarsing
On 5/8/2010 8:07 AM, Taco Hoekwater wrote:
> Hi,
>
> Taco Hoekwater wrote:
>> Yogeshwarsing Calleecharan wrote:
>>> I set the memory limit to a very high value (I don't know if this is
>>> allowed). I get the message:
>>>
>>> This is MetaPost, version 1.208 (kpathsea version 3.5.7dev) (mem=mpost
>>> 2009.12.12) 7 MAY 2010 11:52
>>> **myfigu.mp
>>> (./myfigu.mp
>>> ! MetaPost capacity exceeded, sorry [main memory size=20000000].
>>> _wc->withpen
>>> .currentpen.withcolor.currentcolor
>>> gpdraw->...ptpath[(EXPR0)]_sms((EXPR1),(EXPR2))_wc
>>>
>>> .else:_ac.contour.ptpath[(...
>>> l.48057 gpdraw(0,517.1a,166.4b)
>>
>> Looks like some form of recursion takes place, because this is the
>> same line number (with a different main memory size).
>
> Yogeshwarsing sent me the files offlist. There is no recursion after
> all, it just needs lots of memory. As I initially suspected, something
> went wrong in the regeneration of the mem file (20000000 is actually
> enough).
>
> There was a bug in mpost 1.208 that caused it to report the current
> main_memory value stored in texmf.cnf instead of the main_memory value
> used by the mem file. This is why there was only a change in the
> error report: it was actually still using the old mem file.
>
> Building an updated mem file on a texlive installation manually
> (without fmtutil) should go like this:
>
> 1. go to the directory where the input file figu.mp lives
> 2. run kpsewhich mpost.mem, this will report something like this
>
> [taco at ntg NewFolder]$ kpsewhich mpost.mem
> /opt/tex/texmf-linux-64/web2c/mpost.mem
>
> 3. go to the reported directory (/opt/tex/texmf-linux-64/web2c in
> my case)
>
> 4. run mpost -ini mpost in that directory
> 5. go back to figu.mp's directory.
> 6. processing should now work.
>
> The file actually needs 11552656 words of main memory.
>
> Best wishes,
> Taco
>
>
>
>
More information about the metapost
mailing list