[MOAB-dev] NAME_TAG_SIZE value?
Tim Tautges
tautges at mcs.anl.gov
Tue Sep 28 08:50:06 CDT 2010
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.
- tim
> - jason
>
>
>
>> - tim
>>
>> On 09/27/2010 03:41 PM, Rajeev Jain wrote:
>>> Why is the NAME_TAG_SIZE variable in MBTagConventions.hpp is set to 32?
>>> This caused mbsize to fail in Tqdcfr::parse_acis_attribs when I was
>>> reading a .cub file. It fails around memcpy step in Tqdcfr:2264. On
>>> increasing NAME_TAG_SIZE to 64 the mbsize/mbconvert works.
>>>
>>> The .cub file is at /homes/jain/MeshKit-acis/rgg/Justin/fc33.cub. I need
>>> to make this work, so that mbsize/mbconvert doesn't seg-fault with this
>>> .cub file.
>>> Rajeev
>>>
>>>
>>
>
>
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone: (608) 263-8485 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the moab-dev
mailing list