transonic.config

Configuration

Transonic is sensible to the environment variables:

  • TRANSONIC_DIR can be set to control where the cached files are saved.

  • TRANSONIC_COMPILE_AT_IMPORT can be set to enable a mode for which Transonic compiles at import time the Pythran file associated with the imported module. This behavior can also be triggered programmatically by using the function set_compile_at_import.

  • TRANSONIC_NO_REPLACE can be set to disable all code replacements. This is useful only when measuring code coverage.

  • FLUID_COMPILE_JIT can be set to false to disable the compilation of jited functions. This can be useful for unittests.

  • TRANSONIC_MPI_TIMEOUT sets the MPI timeout (default to 5 s).

By the way, for performance, it is important to configure Pythran with a file ~/.pythranrc:

For Linux, I use:

[pythran]
complex_hook = True

[compiler]
CXX=clang++-6.0
CC=clang-6.0
blas=openblas

User API

transonic.config.set_backend(backend: str)[source]

Set the “global variable” backend_default

Functions

set_backend(backend)

Set the "global variable" backend_default

strtobool(value)

Convert a string representation of truth to true (1) or false (0).