Community
cancel
Showing results for 
Search instead for 
Did you mean: 
kim__seongik
Beginner
219 Views

Which subroutine can achieve the same result as matlab's mldivide?

Jump to solution

I know that DGETRF and DGETRI are for matrix inversion in large scale matrix.

However, it is not the same with Matlab's mldivide.

I want to know which subroutine can achieve the same result as matlab's mldivide.

Thanks for the help.

S. Kim

0 Kudos
1 Solution
mecej4
Black Belt
219 Views

Look up gesv for Fortran 95+, DGESV for Fortran 77.

There are other routines that are better for matrices with special properties (such as positive definite, tridiagonal, etc.).

View solution in original post

3 Replies
mecej4
Black Belt
220 Views

Look up gesv for Fortran 95+, DGESV for Fortran 77.

There are other routines that are better for matrices with special properties (such as positive definite, tridiagonal, etc.).

View solution in original post

Gennady_F_Intel
Moderator
219 Views

the similar is for C - https://software.intel.com/en-us/mkl-developer-reference-c-gesv#90C462DB-A8BF-48A1-AE76-5E49D4EA04AF

Kirill_V_Intel
Employee
219 Views

Hello,

You need to be more specific about what you want to do. Functionality mldivide in Matlab is a wrapper around a general operation which dispatches between different cases. You can get an idea about it at https://www.mathworks.com/help/matlab/ref/mldivide.html.

There is no one-call equivalent for ml divide in MKL.

Just for example:

For solving a linear system with a dense matrix, you can call LAPACK routines and then gesv mentioned in other answers is the closest guess.

For solving a linear system with a sparse matrix using a direct method, you can use PARDISO (see https://software.intel.com/en-us/mkl-developer-reference-fortran-intel-mkl-pardiso-parallel-direct-sparse-solver-interface) and Cluster Sparse Solver (for distributed systems) or Sparse QR, https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-qr.

So you need to figure out what exactly you want to do (what kind of system you have) and go from there.

Best,
Kirill

Reply