0

I am working on a code for a c++ assignment. I am new to the OpenBlas library and would like some guidance on how to apply it. I checked the relevant documentation (https://software.intel.com/en-us/node/520736#A2C46A8C-343B-401D-88B6-9A6B88A4FA47) and interestingly if I try the following line of code I get that

std::complex<double> res = cblas_zdotc(fpowa_d.size(), fpowa_d.data(), 1, fpowa_p.data(), 1);

func.cc:42:93: error: ‘cblas_zdotc’ was not declared in this scope

However, if I try ddot or other functions in the documentation, they're declared. See:

func.cc:42:78: error: cannot convert ‘ra::rarray<std::complex<double>, 1>’ to ‘const double*’ for argument ‘2’ to ‘double cblas_ddot(int, const double*, int, const double*, int)’

Which is expected. The libraries I include are:

#include <iostream>
#include <complex>
#include <fftw3.h>
#include <cmath>
#include <cblas.h>

I am uncertain why cblas_ddot would be declared but cblas_zdotc is not. I have also tried the non-conjugated version, which also fails. Any ideas on how to troubleshoot this?

MrSwordFish
  • 51
  • 1
  • 4
  • Which OS, distro and compiler are you using? And how did you prepare the library? At least, the [latest](https://github.com/xianyi/OpenBLAS/blob/develop/cblas.h#L63) OpenBLAS has the declaration for `cblas_zdotc`. – akakatak Mar 09 '16 at 01:32
  • I am really tired right now, but tomorrow I will edit my post to include more detailed information. In short: Linux Mint in a virtual box with gcc. I did a system update/upgrade yesterday so gcc should be at the latest. For the library I had to compile it with make TARGET=NAHALEM since my particular cpu (i7-4700MQ) did not have 64-bit support (apparently 'BINARY=32' could have also worked). – MrSwordFish Mar 09 '16 at 02:15
  • I reinstalled OpenBLAS with BINARY=32 instead and it worked. I don't fully understand why just reinstalling it with this flag worked but it did. Case closed(?). – MrSwordFish Mar 10 '16 at 18:29

0 Answers0