From 66dc9a5141554f8051d982d1118640bd255d2bde Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sun, 18 Dec 2016 23:28:06 -0600 Subject: [PATCH] Improve pickleability: Avoid interning instruction ids that are None, which causes a TypeError (closes #14). --- loopy/kernel/instruction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loopy/kernel/instruction.py b/loopy/kernel/instruction.py index 1e5c36fcf..90be2f409 100644 --- a/loopy/kernel/instruction.py +++ b/loopy/kernel/instruction.py @@ -440,7 +440,8 @@ class InstructionBase(ImmutableRecord): from loopy.tools import intern_frozenset_of_ids - self.id = intern(self.id) + if self.id is not None: + self.id = intern(self.id) self.depends_on = intern_frozenset_of_ids(self.depends_on) self.groups = intern_frozenset_of_ids(self.groups) self.conflicts_with_groups = ( -- GitLab