Developer Guide

Contents

Setting the Default Mode of Vector Math with an Environment Variable

Intel® Math Kernel Library (Intel® MKL)
enables overriding the default setting of the Vector Mathematics (VM) global mode using the
MKL_VML_MODE
environment variable.
Because the mode is set or can be changed in different ways, their precedence determines the actual mode used. The settings and function calls that set or change the VM mode are listed below, with the precedence growing from lowest to highest:
  1. The default setting
  2. The
    MKL_VML_MODE
    environment variable
  3. A call
    vmlSetMode
    function
  4. A call to any VM function other than a service function
For more details, see the Vector Mathematical Functions section in the
Intel® MKL
Developer Reference
and the description of the
vmlSetMode
function in particular.
To set the
MKL_VML_MODE
environment variable, use the following command
in your command shell
:
  • For the bash shell:
    export MKL_VML_MODE=
    <mode-string>
  • For a C shell (csh or tcsh):
    setenv MKL_VML_MODE
    <mode-string>
In
these
command
s
,
<mode-string>
controls error handling behavior and computation accuracy, consists of one or several comma-separated values of the
mode
parameter listed in the table below, and meets these requirements:
  • Not more than one accuracy control value is permitted
  • Any combination of error control values except
    VML_ERRMODE_DEFAULT
    is permitted
  • No denormalized numbers control values are permitted
Values of the
mode
Parameter
Value of
mode
Description
Accuracy Control
VML_HA
high accuracy versions of VM functions
VML_LA
low accuracy versions of VM functions
VML_EP
enhanced performance accuracy versions of VM functions
Denormalized Numbers Handling Control
VML_FTZDAZ_ON
Faster processing of denormalized inputs is enabled.
VML_FTZDAZ_OFF
Faster processing of denormalized inputs is disabled.
Error Mode Control
VML_ERRMODE_IGNORE
On computation error, VM Error status is updated, but otherwise no action is set. Cannot be combined with other
VML_ERRMODE
settings.
VML_ERRMODE_NOERR
On computation error, VM Error status is not updated and no action is set. Cannot be combined with other
VML_ERRMODE
settings.
VML_ERRMODE_STDERR
On error, the error text information is written to
stderr
.
VML_ERRMODE_EXCEPT
On error, an exception is raised.
VML_ERRMODE_CALLBACK
On error, an additional error handler function is called.
VML_ERRMODE_DEFAULT
On error, an exception is raised and an additional error handler function is called.
These
command
s
provide an example of valid settings for the
MKL_VML_MODE
environment variable
in your command shell
:
  • For the bash shell:
    export MKL_VML_MODE=VML_LA,VML_ERRMODE_ERRNO,VML_ERRMODE_STDERR
  • For a C shell (csh or tcsh):
    setenv MKL_VML_MODE VML_LA,VML_ERRMODE_ERRNO,VML_ERRMODE_STDERR
VM ignores the
MKL_VML_MODE
environment variable in the case of incorrect or misspelled settings of
mode
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804