[Csdp] Using cblas and clapack with CSDP

Brian Borchers borchers at nmt.edu
Sat Oct 30 00:19:44 EDT 2010


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