Python hits the spot
Siegfried Gonzi
siegfried.gonzi at kfunigraz.ac.at
Sun Jun 23 05:05:02 EDT 2002
Bengt Richter wrote:
> Unless you are doing a lot of i/o from the program, sounds like maybe that
> 13% (100-87) may be waiting for swapping to get more virtual space? Or it could be
> coincidental background stuff? (Do you trigger any other processes at some point?)
To cut it here: I tested the Mie code again and it works! The images
what I get are exactly the same as the one in a specific peer reviewed
paper. After that calculation I wait 20 minutes in order to watch
whether the system will freeze or not: it freezes not. THE calculation
does not use any swap! I have got 256MB RAM but the calculation consumes
about 20 MB on Linux; there is no need for swapping (side note: my swap
is 756MB).
In turn I tried the following combinations:
1. The complete calculations without the Mie code (note: the Mie code
works) and dummy values instead.
Result: The first 10 minutes the system consumes 99.8% of the processor
(memory consumption is up to 5%) but after 10 minutes it sucks down to
87% and after 15 minutes the system freezes (I mean there is only the
power off option then!).
2. I did the same without the Mie and Fortran code. Same situation as in
point 1.
3. I did the same without Fortran/C/Satellite binary reading -> same
situation as in point 1 or 2.
4. I turned off every power management for my laptop, but that won't
cure the situation.
Summarize: The system frezzes after 15 minutes and sucks down to 87%
system performance, without any notice why (I cannot see why under "top"
; sometimes I notice that many "kdeinits" appear right after the python
process)? Exactly the same situation appears on Windows: system goes
down from 99% to 87% after some time, but on Windows I do not get a
frozen system.
I then wrote a small Python script in order to test the swap. The Python
script does constantly claim memory and my swap memory consumption goes
up to 500MB (system perfromance is only some 5%). After 30 minutes the
calculation is completed and I can work on without any problems.
That means, if I have got a calculation of the form: processor
consumption 99% and memory consumption 5% the system fails; if I have
got a calculation in the reverse order: 90% memory and 5% processor the
system remains stable.
Maybe this all can be explained that the ActivePython version has a bug
or something like that. Or that the combination Linux/Python/laptop is
not optimal. But I am not willing to install the normal Python version
again (I did it until I noticed that idle was not installed; I invested
2 days in order to install idle but was not successfull; ActiveState was
my isle in the following).
The offer remains valid: if someone is interested in my source code he
can get it.
I am not any longer willing to try the calculation on my Linux box and
Python 2.2 (20 Linux power off shut downs are enough in a day; should I
destroy my laptop?). In the afternoon I will decide whether I will wait
6 hours for the calculation on Windows or not. And I will also decide
whether it will be a good idea to rewrite it in Fortran 90. Python can
then be used in combination with DISLIN for the plots.
S. Gonzi
More information about the Python-list
mailing list