#1 pp3 uses excessive memory on example files.

closed
None
5
2003-09-30
2003-09-19
No

Every time I try to run pp3 (1.7.1) on one of the
example files, it just stops:
% pp3 examples/sgr.pp3
Abort
%

When I run it through gprof I see that it's allocating
>3GB memory:

% gprof pp3 -- examples/sgr.pp3

gprof: out of memory allocating 3939689640 bytes after
a total of 1425408 bytes
%

I'm compiling it with gcc:
gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1,
propolice)

Any ideas?
Thanks!
-Paul

Discussion

  • Paul Kronenwetter

    Logged In: YES
    user_id=126152

    Another example:

    % ./pp3 -
    set constellation SCO
    set center_rectascension 17
    set center_declination -28
    set grad_per_cm 2.5
    switch milky_way on
    switch eps_output on
    switch colored_stars off
    color stars 0 0 0
    color nebulae 0 0 0
    color background 1 1 1
    color grid 0.5 0.5 0.5
    color ecliptic 0.3 0.3 0.3
    color constellation_lines 0.7 0.7 0.7
    color labels 0 0 0
    color boundaries 0.8 0.8 0.8
    color highlighted_boundaries 0 0 0
    color milky_way 0.5 0.5 0.5
    filename output test.tex
    objects_and_labels
    Abort
    %

     
  • Paul Kronenwetter

    strace output from above input file.

     
  • Paul Kronenwetter

    Logged In: YES
    user_id=126152

    Should I mention that this machine has 1GB real memory and
    an additional 1GB swap?

     
  • Paul Kronenwetter

    Logged In: YES
    user_id=126152

    I've always had trouble reading files in without an
    end-of-file marker on UNIX, and I think I came across the
    same problem here. Although I don't know why it can read
    stars.dat, lines.dat, nebulae.dat and milkyway.dat but
    boundaries.dat just gave me fits.

    *If* you have the same problems as I did, please try the
    attached patch. It adds a -1 to the bottom of
    boundaries.dat and adds code to the overload>> for
    boundaries to handle it.

     
  • Torsten Bronger

    Torsten Bronger - 2003-09-22
    • assigned_to: nobody --> bronger
     
  • Torsten Bronger

    Torsten Bronger - 2003-09-22

    Logged In: YES
    user_id=442234

    I don't understand what's going on here. Would it help if I
    look whether there is any difference in the source code
    concerning how boundaries.dat and the other files are read in?

     
  • Torsten Bronger

    Torsten Bronger - 2003-09-27

    Logged In: YES
    user_id=442234

    I cannot reproduce your problem at all. What do you mean
    with adding -1 to the bottom of boundaries.dat and adding
    code to the overload>> for boundaries? I cannot reade
    treace files. Can you create a patch file with diff?

     
  • Paul Kronenwetter

    Logged In: YES
    user_id=126152

    Absolutely. I used this patch to make pp3 work so I can use
    it. Very nice output by the way.

     
  • Torsten Bronger

    Torsten Bronger - 2003-09-30

    Logged In: YES
    user_id=442234

    I think I see the problem now. I'd be kind of you if you
    test the attached patch, too. Probably you see immediately
    the trivial idea behind it.

     
  • Paul Kronenwetter

    Logged In: YES
    user_id=126152

    That patch works nicely for me. Thanks!

     
  • Paul Kronenwetter

    • status: open --> closed
     

Log in to post a comment.