[Csdp] Using cblas and clapack with CSDP

Henri Kjellberg henrikjellberg at gmail.com
Wed Nov 3 00:08:40 EDT 2010


Hi Brian,

I am becoming oriented in the problem. I could not find a way to
compile F77 to my embedded system (armVFP or ppc_6xx). I am going to
attempt to modify the source code with ifdef's to call the cblas
libraries.

I am trying to figure out if there is some significant change that I
am not seeing or if its purely chaning the names of things. For
example:

In calc_dobj.c we have

int k;
double *a;
double *y;
int incx;

ddot(&k,a+1,&incx,y+1,&incx);

Is it as straight forward as to change it to
cblas_ddot(&k,a+1,&incx,y+1,&incx);

Or am I missing a subtlety.

Best,
Henri



On Fri, Oct 29, 2010 at 11:19 PM, Brian Borchers <borchers at nmt.edu> wrote:
> A followup on this.
>
> I've downloaded and built CLAPACK.
>
> 1. CLAPACK provides a Fortran LAPACK interface to the calling program,
> so it should work with CSDP.
>
> However,
>
> 2. The source code has been modified to use CBLAS calls rather than
> the standard BLAS interface.  This means
> that CLAPACK must be linked with a CBLAS blas library.  Fortunately,
> one is included with CLAPACK.   My guess that CLAPACK left the
> original BLAS interface intact was wrong.
>
> Furthermore,
>
> 3. CSDP directly calls some BLAS routines, and uses the original BLAS
> interface.  So, you must also provide a library that implements the
> original BLAS interface.  There are two relatively easy solutions to
> this that could be done.
>
>   A. Download the Fortran reference BLAS from the netlib web site,
> convert the Fortran to C using the f2c tool, and
>        then compile these routines with gcc and link them with CSDP
> in addition to CLAPACK and CLAPACK's
>        implementation of CBLAS.  Note that f2c can be run on any
> machine- it doesn't directly compile to object
>        code for your architecture.  This is  probably the quickest
> way to just make it work.   I've done this in the distant
>       past for some earlier versions of CSDP, so I'm confident that
> it will work.
>
>   B. Modify the CSDP source code to use the CBLAS interface.  (this
> should be done with #ifdef's, since the CBLAS
>        isn't available on all systems and is in fact somewhat less
> common than the original BLAS interface.)    This would
>        be a relatively straight forward but time consuming bit of
> coding.  It could be done and tested in a couple of
>        hours.  This is probably the right way to do it....
>
> It's worth pointing out that the performance of CSDP depends
> critically on the quality of the BLAS routines that you use with it.
> If performance needs to be improved, the first place to start is by
> getting a faster BLAS in place- the reference BLAS included with
> CLAPACK (and available in Fortran from the Netlib site) is notoriously
> inefficient.
>
> Let me know if this doesn't make sense or you run into trouble getting
> it to work.
>
>
> --
> Brian Borchers                          borchers at nmt.edu
> Department of Mathematics      http://www.nmt.edu/~borchers/
> New Mexico Tech                       Phone: (575) 322-2592
> Socorro, NM 87801                   FAX: (575) 835-5366
>




More information about the Csdp mailing list