Houdini 19.0 Geometry

Speed vs. reproducibility in Math Kernel Library

Some nodes use a library that gives a speed boost for floating-point operations but can make the output vary between different computers. You can control how much the library tries to guarantee reproducible results.

On this page

Overview

Generating effects using floating-point math creates the challenge of being fast while producing exactly the same results across every run (reproducibility).

The main thing affecting reproducible results is the non-associativity of most floating point operations, however different runtimes, selectable optimized code paths, non-deterministic threading and parallelism, array alignment, and hardware floating-point control settings can all affect it.

Several nodes use Intel’s Math Kernel Library to speed up common floating-point operations using processor extensions such as SSE and AVX. On Intel and compatible processors, you can use the MKL_CBWR environment variable to control how the library balances speed and reproducible results.

For more information see Intel’s white paper on MKL and reproducibility (PDF).

Setting the MKL_CBWR environment variable

  • The possible values for the environment variable, from slowest/most compatible to fastest/least compatible, are COMPATIBLE, SSE2, SSE4_2, AVX, and AUTO.

  • Setting the variable to AUTO uses the best instructions available on the current computer.

  • For non-Intel x86 processors (Ryzen), you can only set the variable to AUTO or COMPATIBLE modes.

  • For Intel processors, you set the variable to choose a specific ISA extension level. This lets you set up a group of computers with different processors to use the same lowest common set of extensions, increasing reproducibility between those machines.

    See spcifying code branches in Intel’s library documentation.

  • You can increase reproducibility at the expense of speed by appending ,STRICT to the variable value. This switches some (but not all) library functions to implementations that are slower but more reproducible.

    See the reproducibility conditions in Intel’s library documentation.

See also

Geometry

Understanding

Modeling

Terrain

Fracturing

Next steps

Guru level