Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Inverse of very small matrix

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

warpino

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-24-2015
03:46 AM

44 Views

Inverse of very small matrix

Dear all,

I have a piece of code in Fortran90 in which I have to solve both a non-linear (for which I have to invert the Jacobian matrix) and a linear system of equations. When I say very small I mean *n* unknowns for both operations, with *n<=4*. Unfortunately, *n* is not known *a priori*. What do you think is the fastest option? I thought of writing explicit formulas for cases with *n=1,2* and using other methods for *n=3,4* (e.g. some functions of the Intel MKL libraries), for the sake of performance. Is this sensible or should I write explicit formulas for the inverse matrix also for *n=3,4*?

The code is going to be called very many times in a Finite Element Method analysis, for this reason I was looking for the fastest solution. I was also looking for a comparison chart of MKL matrix inversion routines for very small matrices versus explicit methods.

Regards,

N

Link Copied

3 Replies

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-24-2015
04:05 AM

44 Views

dear N.

We know about such problem, but currently we don't provide optimization for such tiny cases and may be would worth for you to try implement the direct methods to make the inversion.

--Gennady

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-24-2015
07:03 AM

44 Views

If you only need to solve simultaneous equations, you do not need to compute the inverse. It is more efficient to do an LU, LL^{T} or LDU decomposition and then solve. In your case, it may even be the case that you only need to do the decomposition once and can subsequently use the factors repeatedly to obtain solutions.

If you have, or can obtain and install, the Intel IPP library, there is a section called "Small Matrices and Realistic Rendering" that you can look up and see if there are routines there that suit your needs. This part of the IPP is "deprecated", but since you have an older version of MKL that may not be an obstacle.

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-24-2015
08:49 AM

44 Views

the original code was written on Fortran 90 but IPP supports only C API.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.