linear algebric equations

Schachner, Joseph Joseph.Schachner at Teledyne.com
Tue Dec 8 14:07:57 EST 2020


Yes.  Import os, and use  os.system( ) to call your Fortran (or C) executable.  If the executable saves results in a file or files, Python can read them in an format a nice overall report.  In html or xml, if you like.

Using Python as glue,  the execution time will be exactly what it was for your executable, because Python will call it; and in a second of so after it finishes Python can read in results and format whatever report you like.

--- Joseph S.

-----Original Message-----
From: Tito Sanò <tsano at tiscali.it> 
Sent: Monday, December 7, 2020 11:59 AM
To: python-list at python.org
Subject: linear algebric equations

Regarding the solution of linear algebraic equations I noticed a big difference in the computation

time in Python compared to the old fortran language.

I have compared both the linelg and lapack.dgesv-lapack.zgesv modules with the fortan: dgelg and f04adf. 

The difference in computation time is enormous:

for example for 430 degrees of freedom it is about 24 min in Python versus about 1 sec in fortran.

Is it possible to get better performance in Python?

Thanks in advance  

Tito Sano' 

Roma Italy

Cell: 339 6903895

 




More information about the Python-list mailing list