Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Welcome to the Intel(R) MKL Forum

Intel_C_Intel
Employee
1,853 Views
The Intel Math Kernel Library is a new forum for users and interested developers to discuss issues relating to this math library product. Because of the breadth of this library - BLAS, LAPACK, DFTs, ScaLAPACK (with MKL 7.0 alpha and beta), Vector Math Library and Vector Statistical Library - may draw a wide audience. We certainly hope so.
A very short note about what the forum is not: This is not a forum for technical support for the library. Rather, please go to the library support site which is staffed and set up to register and respond to support issues you may have.
As one of the moderators of this form I (Bruce) hope we can learn from the shared experiences of a wide range of users, that we may find more effective ways of using the software, that suggestions for improvements, enhancements and enlargements will arise over time.I also hope we can have fun in a constructive, amicable way.
In short, welcome to this forum. You may choose only to read what is going on in the forum. We would like you to contribute, to ask questions, to make suggestions, perhaps you have the suggestion that will be most helpful to another developer. While to say "the more the merrier" would be a cliche and thus we would never use that expression, nonetheless a large contributing community will make this a more lively and useful forum for all of us.

We encourage you to introduce yourself so we can know a bit

Message Edited by bsgreer on 12-17-2003 01:59 PM

12 Replies
elmeliegy__abdelrahm
1,853 Views

HI,

I am Starting  my PhD in civil engineering and i am trying to link MKL with C++ through Eclipse IDE ( The compiler is GCC). I followed the 4 steps of configuring Eclipse with MKL but the problem still exists. 

Is there a step by step illustration to do this, i have been trying in this more than 3 days and i can not. Aslo, i tried to use the examples in the MKL folder, but also i have the same problem.

Sheikh__Zahra
Beginner
1,853 Views

I am trying to compile my cython code which contains scalapack. I used the following mkl libraries for compilation of the code:

extra_compile_args=[ "-fopenmp", "-lmkl_def", "-lmkl_lapack95_lp64", "-lmkl_core", "-lmkl_intel_lp64",  "-lmkl_rt", "-lmkl_intel_thread" ] ,
extra_link_args=['pdgetrf_.o', 'pdgetri_.o', 'scalapack_wrap.o','-fopenmp', "-lmkl_def", "-lmkl_lapack95_lp64", "-lmkl_core", "-lmkl_intel_lp64", "-lmkl_rt", "-lmkl_intel_thread"] )

The code gets compiled but when I import the cython code in python I get the following error message:

 

>>> import scalapack_funcs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /opt/intel/mkl/lib/intel64/libmkl_scalapack_lp64.so: undefined symbol: dapply_2hv

 

I will appreciate if someone can suggest how I could fix this problem?

Pham__Buu
Beginner
1,853 Views

Hello,

I don't know if the non-negative matrix factorization is implemented in mkl?

Thanks!

Morasata__Rico
Beginner
1,853 Views

Hi,

I am trying to solve a nonlinear system of equations using Intel MKL PARDISO. I am implementing the standard Newton-Raphson method. However, the program crashes and, upon debugging the code with Valgrind, the attached error log is produced.

I would like to ask the following questions:

- Could you please enlighten me on  the main issues here? The code is written on C++ and is run on Ubuntu 16.04 using a Makefile (please see the attachment).

- How could one estimate the condition number of a matrix stored in CSR format? 

- How could one check whether a matrix in CSR format is symmetric and positive definite? To my understanding, there is no specific routine that carries out such a task. 

- Could the use of a deprecated routine cause run-time issues? For instance, if I want to convert a CSR matrix into a CSC matrix and use the mkl_dcsrcsc function.

Thank you for your time and consideration.

Regards,

Rico

Gennady_F_Intel
Moderator
1,865 Views

It's too tricky to say where the problem may come from without the comprehensive example. At the first glance the code looks correct.

Could you try to  check if your input matrix is correct. (iparm[26]=1 ), split the call to separate phases 11, 22 and 33 and see when the crash will happen. 

Yes, there is not specific routines to check if the input matrix are symmetric of spd ones.

regard to deprecated routines -- we don't expect such issues with the latest MKL 2019 u1 .

Wetterer-Nelson__Cor
1,865 Views

Hi Everyone! I've got an interesting problem I'm hoping to find some insight on.

So we have a need to perform large matrix-vector and matrix-matrix products. We are invested in storing the matrices in BSR format, though we  modify the standard so that dense blocks in the matrix can be rectangular. In the case of square blocks, we defer to MKL routines tailored to BSR matrix operations, but this standard does not seem to support rectangular block matrices. Our current workaround is to wrap a tbb parallel loop and do matrix-vector and matrix-matrix products via calls to gemv/gemm across the whole matrix. This works fine, but its much slower than we would like. 

We have looked into doing all those small matVec and matMat ops with a batched routine, but this ends up requiring allocation of a large buffer, which is a serious hit to performance.

Anybody have thoughts on a smart way to work around these constraints? We would love to see performance closer to the MKL bsr routines, but any headway we can make would be great. 

Thanks for any help in advance!

Li__Mingzhi
Beginner
1,865 Views

In Sparse Symmetric Linear Systems to use pardiso's parameter iparm(31)and perm

Dear all

I'm testing a example about Sparse Symmetric Linear Systems.

There is a example (Fortran)  provided to solve symmetric linear systems with PARDISO. To solve the systems of equations Ax = b.

If i want to achieve partial solution ,How to use the Pardiso's parameter Iparm(31) and perm(i) to achieve the target.

The attachment is my FORTRAN code.

Could you tell how to achiece it.

Thanks

Mingzhi

Attachment

Gennady_F_Intel
Moderator
1,865 Views

you may take a look at the pardiso_sym_reduced_solve_f.f example( mklroot\examples\solverf )

Kirill_V_Intel
Employee
1,865 Views

Hello Mingzhi,

1) (minor) First, looking at your code I see
iparm(7) = 16 ! default logical fortran unit number for output
doesn't agree with Intel MKL documentation (iparm[7] is the output iparm parameter which can give the number of iterative refinement steps performed). Hence, the question is whether you're actually intend to use Intel MKL PARDISO or some other solver with a similar interface?

 2) Second, you also have
iparm(8) = 9 ! numbers of iterative refinement steps
but the partial solve by its definition does not support iterative refinement. So, I believe due to this setting PARDISO actually performed a full solve or maybe smth incorrect.
Could you please switch this iparm off (set iparm(8)=1) and check if the results are what you expect? 

Hope this helps!

Best,
Kirill
 

 

 

 

shaji__athul
Beginner
1,863 Views

Hello,

I have installed Intel MKL 2020 on my office desktop. The C++ program solves the problem Ax=b using LAPACKE_dgesv function with multi-threading enabled. This program is written for learning purposes alone. I am using Ubuntu 18.04 for my work. The Intel MKL is installed in /opt/intel. The program is generating errors, if possible, please help me with this. I have included the following in .bashrc

export MKL_LIB_DIR=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/
export MKL_INCLUDE_DIR=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl/include/
export LD_LIBRARY_PATH=$MKL_LIB_DIR:$LD_LIBRARY_PATH

Contents of the Makefile

CPPFLAGS = -g -O3 -Wextra -Wall -std=c++17 -m64 -DMKL_ILP64
INCLUDES = -I$(MKL_INCLUDE_DIR)
LDFLAGS =  -Wl,--start-group -L$(MKL_LIB_DIR)/libmkl_intel_ilp64.a\
-L$(MKL_LIB_DIR)/libmkl_intel_thread.a\
-L$(MKL_LIB_DIR)/libmkl_core.a -Wl,--end-group \
-lpthread -lm -ldl  #obtained using Intel Link line Advisor for MKL
OBJS = main.o
PROG = main_exe
CC = g++-9

$(PROG) : $(OBJS) 
	$(CC) $(LDFLAGS) $(INCLUDES) $(OBJS) -o $(PROG) 
main.o : main.cpp
	$(CC) $(CPPFLAGS) $(INCLUDES) -c main.cpp -o main.o

clean :
	rm -f $(OBJS) $(PROG)

 

The error message generated is shown below.

Error:  undefined reference to `LAPACKE_dgesv'

 

The C++ file is attached.

Looking forward to hearing from you.

 

Regards,

Athul Shaji

Gennady_F_Intel
Moderator
1,856 Views

iicc -std=c++11 -I/opt/intel/compilers_and_libraries_2019/linux/mkl/mkl/include -mkl main.cpp

./a.out
This program is written by Athul Shaji.
Random value on [0 2147483647]: 166847679
info2
0
0
1
 

Gennady_F_Intel
Moderator
1,856 Views

the same when using gcc:

gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
 

g++ -m64 -std=c++11  -I/opt/intel/compilers_and_libraries_2019/linux/mkl/mkl/include main.cpp -o 444.out \
-L/opt/intel/compilers_and_libraries_2019/linux/mkl -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core \
-liomp5 -lpthread -lm -ldl
./444.out
This program is written by Athul Shaji.
Random value on [0 2147483647]: 311670201
info2
0
0
1
 

Reply