Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Xerbla and CBLAS/BLAS

$
0
0

Hello,

I have a problem using xerbla and cblas/blas functions. The following code ends up with a segmentation fault:

#include "mkl.h"
#include <iostream>

void XERBLA(const char * Name, const int * Num, const int Len){
  std::cout << "XERBLA CALLED!"<< Name << ": "<< *Num << ": "<< Len;
}

int main(int argc, char** argv){
 
  float a = 3.0f;
 
  int length = 1;
  int increment = 1;
  float* NullPointer = nullptr;

  /*VML*/
  vsSub(length, NullPointer, &a, &a);
  /*BLAS*/
  SCOPY(&length, NullPointer, &increment, &a, &increment);
  /*CBLAS*/
  cblas_scopy(length, NullPointer, increment, &a, increment);

  return 0;
}

This xerbla function was successfully tested with VML but for CBLAS/BLAS it is not called in the code above. Is it possible to catch invalid length/increments or nullpointer in CBLAS/BLAS?

Thank you very much,

Mario


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>