I've also found that %reload screws up anything that plays with the MRO
(way python stores class inheritance information in new-style classes),
so it wouldn't surprise me if pickling after a reload is touchy. Since
I use mixins for a lot of my stuff, %reload screws everything up and
I've given up on it.
One place to look -- are new or old-style classes -- does
sai_classes.Phi inherit "object"? If not, it probably should.
Just a few things to look at, sorry I can't be more help. I can say
that pickling is much trickier than python makes it sound. I ended up
giving up on pickling in favor of having an "initialize" that can be
called anytime, and a "reinitialize" which initializes and then loads
all necessary data from disk for my checkpointing.
Ethan
--
-------------------------------------------
Ethan Coon
DOE CSGF - Graduate Student
Dept. Applied Physics & Applied Mathematics
Columbia University
212-854-0415
http://www.ldeo.columbia.edu/~ecoon/
-------------------------------------------