Hi Doko,

I think I have it sorted out.

On 28 January 2008 at 01:12, Matthias Klose wrote:
| reopen 462232
| thanks
| 
| Dirk, there are some problems:
| 
|  - the current build doesn't use any external blas library, the build
|    dependencies seem to be bogus.

That seems to be the same for all gsl builds, not only the newest. I have
logs of my builds here all the way back from 1.3 in 2003 to 1.10-{1,2,3}.

So I think this is an upstream choice,

See the program below. You can build it with _either_ the supplied blas, or
the regular blas, or Atlas. Your choice. I think that is good:

[EMAIL PROTECTED]:~/src/progs/C> gcc -Wall -O2 -o blas_sgemm_gsl_blas 
blas_sgemm_gsl.c -lblas
[EMAIL PROTECTED]:~/src/progs/C> gcc -Wall -O2 -o blas_sgemm_gsl_gslblas 
blas_sgemm_gsl.c -lgslcblas
[EMAIL PROTECTED]:~/src/progs/C> ls -l blas_sgemm_gsl_*
-rwxr-xr-x 1 edd edd 7105 2008-01-27 19:12 blas_sgemm_gsl_blas
-rwxr-xr-x 1 edd edd 7105 2008-01-27 19:12 blas_sgemm_gsl_gslblas
[EMAIL PROTECTED]:~/src/progs/C> ./blas_sgemm_gsl_blas
[ 367.76, 368.12
  674.06, 674.72 ]
[EMAIL PROTECTED]:~/src/progs/C> ./blas_sgemm_gsl_gslblas
[ 367.76, 368.12
  674.06, 674.72 ]
[EMAIL PROTECTED]:~/src/progs/C>  
 
|  - if the external libs are used, you have to change the name of the
|    library package.

I don't understand.
 
|  - gsl cannot use the optimized blas libraries provided by atlas, it
|    really should use the external libs. Or is there a reason not to
|    do so?

It can. You'd use it when you build apps against GSL, and by changing your
Makefiles to point to Atlas instead of the default fallback libgslcblas.
 
Gsl being a library, it doesn't actually use blas itself which is why there
is no depends.  

Does this make sense now?

Hope this helps,  Dirk



/* from the gsl info documentation in node 'gsl cblas examples' */
/* compile via 'gcc -o $file $file.c -lgslcblas' */
/* edd 15 Nov 2003 */

#include <stdio.h>
#include <gsl/gsl_cblas.h>

int
main (void)
{
  int lda = 3;

  float A[] = { 0.11, 0.12, 0.13,
                0.21, 0.22, 0.23 };

  int ldb = 2;

  float B[] = { 1011, 1012,
                1021, 1022,
                1031, 1032 };

  int ldc = 2;

  float C[] = { 0.00, 0.00,
                0.00, 0.00 };

  /* Compute C = A B */

  cblas_sgemm (CblasRowMajor,
               CblasNoTrans, CblasNoTrans, 2, 2, 3,
               1.0, A, lda, B, ldb, 0.0, C, ldc);

  printf ("[ %g, %g\n", C[0], C[1]);
  printf ("  %g, %g ]\n", C[2], C[3]);

  return 0;
}


| Matthias
| 
| 
| 
| 

-- 
Three out of two people have difficulties with fractions.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to