Passing swig/toolchain version hash to jit

Issue #305 resolved
Martin Sandve Alnæs created an issue

Dolfin should gather the version(s) of swig, c++ compiler, and eventual other relevant information on process 0 on startup, hash it, and pass the toolchain_hash integer to all processes. This will give us toolchain version information without all processes accessing the file system. Of course this assumes that all processes have the same environment...

Then the toolchain_hash should be included in module_name in compile_extension_module, and passed to ffc jit to be included in the ffc.JitObject module hash. This will make sure that instant modules are rebuilt when the toolchain is updated or a different software environment is temporarily selected on a computer.

Comments (8)

  1. Martin Sandve Alnæs reporter

    Don't think so. Only dolfin and python version is included here in compile_extension_module:

            module_signature = hashlib.sha1((repr(code) +
                                       dolfin.__version__ +
                                       str(_interface_version) +
                                       sys.version +
                                       additional_declarations +
                                       str(additional_system_headers) +
                                       repr(canonicalize_metadata(instant_kwargs))
                                       ).encode("utf-8")
                                    ).hexdigest()
    
  2. Log in to comment