Re: Who uses clapack?
From: Bart Oldeman (bartoldeman_at_NOSPAMihug.co.nz)
Date: 12/11/04
- Next message: James Giles: "Re: Who uses clapack?"
- Previous message: Jentje Goslinga: "Re: Who uses clapack?"
- In reply to: Victor Eijkhout: "Who uses clapack?"
- Next in thread: Brian Gough: "Re: Who uses clapack?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 11 Dec 2004 18:23:20 +1300
Victor Eijkhout wrote:
> The authors of lapack/scalapack are starting to work on a new release of
> these packages. One of the things we want to address is the sillyness
> that C users, instead of linking to the binaries of the Fortran version,
> use an automatically translated C version.
>
> Therefore we'd like to know precisely what the reasons for this are.
What's in a name?
At netlib there is cblas and there is clapack.
They both prepend c in front of the name but are worlds apart.
A bit confusing. If you make clapack like cblas it would be a lot less
confusing.
There may be a couple reasons for using clapack I can think of:
a) no f77 compiler available
b) "go for the name"
c) developers not knowing how to interface C and Fortran
(on *nix platforms autoconf >= 2.50 does a nice job at this,
GNU octave uses that)
a) may be quite rare nowadays but I just saw a post from an embedded
developer. b+c are in the programmer's mind.
Personally I looked at clapack a couple of years ago, and rejected it
because it doesn't give any clear advantages (same interface but
slower), so linked straight to LAPACK Fortran.
But the interface could be nicer, as you said with a glueing interface
like cblas. I have code like this:
{
/* schur decomposition of LL */
double *wr = malloc(M * sizeof(*wr));
double *wi = malloc(M * sizeof(*wi));
double *vs = malloc(M * M * sizeof(*vs));
double *work = malloc(M * M * M * sizeof(*work));
int *bwork = malloc(M * sizeof(*bwork));
int lwork = M * M * M;
int sdim, info;
dgees_("V", "S", (i==0?select_pos:select_neg), &M, LL, &M, &sdim,
wr, wi, vs, &M, work, &lwork, bwork, &info);
free(wr);
free(wi);
free(work);
free(bwork);
/* right now we have the Schur matrix vs, sdim is dim eigenspace*/
Having a nicer way to call dgees_() would be nice.
ATLAS offers a few lapack functions (not dgees though) so you can extend
that I suppose.
Having to pass values by references just feels strange in C. Row vs
column major can often be worked around using a bit of maths and
transposing matrices (as in cblas).
Bart
- Next message: James Giles: "Re: Who uses clapack?"
- Previous message: Jentje Goslinga: "Re: Who uses clapack?"
- In reply to: Victor Eijkhout: "Who uses clapack?"
- Next in thread: Brian Gough: "Re: Who uses clapack?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|