Boost logo

Ublas :

Subject: Re: [ublas] Bindings with ACML MSVC example project? I have linking problems.
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2012-07-01 11:21:11


George Slavov wrote:
> Thanks for your response Thomas. I really should have mentioned my build environment.
> I'm on Windows 7, 64-bit as you guessed, using MSVC 2010 and Acml 5.1.0.

I should be able to reproduce this build environment (if really required).

> I was really hoping the integer 8 macro will do the trick, but it didn't seem to change anything.
> I really want to use 64-bit versions of things because I'll be using pretty large data sets,
> so I'm not sure I even want to get the 32-bit version of Acml working.

In any case, you will have to take care to define the macro according to whether you link against a 32-bit integer or 64-bit integer version of the library.

> I traced the ublas bindings call I have
> boost::numeric::bindings::blas::gemv(1.0f,A,x,0,blasResult);
> all the way to the Acml call
> BLAS_SGEMV( &blas_option< Trans >::value, &m, &n, &alpha, a, &lda, x,
> &incx, &beta, y, &incy );
> and my debugger shows the first parameter (blas_option< Trans >::value) contains 'N' as a char,
> so that looks right. But something here confuses me. Acml.h shows the signature of sgemv is
> extern void sgemv(char transa, int m, int n, float alpha, float *a, int lda, float *x, int incx, float beta, float *y, int incy);
> Note the first param is not a pointer to a char, but the char itself. So what's with all the reference operators in the ublas bindings code?

I'm really sorry that you had to go to all this trouble. I didn't pay attention that acml.h said:

  C interfaces to ACML routines differ from FORTRAN interfaces in
  the following major respects:
    (i) The FORTRAN interface names are in upper case.

for the windows version, while it said "(i) The FORTRAN interface names are in lower case with appended underscore." for the linux version.

> Any other thoughts on what else I can try?

I updated the code now to also support BIND_FORTRAN_UPPERCASE (and BIND_FORTRAN_UPPERCASE_UNDERSCORE). The regression test pass rate for acml on windows is much higher now. (I probably had postponed finding out why so many tests for acml failed on windows, because other things were more urgent to me. This was even before I complete ran out of time.)

Please update to the latest version, define BIND_FORTRAN_UPPERCASE, and test whether you need to define BIND_FORTRAN_INTEGER_8 or not.

Regards,
Thomas