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 Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- How to choose tolerance parameters in lamch?

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

Vishnu

Novice

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

02-25-2020
11:52 PM

118 Views

The documentation for LAMCH has many options, with short descriptions:

https://software.intel.com/en-us/mkl-developer-reference-c-lamch

But what exactly does each of them do, and how do I decide which one I want?

Do I use *eps*, *sfmin*, or *prec*?

I tested them for my machine, and the values are:

*eps* = 1.11022e-16

*sfmin* = 2.22507e-308

` prec `= 2.22045e-16

Link Copied

Accepted Solutions

mecej4

Black Belt

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

02-26-2020
01:44 AM

118 Views

You have to assess what tolerance to use (argument ABSTOL to ?syevr) based on your intended use for the eigenvalues that you obtain from the routine. If you specify too high a value, the eigenvalues will be low in accuracy. If you specify too low a value (or zero), the Lapack routine may take longer, or fail, to deliver the demanded accuracy.

If you are unable to assess your accuracy needs, and you will only calculate a handful of eigenvalues once, try with a low value of ABSTOL such as 1e-8. If you are going to calculate millions of eigenvalues, you will have to strike a compromise between speed and accuracy.

It is a mistake to think that ABSTOL can be chosen as equal to any of the values returned by ?lamch. Those values are characteristics of the computer/compiler/library being used. For example, Epsilon is the smallest absolute number for which 1 + Epsilon is different from 1. What you need, instead, is a reasonable value for the accuracy of the result of a much more complex numerical procedure -- not a mere addition.

5 Replies

mecej4

Black Belt

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

02-26-2020
12:27 AM

118 Views

Vishnu

Novice

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

02-26-2020
12:59 AM

118 Views

*prec*'.

mecej4

Black Belt

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

02-26-2020
01:44 AM

119 Views

You have to assess what tolerance to use (argument ABSTOL to ?syevr) based on your intended use for the eigenvalues that you obtain from the routine. If you specify too high a value, the eigenvalues will be low in accuracy. If you specify too low a value (or zero), the Lapack routine may take longer, or fail, to deliver the demanded accuracy.

If you are unable to assess your accuracy needs, and you will only calculate a handful of eigenvalues once, try with a low value of ABSTOL such as 1e-8. If you are going to calculate millions of eigenvalues, you will have to strike a compromise between speed and accuracy.

It is a mistake to think that ABSTOL can be chosen as equal to any of the values returned by ?lamch. Those values are characteristics of the computer/compiler/library being used. For example, Epsilon is the smallest absolute number for which 1 + Epsilon is different from 1. What you need, instead, is a reasonable value for the accuracy of the result of a much more complex numerical procedure -- not a mere addition.

Vishnu

Novice

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

02-26-2020
04:28 AM

118 Views

According to the documentation of syevr, the tolerance does not determine the accuracy/precision of the eigenvalue, but that of how orthogonal eigenvectors are to each other.

https://software.intel.com/en-us/mkl-developer-reference-c-syevr

But yeah, I get your point. I should decide based on how precise I want my data to be, based on what use I'm going to make of it after.

mecej4

Black Belt

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

02-26-2020
05:43 AM

118 Views

venugopal, vishnu wrote:According to the documentation of syevr, the tolerance does not determine the accuracy/precision of the eigenvalue, but that of how orthogonal eigenvectors are to each other.

I had only looked at the documentation for SYEVR at Netlib: http://www.netlib.org/lapack/explore-html/d2/d8a/group__double_s_yeigen_gaeed8a131adf56eaa2a9e5b1e0cce5718.html .

As you have pointed out, the description of ABSTOL in the MKL documentation says something different than the Netlib version. We need clarification from the MKL team regarding this difference, since generally we may assume that the APIs for a Netlib Lapack routine and the corresponding Lapack routine in MKL are equivalent.

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