[ET Trac] [Einstein Toolkit] #1050: [PATCH]CarpetIOHDF5: make WriteLargeAttribute write a string, not an array of ints

Einstein Toolkit trac-noreply at einsteintoolkit.org
Fri Aug 24 14:14:41 CDT 2012


#1050: [PATCH]CarpetIOHDF5: make WriteLargeAttribute write a string, not an array
of ints
--------------------------------+-------------------------------------------
  Reporter:  anton@…            |       Owner:  eschnett
      Type:  defect             |      Status:  new     
  Priority:  minor              |   Milestone:          
 Component:  Carpet             |     Version:          
Resolution:                     |    Keywords:          
--------------------------------+-------------------------------------------

Comment (by anton@…):

 Replying to [comment:2 eschnett]:
 > Carpet currently writes an array of characters (not an array of
 integers), thus the difference between this and a string is small.
 >

 Right. To clarify, I'm using this in my python script for processing the
 data, since it seemed the most "proper" way to get grid attributes. Or is
 it a better idea to use something else?

 Of course I could do ''.join(map(chr, *)) on it, but writing it properly
 in the first place seems cleaner.

 > The patch does not close the new datatype, leading to a memory leak.
 >
 > The readers of these attributes, used mostly during recovery, also need
 to be updated to read strings and not expect arrays of characters.

 Sorry about this, I'm not very familiar with the code yet. Should be fixed
 in the new patch.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1050#comment:4>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list