Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

VML accuracy environment variable

nsmeds
Novice
390 Views

Would it be a stupid idea to have an environment variable  MKL_VML_MODE that - if set - would call vmlSetMode()  ?

MKL_VML_MODE - Comma separated strings of parameters as defined in mkl_vml_defines.h. The corresponding values as defined in mkl_vml_defines.h are or-ed together and used as a parameter to vmlSetMode(). It is the user's responsibility to state a set of names that are not mutually excluding. (E.g. MKL_VML_MODE=VML_FLOAT_CONSISTENT,VML_DOUBLE_CONSISTENT  is incorrect since these two values are not allowed to be set simultaneously). Any word in the list not recognized by the VML library will result in a warning message being printed and the word ignored for the resulting value sent to vmlSetMode().

And, yes I could write it myself, but maybe it could be useful to others too?

/Nils

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
390 Views

Nils,

Thanks for the suggestion. we think it is not too bad idea to add such environment variables for VML. We may be added support of this feature into one of the future updates/version. 

regards, Gennady

0 Kudos
Gennady_F_Intel
Moderator
390 Views

Nils, please take the latest version of MKL 11.2.1 and check how this mode works. See more details into User's Guide.

0 Kudos
nsmeds
Novice
390 Views

Hi Gannady,

I tried it and it works (from Fortran). Although not mentioned in the documentation the VML_FLOAT_CONSISTENT/VML_DOUBLE_CONSISTENT values are also covered it seems. 

I noticed that VML_FTZDAZ_{ON,OFF} is not supported this way. Is this intentional? And is it because of the same reason that there is no Fortran interface for this mode?  ... And what is the reason this is not the case?  Or is it so that the mode in which the main program is executed (compiled with -ftz or not) is carried through to MKL so I can control it that way in Fortran?

/Nils

0 Kudos
Reply