On Sun, Nov 2, 2008 at 4:35 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
> On Nov 2, 2:12 pm, Daniel Allcock <[EMAIL PROTECTED]> wrote:
>
> Hi Daniel,
>
>> Hi all, just got started with SAGE and I hope someone has a suggestion
>> for me.  I have a .sage file defining a big list of approx 170,000 4x4
>> matrices with rational number entries, which I will want SAGE to do
>> various things to.  It takes SAGE 4-5 minutes to read in the file
>> (which was produced by a C++ program), and surely this can be
>> improved.

How are you reading it in?

>
> Probably.
>
>> I assumed that loading it into memory and then writing it to a .sobj
>> file would give me something more manageable.

Good idea.

>>  But I get memory
>> allocation errors:
>>
>> python(2102) malloc: *** vm_allocate(size=8421376) failed (error
>> code=3)
>> python(2102) malloc: *** error: can't allocate region
>> python(2102) malloc: *** set a breakpoint in szone_error to debug
>>
>> Presumably the system has just run out of memory.

That's what the above error message says.  But it could be caused
by some bug...

>  This surprises me
>> since the .sage file is only 12MB, and the .py file it creates is
>> 37MB.  The matrix entries are all small, numerators <10,000 and
>> denominators < 200 or so. I'm working on a MacBook Pro with 2GB RAM,
>> and the machine didn't have any other substantial load.

That doesn't sound so hard.

>> I will need only one matrix at a time, so there should be no need to
>> load in all of them at once.  But poking around in SAGE and python
>> docs hasn't shown me any simple way to, say, read in and execute a
>> single line from some file.
>>
>> Thanks for your help,
>> Daniel
>
> Which version of Sage do you run?
>
> Can you post the code so I can attempt to reproduce the problem?
>
> Cheers,
>
> Michael
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to