Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

problem on defining MPI_INT as long int



I am new to Intel and I face a strange problem on defining MPI_INT as long int.

Problem: I add

#define MKL_INT long int

at the very beginning of the provided example <mklroot>/examples/examples_core_c.tgz/spblasc/source/sparse_trsv.c, and the output data for mkl_sparse_d_trsv is [1.0, 5.0, 3.0, 4.0, -13.0], which is incorrect, while no issue is raised when compling.

If I don't add that #define sentence, everything is fine and the output data is the correct answer [1.0, 7.0, 1.0, 6.0, -55.0].

The working environment:

  • Ubuntu 18.04.1 with x86_64 GNU/Linux kenel 4.18.0-25-generic
  • Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications with Processor optimization: Intel(R) AVX2 enabled processors
  • gcc-4.9.3 (Ubuntu 4.9.3-13ubuntu2)
  • compiling command: gcc    sparse_trsv.c    -lmkl_rt     -I<mklroot>/include     -L<mklroot>/lib/intel64     -Wall
  • CPU if helpful:  Intel® Core™ i7-8700

Any advice or solution is welcome.

0 Kudos
0 Replies