Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dolfin version to JIT hash #102

Merged
merged 1 commit into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/dolfin/jit/jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def compile_class(cpp_data):
if hasattr(v, '_cpp_object') and isinstance(v._cpp_object, cpp.function.GenericFunction):
property_str += '*'

hash_str = str(statements) + str(property_str)
hash_str = str(statements) + str(property_str) + cpp.__version__
module_hash = hashlib.md5(hash_str.encode('utf-8')).hexdigest()
module_name = "dolfin_" + name + "_" + module_hash

Expand Down
5 changes: 3 additions & 2 deletions python/dolfin/jit/pybind11jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from dolfin.cpp.log import log, LogLevel
from . import get_pybind_include

import dolfin.cpp as cpp
from dolfin.jit.jit import dijitso_jit, dolfin_pc


Expand Down Expand Up @@ -66,7 +66,8 @@ def compile_cpp_code(cpp_code):

params['build']['cxxflags'] += tuple(dmacros)

module_hash = hashlib.md5(cpp_code.encode('utf-8')).hexdigest()
hash_str = cpp_code + cpp.__version__
module_hash = hashlib.md5(hash_str.encode('utf-8')).hexdigest()
module_name = "dolfin_cpp_module_" + module_hash

module, signature = dijitso_jit(cpp_code, module_name, params,
Expand Down