lapack
lapack copied to clipboard
Converting Lapack to F90 + optimization for speed computing
Hi everyone,
I'm actually converting all the Lapack source file to F90, and profit to make as much optimizations as possible. Are you interested to integrate my work in the official Lapack source code ?
Actually done :
I convert BLAS to F90
I serialize everything I can
I delete all the GOTO I simply can
I add implicit none everywhere
I delete ZERO/CZERO etc. parameters in hard-coded way
I debug everything I can, with full compiler options and valgrind in verbose mode
I remake some algorithms to be more efficient
I change the TESTING to have more fine computing time (only during call or function use from Lapack or Blas)
Kind regards,
If this is intended to be a first step towards moving reference LAPACK to Fortran 90, please consider that some projects use f2c to integrate reference LAPACK. As far as I know, there is no tool that converts Fortran 90 code directly to C. So far only a small subset of LAPACK routines is written in Fortran 90. I think that dependent projects reimplement these few functions by hand.
Yes, I agree with you concerning the automatic conversion F77 -> C. However doing this sometime don't permit to have some kind of optimization you can have with F90 (for example memory contiguity when you serialize the loops), etc. Personally, I think that a library like Lapack has to be used with classically linking the compiled static/dynamic library, compiled with the adapted compiler of the sources provided. My point of view is that It's a pity to froze a project because (maybe) someone use it in an unusual way.
Strongly depends on what one calls unusual usage, and whether a reference implementation should be highly optimized or highly portable - if I am not seriously mistaken, Reference-LAPACK "historically" preferred the latter. (Indeed OpenBLAS contains a fairly frankensteinian conversion for platforms that lack a Fortran compiler, there will almost certainly be others as well)
To avoid the problem of F77 -> C version, it still exist LapackE writen in C.
If BLAS has 2 versions, like LapackE and Lapack, maybe let LapackE in C and convert Lapack from 77 to 90 ? What I'm doing is really basic F90, I still don't use anykind of advanced feature of this langage... So it's fully compatible with any F90 compiler.
LapackE is a shim, not an implementation.