[MOAB-dev] NAME_TAG_SIZE value?

Jason Kraftcheck kraftche at cae.wisc.edu
Tue Sep 28 11:02:47 CDT 2010


On 09/28/2010 08:50 AM, Tim Tautges wrote:
>
>
> On 09/27/2010 04:20 PM, Jason Kraftcheck wrote:
>> On 09/27/2010 04:09 PM, Tim Tautges wrote:
>>> Ok, go ahead and set it to 64. But, also run the code through valgrind
>>> to make sure it isn't something else, it can be dangerous doing string
>>> reads/writes (buffer overflows, etc.).
>>>
>>
>> This may have some unpleasant side effects. If the tag is created by a
>> file
>> read, then you'll have a situation where the constant is 64 but the
>> actual
>> tag size is 32. If the tag is created by MOAB first, then attempts to
>> read
>> files also containing the tag will fail because of the size mismatch.
>>
>
> The preferred approach is for any reader needing to create a tag with
> name NAME using the size defined in MBTagConventions.h. I wonder if we
> should just bite the bullet and check the reserved tag list to make sure
> the right parameters are being used for those, and fail if not.
>

Both the VTK reader and the .h5m one will create the tag with whatever 
size it was saved with.  Adding such a special case for the .h5m reader 
will not be trivial because it will not be able to pass in an array of 
tag values (without doubling the array size and inserting padding.)

- jason


More information about the moab-dev mailing list