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

Problems with using MKL sgetrf

taniab
Débutant
1 776 Visites

I am compiling a big code base for contour mapping that uses sgetrf and sgetri. The code compiles fine, but I get two error messages as given below, followed by a segmentation fault:
Parameter 1 to routine SGETRF was incorrect
Parameter 1 to routine SGETRI was incorrect

To recreate the error on a smaller test, I have created the attached file test.c.

1) I compiled it using:

g++ -g test.c -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_ilp64 -lpthread -lm -ldl -lmpi

The original code uses nvcc.

2) MKLROOT is set by setvars.sh to be:
/opt/intel/oneapi/mkl/latest

ls /opt/intel/oneapi/mkl/
2021.2.0/ latest/

 

Thank you for any help with this.

0 Compliments
1 Solution
mecej4
Contributeur émérite III
1 743 Visites

If the integer arguments being passed to MKL Lapack and BLAS routines are 32-bit integers, you should not be using the ILP64 libraries. You should use the LP64 libraries, instead. Use the MKL Link Line Advisor to obtain the correct command line.

Voir la solution dans l'envoi d'origine

0 Compliments
3 Réponses
mecej4
Contributeur émérite III
1 744 Visites

If the integer arguments being passed to MKL Lapack and BLAS routines are 32-bit integers, you should not be using the ILP64 libraries. You should use the LP64 libraries, instead. Use the MKL Link Line Advisor to obtain the correct command line.

0 Compliments
taniab
Débutant
1 728 Visites

Thank you so much. Using LP64 libraries fixed the problem.

0 Compliments
MRajesh_intel
Modérateur
1 686 Visites

 Hi,


Thanks for the confirmation!


As this issue has been resolved, we will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


Have a Good day.


Regards

Rajesh




0 Compliments
Répondre