[Yt-dev] yt: moving pickled things

Matthew Turk matthewturk at gmail.com
Wed Mar 11 13:53:23 PDT 2009


My guess: You are missing the CurrentTimeIdentifier parameter, because
you are using an older branch of enzo.  This changes the hash.  You
will have to either copy with -p to preserve modification times or
manually change the hashes in the parameter_files.csv, which is not
terribly difficult to do -- just parse them and update the hashes and
rewrite out.  You can do this with the csv module; follow the example
in ParameterFileStorage.py.

-Matt

On Wed, Mar 11, 2009 at 1:49 PM, david collins <antpuncher at gmail.com> wrote:
> Hi, All--
>
> I have the same datasets on two different machines (kraken xt4 and
> xt5).  I made a bunch of cores with Britton's clump tool on the xt5,
> then saved them to disk with Pickle.  Since the xt5 is off today, I
> moved them to the xt4.  The path to the actual data is the same, but
> they're physically on different disks.
>
> When I go to unpickle my data, I get the following message (at
> bottom).  So it looks like it's not getting the right hash from the
> xt4 dataset, or rather the hash doesn't agree with the one I got from
> the xt5.  Is there a way to either flash a hash in a pickle file with
> a different one, or some other work around?
>
> Thanks,
> d.
>
> <err>
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/nics/b/home/collins/yt/uber.py", line 459, in read_clumps
>    this_clump=fPickle.load(filename)
>  File "/nics/b/home/collins/yt/fPickle.py", line 9, in load
>    output = cPickle.load(file,*args,**kwargs)
>  File "/nics/b/home/collins/local/lib/python2.6/site-packages/yt-1.5dev.dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",
> line 2198, in _reconstruct_object
>    pf = pfs.get_pf_hash(pfid)
>  File "/nics/b/home/collins/local/lib/python2.6/site-packages/yt-1.5dev.dev-py2.6-linux-x86_64.egg/yt/fido/ParameterFileStorage.py",
> line 90, in get_pf_hash
>    return self._convert_pf(self._records[hash])
> KeyError: (('58fd050c15f7ba65e6ba81d27fef4297',), <function
> _reconstruct_object at 0x2b7c6e314b90>,
> ('58fd050c15f7ba65e6ba81d27fef4297', 'region', array([ 0.5,  0.5,
> 0.5]), array([ 0.,  0.,  0.]), array([ 1.,  1.,  1.]), {'center':
> array([ 0.5,  0.5,  0.5]), 'bulk_velocity': array([ 0.,  0.,  0.])}))
> </err>
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list