[fortran,patch] BLAS-enabled matmul

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Apr 3 22:24:00 GMT 2006


On Mon, Apr 03, 2006 at 11:53:24PM +0200, FX Coudert wrote:
> 
> [Using the standard no-option compile line]
> 
> real    0m6.366s
> user    0m6.316s
> sys     0m0.048s
> 
> [Using a complex argument to -fexternal-blas, to link in an optimized 
> ATLAS version of BLAS]
> 
> real    0m0.979s
> user    0m0.923s
> sys     0m0.054s
> 
> And that "0.979s" doesn't sound too bad!
> 

Very nice!

I won't have time to review this until Saturday.  One quick question.
Will gfortran grab the optimized blas routines with the following 

   gfortran file.f90 -L/some/path/to/blas -loptimized_blas 

> On the front-end side: we look for the new options -fexternal-blas and 
> -fblas-matmul-limit. If the second one is used for compilation of the 
> main program, a call to set the library 
> compile_options.blas_matmul_limit value accordingly. As for the first one:
> 
> 1. if it's not specified, the driver adds "-lgfortran_blas -lgfortran" 
> to the options, making the full final libraries order "-lgfortranbegin 
> -lgfortran -lgfortran_blas -lgfortran -lm"; this is needed because 
> libgfortran_blas references a symbol from libgfortran, namely 
> libgfortran_called_blas (see above about this one)

The driver should build a list of libraries of the form
"-loptimized_blas -lgfortranbegin -lgfortran -lgfortran_blas -lgfortran -lm"
with -L/some/path/to/blas in the search path.

-- 
Steve



More information about the Gcc-patches mailing list