|
Ublas : |
Subject: Re: [ublas] Bindings with ACML MSVC example project? I have linking problems.
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2012-06-30 05:30:17
George Slavov wrote:
> If no one can help me with that, I could describe the issue I'm having.
> My minimal test program involves calling gemv, really simple,
> but I get a linker error: unresolved external symbol sgemv_.
> I am positive that I'm linking to the right libs from ACML.
> I actually included all the libs I could find in the lib folder.
> I used dumpbin to show the symbols in libacml_mp.lib and
> I couldn't find sgemv with an underscore in the end so I decided to
>
> #define BIND_FORTRAN_LOWERCASE
>
I can confirm that I also need to define this for ACML + MSVC.
> But then I got a compilation error because ublas bindings define ilaenv which
> forwards to LAPACK_ILAENV which ends up being named the same.
> So the ublas binding function seems to be trying to call itself and it has the wrong signature for that.
I just tested this, and your analysis is probably correct. Here is what I did and the result:
C:\nobackup\numeric_bindings\libs\numeric\bindings\lapack\test>%BOOST_ROOT%\b2 numbind=acml-msvc include_test
Das System kann den angegebenen Pfad nicht finden.
...patience...
...patience...
...found 1190 targets...
...updating 2 targets...
compile-c-c++ ..\..\..\..\..\bin.v2\libs\numeric\bindings\lapack\test\include_test.test\msvc-9.0express\debug\numbind-acml-msvc\threading-multi\include_test.obj
include_test.cpp
C:\nobackup\numeric_bindings\boost/numeric/bindings/lapack/auxiliary/ilaenv.hpp(32) : error C2660: 'boost::numeric::bindings::lapack::ilaenv' : function does not take 9 arguments
call "C:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"..\..\..\..\..\bin.v2\libs\numeric\bindings\lapack\test\include_test.test\msvc-9.0express\debug\numbind-acml-msvc\threading-multi\include_test.obj.rsp"
...failed compile-c-c++ ..\..\..\..\..\bin.v2\libs\numeric\bindings\lapack\test\include_test.test\msvc-9.0express\debug\numbind-acml-msvc\threading-multi\include_test.obj...
...failed updating 1 target...
...skipped 1 target...
> So then I decided to rename the ublas binding function just to see what happens (haha) and everything magically compiled and linked. But then at runtime I got
>
>
> *** ACML error: on entry to SGEMV parameter number 1 had an illegal value
>
>
> That's when I decided to give this a rest and ask for help. Any help would be appreciated!
I can't reproduce this one, but I tested only on a 32-bit windows-xp with MSVC-9.0 express edition (while writing this email). If you are on a 64-bit windows, it might help to
#define BIND_FORTRAN_INTEGER_8
(or link against the variant with 32-bit integers, which is probably also provided by ACML)
Regards,
Thomas