Fix pickling with MPI full mode#1291
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1291 +/- ##
==========================================
+ Coverage 86.62% 86.64% +0.02%
==========================================
Files 182 182
Lines 26042 26106 +64
Branches 3587 3592 +5
==========================================
+ Hits 22559 22620 +61
- Misses 3058 3061 +3
Partials 425 425
Continue to review full report at Codecov.
|
tjb900
left a comment
There was a problem hiding this comment.
LGTM! Thanks for getting to it so quickly.
devito/mpi/routines.py
Outdated
| @@ -1058,6 +1058,7 @@ def __init__(self, name, key, arguments, owned): | |||
| name = "%s%d" % (name, key) | |||
There was a problem hiding this comment.
Actually... isn't this going to make it different when it's unpickled? Since the name property is no longer the name passed to init?
There was a problem hiding this comment.
oohhh right nice catch! I even wrote an MFE for MPIMsg but not for MPIRegion.
should be a trivial fix, will do on Monday
59d15d3 to
88128a8
Compare
|
@tjb900 should be fine now? |
|
jeez... this was a rabbit hole: sympy/sympy#4297 causing pickling to break with MPI_fullmode + OpenMP I just pushed a workaround |
| obj = Function.__new__(cls, name, *arguments) | ||
| obj._name = name | ||
| obj._arguments = arguments | ||
| return obj |
There was a problem hiding this comment.
That's...... :D But reading through the issue no really other way around it.
There was a problem hiding this comment.
yes I ditched 1 hour on this this morning than I gave up as it's just not worth it
tjb900
left a comment
There was a problem hiding this comment.
Wow, rabbit hole indeed! LGTM, thanks.
fixes #1286