[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C interface to Lapack
>We emailed several months ago about some BLAS/LAPACK/ATLAS C interface
>issues, and I unfortunately got tied up with other projects until now.
>So here I go, again...
>What I'm trying to establish is the best method for a "plugin" mechanism
>for BLAS/LAPACK, where I could build a dynamically linked library that
>used an ATLAS-generated BLAS, or a vendor supplied BLAS/LAPACK, or mix and
>match to create the best possible "plugin" for a given machine.
>As far as BLAS alone is concerned, this is no problem, thanks to the "C
>interface to Legacy BLAS" (which I assume you wrote, judging from the
>BLAST paper). If the interface to this plugin expects the C interface,
>then that can either come from ATLAS directly, one of the vendor supplied
>libraries that supports the C interface, or the C interface wrapper can be
>used over the F77 interface.
>So far, so good. But now comes LAPACK. I like the C interface used by
>ATLAS, and it's too bad there's no standard like that. I guess I can
>live with the f2c'ed stuff to call LAPACK. However, LAPACK still needs to
>call BLAS, and any LAPACK is going to use the F77/f2c interface. I've
>thought about writing a translation library that would provide the
>f2c-style calling conventions (e.g. dgemm_) and then just call the cblas_*
I have good news. They are presently working on CLAPACK 3.0, and I was
asked for recommendations, so of course I recommended having standard
wrapper library around the f2c'd blas interface which calls the
appropriate cblas_ routine. The guy doing the CLAPACK implementation
thought it was a good idea, and has implemented it. I CC him on this
reply; perhaps he can give you an idea of the status of the project
(it may be out for all I know) . . .
>What's your opinion? Was there any discussion at the BLAST forum (or
>elsewhere) of how the C interface to BLAS would relate to LAPACK?
Unfortunately, the powers that be seem to think f2c'd code is a C interface.
I almost violently disagree, but then I'm more of a C programmer than
a F77 programmer (unlike the powers that be). So I think that it is
unlikely at this phase that a true C interface will be supported for
lapack (that's a lot of freakin code, man, so ATLAS will not have a
complete interface for a long time, if ever) . . .
>I think no matter what I do, I'll probably end up writing some interface
>layer... hopefully I can convice Wolfram to contribute anything we write
>to ATLAS (if it's wanted, of course). I was going to post this to
>firstname.lastname@example.org, but wasn't sure if it would be appropriate there...
I think it's appropriate. I CC atlas-comm on this reply.