Created
April 28, 2014 10:41
-
-
Save wence-/11368113 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pyop2/compilation.py b/pyop2/compilation.py | |
| index 0d27c23..92c90ba 100644 | |
| --- a/pyop2/compilation.py | |
| +++ b/pyop2/compilation.py | |
| @@ -85,6 +85,10 @@ class Compiler(object): | |
| # atomically (avoiding races). | |
| tmpname = os.path.join(cachedir, "%s.so.tmp" % basename) | |
| + if configuration['debug']: | |
| + basenames = MPI.comm.allgather(basename) | |
| + if not all(b == basename for b in basenames): | |
| + raise CompilationError('Hashes of generated code differ on different ranks') | |
| try: | |
| # Are we in the cache? | |
| return ctypes.CDLL(soname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment