Re: speed up a numpy code with huge array

2010-05-26 Thread Stefan Behnel
Alexzive, 25.05.2010 21:05: is there a way to improve the performance of the attached code ? it takes about 5 h on a dual-core (using only one core) when len(V) ~1MIL. V is an array which is supposed to store all the volumes of tetrahedral elements of a grid whose coord. are stored in NN

Re: speed up a numpy code with huge array

2010-05-26 Thread Alexzive
thank you all for the tips. I 'll try them soon. I also notice another bottleneck, when python tries to access some array data stored in the odb files (--- in text below), even before starting the algoritm: ### EPS_nodes = range(len(frames)) for f in frames: ... sum = 0 ---UN =

Re: speed up a numpy code with huge array

2010-05-26 Thread Alexzive
sorry it was just bullshit what I wrote about the second bottleneck, it seemed to hang up but it was just me forgetting to double-enter during debugging after for cycle. On May 26, 1:43 pm, Alexzive zasaconsult...@gmail.com wrote: thank you all for the tips. I 'll try them soon. I also

Re: speed up a numpy code with huge array

2010-05-26 Thread bobicanprogram
On May 26, 7:43 am, Alexzive zasaconsult...@gmail.com wrote: thank you all for the tips. I 'll try them soon. I also notice another bottleneck, when python tries to access some array data stored in the odb files (--- in text below), even before starting the algoritm: ### EPS_nodes =

speed up a numpy code with huge array

2010-05-25 Thread Alexzive
Hello Pythonguys! is there a way to improve the performance of the attached code ? it takes about 5 h on a dual-core (using only one core) when len(V) ~1MIL. V is an array which is supposed to store all the volumes of tetrahedral elements of a grid whose coord. are stored in NN (accessed trough

Re: speed up a numpy code with huge array

2010-05-25 Thread Vincent Davis
It makes me think you are filling you available memory and using the disk as cache. If this happens things will get real slow. You might take a look at your system resources when this is running. I don't have much else to offer and could be completely wrong. Vincent On Tue, May 25, 2010 at 1:05

Re: speed up a numpy code with huge array

2010-05-25 Thread draco parvus
On May 26, 7:05 am, Alexzive zasaconsult...@gmail.com wrote: Hello Pythonguys! is there a way to improve the performance of the attached code ? it takes about 5 h on a dual-core (using only one core) when len(V) ~1MIL. V is an array which is supposed to store all the volumes of tetrahedral