<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "></div><div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Well, for the purposes of converting a big mesh file from one format to the other, I was using a NAME_TAG_SIZE larger than 32.</div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; ">At one point I had to change this (locally) size to a size much larger than 64. </div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><font class="Apple-style-span"
face="arial, helvetica, sans-serif" size="4"><span class="Apple-style-span" style="font-size: 10pt;">I think, I should handle this change locally and revert the change below, to keep things </span></font></span><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px;">in-order</span></font></span><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="4"><span class="Apple-style-span" style="font-size: 10pt;">.</span></font></span></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "><meta http-equiv="content-type" content="text/html;
charset=utf-8">--- MOAB/trunk/src/MBTagConventions.hpp 2010-09-27 21:12:38 UTC (rev 4169)<br>+++ MOAB/trunk/src/MBTagConventions.hpp 2010-09-27 21:17:16 UTC (rev 4170)<br>@@ -100,6 +100,6 @@<br> * storing or searching for a value must be padded with '\0' chars.<br> */<br>#define NAME_TAG_NAME "NAME"<br>-#define NAME_TAG_SIZE 32<br>+#define NAME_TAG_SIZE 64</div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="4"><span class="Apple-style-span" style="font-size: 10pt;"> </span></font></div><font style="font-family: arial, helvetica, sans-serif; color: black; font-size: 10pt; " size="2">Rajeev</font><br><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: black; "><br><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><font size="2"
face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Steve Jackson <sjackson@cae.wisc.edu><br><b><span style="font-weight: bold;">To:</span></b> Jason Kraftcheck <kraftche@cae.wisc.edu><br><b><span style="font-weight: bold;">Cc:</span></b> moab-dev@mcs.anl.gov<br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, November 11, 2010 15:21:43<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [MOAB-dev] NAME_TAG_SIZE value?<br></font><br><br>On Sep 27, 2010, at 16:23 , Jason Kraftcheck wrote:<br><br>> On 09/27/2010 04:20 PM, Jason Kraftcheck wrote:<br>>> On 09/27/2010 04:09 PM, Tim Tautges wrote:<br>>>> Ok, go ahead and set it to 64. But, also run the code through valgrind<br>>>> to make sure it isn't something else, it can be dangerous doing string<br>>>> reads/writes (buffer overflows, etc.).<br>>>> <br>>> <br>>> This may have
some unpleasant side effects. If the tag is created by a file<br>>> read, then you'll have a situation where the constant is 64 but the actual<br>>> tag size is 32. If the tag is created by MOAB first, then attempts to read<br>>> files also containing the tag will fail because of the size mismatch.<br>>> <br>> <br>> Some solutions:<br>> 1) Make sure that MOAB always creates the tag and add special cases to<br>> all readers to gracefully handle increasing tag size for that tag.<br>> 2) Also change the tag name so that it is a new tag with the new size.<br>> (This is least likely to break applications using the tag values.)<br>> 3) Fix the cub file reader such that it truncates names that are too<br>> long. (This should be done anyway, even if it isn't an acceptable<br>> solution to this problem.)<br><br>Sorry to
resurrect an old issue, but I just discovered it's causing problems for DagMC users. Because of the change to NAME_TAG_SIZE, DagMC cannot load an h5m file created before r4170. <br><br>I'm wondering what my options are to fix this.<br><br>* DagMC.cpp explicitly creates the name tag (using NAME_TAG_SIZE) before loading a file. This leads ReadHDF5 to fail, because it determines that the tag data in an old file has a different size than the name tag that was created by DagMC. Per Jason's solution #1, should DagMC not be creating this tag explicitly?<br><br>* Or do we just need to regenerate all our h5m files? (This would be less painful if mbconvert-ing an old h5m to a new h5m fixed the problem, but that doesn't seem to be the case.)<br><br>* Is there some other way to get around this issue?<br>~S</div></div><div style="position: fixed; color: black; font-family: arial, helvetica, sans-serif; font-size: 10pt; "></div>
</div><br></body></html>