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

Link Issue with mkl_scalapack

yongbei_ma_
New Contributor I
967 Views

my code(test.cpp) is this:

#include <vector>
#include "mkl_scalapack.h"

void main()

{
    int N = 1000;
    std::vector<int> key(N);
    std::vector<double> value(N);
    for (int i = 0; i < N; i++) {
        key = i+1;
        value = i+1;
    }
    int info;
    char id = 'I';
    dlasrt2(&id,&N,&value[0],&key[0],&info);
}

my build option is this(on OS X 10.11.3 ,mpi version /opt/intel/compilers_and_libraries_2016.2.146/mac/mkl/lib):

$icpc -mkl test.cpp -o test
Undefined symbols for architecture x86_64:
  "_dlasrt2", referenced from:
      _main in icpcHc4PnE.o
ld: symbol(s) not found for architecture x86_64

my question:

what's the correct option to build this file?

Thanks

 

0 Kudos
1 Solution
yongbei_ma_
New Contributor I
967 Views

Now I have to use the LAPACK instead of SCALPACK, it works....

int info = LAPACKE_dlasrt('I',N,&value[0]);

 

View solution in original post

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
967 Views

pls try -mkl:cluster.   -mkl option, by default links with SMP libraries. 

0 Kudos
yongbei_ma_
New Contributor I
968 Views

Now I have to use the LAPACK instead of SCALPACK, it works....

int info = LAPACKE_dlasrt('I',N,&value[0]);

 

0 Kudos
Reply