Python hits the spot

Bengt Richter bokr at oz.net
Sun Jun 23 00:42:47 EDT 2002


On Sat, 22 Jun 2002 21:27:17 +0200, Siegfried Gonzi <siegfried.gonzi at kfunigraz.ac.at> wrote:

>Bengt Richter wrote:
>
>> 
>> You apparently have a lot of different stuff glued together. Have you tested the
>> separate pieces separately? Do you have some test problems that you can use to validate
>> numerical results *exactly* (trailing decimal differences need an explanation. They
>> can be benign/acceptable or not).
>
>The Mie code (C function) works, because on Windows I wrote a program 
>under DISLIN in order to depict the phase function, and I can use the 
>same program under Linux without problems.
[my line break] "without problems" presumably means "without apparent problems".
IOW, you could have had a memory leak that didn't cause enough of a problem for
you to notice. Or it may have worked because you interfaced to it differently,
or you may have linked all compatible libraries, versions, etc.

>The Fortran function works 
>too (the Fortran function is really a tiny piece and straightforward in 
>contrast to the C function which is a third party insane pointer hell).
What is this C function?

>The C code itself is essentially the same:  on Windows I compiled it 
>with SWIG and Microsoft Visual C++ and on Linux I used gcc and SWIG; but 
>the name of the function is actually the same. The same goes for all the 
>other functions and directories.
>
What _didn't_ you compile? How many different compilers and run time support libraries
were involved? Could there have been name clashes or incompatibilities?

>
>> I hate to see Python (or anything) bashed without proof. So far I haven't seen the proof,
>> nor an explanation.
>> 
>> If your code is open source, maybe someone will be interested in discovering why
>> it bogs Python down (or Python bogs it down ;-)
>
>The code is open source but not very well documented. But I can send it 
>to you if you like. You can also get the data if you like.
>
I'm not exactly chomping at the bit, but I'd be curious to see the Python if
you want to zip it up and send it attached. How many bytes of python etc.
does it add up to? And how much data? Just curious.

>First, I thought there is something wrong with my data because I have it 
>converted  from DOS to UNIX with: dos2unix.
>
Have you hex-dumped a little to make sure?

>There is an interesting thing to observe: On Windows I am likely to hit 
>the 100MB threshold, but on Unix I only hit 10MB (and sometimes 20MB). 
>At least "top" shows me that.
>
>
>You can get all the functions if you like. I would only have to get it 
>from my laptop back to my stationary machine.
>
>Drop me a note if you want the functions and data. I can prepare it that 
>way that it will be ready to use for you.
>
Maybe you will have it solved before I have that amount of time ;-)

>What I further noticed. On Windows the Task manager tells me that in the 
>first 20 minutes Python uses constantly 99% of the processor power. The 
>same goes under Linux, but after that 20 minutes it sucks down to 87% on 
>Linux and on Windows! Note: same functions and that 8 times!
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?)

Regards,
Bengt Richter



More information about the Python-list mailing list