Question about scientific calculations in Python
Martin Kaufmann
martinkaufmann at yahoo.com
Thu Mar 14 21:30:02 EST 2002
On Thu, 14 Mar 2002 01:21:43 +1300, Martin Kaufmann
<martinkaufmann at yahoo.com> wrote:
> On Wed, 13 Mar 2002 00:13:50 -0600, "Jason Orendorff"
> <jason at jorendorff.com> wrote:
>
>>Keep in mind, though, that the code I wrote creates a huge 2D array
>>when it is presented with largeish 1D arrays as arguments.
>>
>>So if s_vector is 10000 elements and r_vector is 10000 elements,
>>then a 800-MB array is created. If you've got the RAM, this is
>>okay; otherwise you're in trouble.
>
> The machine I'm using for my calculations has 2 GB of memory. And the
> vectors probably have only about n00-n000 entries.
Well, unfortunately I have to add that my estimate was too low. For
smaller clusters the numeric solution runs fine and is fast, but
for clusters over 1000 atoms it crashes ("MemoryError: can't
allocate memory for array").
I also found out that my colleague is able to run his C program
(containing similar calculations) about 1'000'000 in 10 hours. He
does need that many cycles for Reverse Monte Carlo simulations. As
I will probably have to do similar simulations in the future I
guess I have to switch to C completely.
Regards,
Martin
More information about the Python-list
mailing list