"Illegal value" of blas functions called by Armadillo

  armadillo, c++, openblas

I’m using Armadillo (10.4.1) in Visual Studio 2019 to do some matrix stuff. I used OpenBlas from NuGet manager, but everything was slow. I now want to switch to an up-to-date version of OpenBlas. I took the last one (0.3.15) and compiled it with minGW following this tuto : https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio.

The compilation works fine, but when I try matrix multiplication, an error is thrown in the console :
On entry to DSPR2 parameter number 1 had an illegal value

I do have defined ARMA_USE_BLAS, ARMA_DONT_USE_WRAPPER. I tried to played with ARMA_BLAS_LONG, ARMA_BLAS_UNDERSCORE, ARMA_USE_FORTRAN_HIDDEN_ARGS but nothing change.

Everything was working great using NuGet manager (OpenBlas 0.2.14.1).
Here is a sample that doesn’t works:

#include <armadillo>

int main(){

    arma::mat *mat1 = new arma::mat(5, 5, arma::fill::ones);
    arma::mat *mat2 = new arma::mat(5, 5, arma::fill::ones);
    arma::mat *result = new arma::mat();


    *result = *mat1 * *mat2;

    result->print();

    delete mat1, mat2, result;

    return 0;
}

Do you have any clue on what am I doing wrong ?

Thank you for your time !

Bato

Source: Windows Questions C++

LEAVE A COMMENT