Skip to content

Should the JIT compiler options be environment flags? #4236

Description

@schnellerhase

Currently DOLFINx's JIT options are managed through a hierarchy respecting list of .json configuration files, which take precedence based on their location (local over global). This comes with a few key characteristics

  • configuration is execution context based
  • overwriting default options hierarchically is supported
  • they are platform specific: an altered compiler/platform requires different options, but the program remains unchanged

This is exactly what environment variables provide.

At the same time the current approach comes with some limitations or non-consistent behaviour:

  • the cache file is respecting the environment variable XDG_CACHE_HOME, however is overwritten through the config.
  • Automated/CI/containerised setups require configuration through custom config files or programmatic injection in user code to provide platform specific compiler options.
  • Many of the third party dependencies are fully env var configurable - most notably PETSc.

Therefore the suggestion or question: Should the JIT compiler options be environment flags?

This would simplify the present code around options management, provide configurability through the standard interface (both environmental, without I/o, and programmatically!), which simplifies interaction with other software packages, and enable platform specific execution.

The same question might be raised for form compiler options in a second instance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions