checkMesh consistently fails with IOerrors when using -writeSets stl option
I am running checkMesh in v1712 (mesh generated in same version). When using the option "-writeSets stl", I consistently get an IOstream error. checkMesh works fine with every other combination. This happens on dozens of cases; none successfully execute.
Attached is a test case, simply run run_snappy.sh to generate the failure.
I can also submit this case with the run_snappy.sh already executed, the file is 104MB.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Admin changed the description
changed the description
By Robert on 2018-03-08T12:31:02 (imported from GitLab project)
- Mark OLESEN assigned to @mark
assigned to @mark
- Maintainer
Definitely something wrong.
- Mark OLESEN closed via commit 36615732984f7d25aaeab2bce36685a9fe375c18
closed via commit 36615732984f7d25aaeab2bce36685a9fe375c18
- Author Maintainer
Hi Mark,
I think I have found a potential source of the problem: createPatch. If I don't run createPatch, then checkMesh works. So something is generated during createPatch that checkMesh is not happy with.
As a side note, why is the issue now closed?
By Robert on 2018-03-14T08:35:46 (imported from GitLab project)
Edited by Admin - Maintainer
Actually I was doing my testing without createPatch and could also provoke the problem. It worked fine with
stlb
(BINARY),vtk
,obj
etc. It not only aborted withstl
(ASCII), but also produced enormously large files that had loads of non-ASCII content. This made me trace back to where the stl files where being generated (in this case specifically src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C and Line 218 was where I located a problem. Eg, doing a print of the zones after that line also created real issues.I believe that that was indeed the cause of the issue. If it works when you leave away createPatch it is probably purely coincidental.
Re issue closing: this is an automatism as part of the commit message containing fixes/closes. I'll reopen it again now, but ask that you also check if your problem persists after commit 36615732984f is included.
Edited by Mark OLESEN - Mark OLESEN reopened
reopened
- Author Maintainer
Hi Mark,
Thanks for the explanation! I've recompiled the fix locally on my workstation, and run checkMesh -writeSets stl on a production case, but get the same error. The mesh was however generated a week ago without this fix.
Does the mesh need to be generated with the fix in order for checkMesh to work? If so, I will remesh the case with the fix and report back.
By Robert on 2018-03-14T10:25:18 (imported from GitLab project)
- Maintainer
This change should work even with the older mesh, maybe checkMesh needs to be relinked?
To partially localize the problem further, could you see if you get the same error when writing other formats such as 'stlb', 'vtk' etc.
- Author Maintainer
Everything works fine using stlb and vtk. Only stl has the issue.
I ran "wmakeLnIncludeAll" from the installation directory, but the behavior with -writeSets stl is the same. I've attached the log of the recompilation & wmakeLnIncludeAll run.build_ac3d.log
By Robert on 2018-03-14T12:56:04 (imported from GitLab project)
- Maintainer
Is the output file (stl) reasonably readable (it is supposed to be ascii), or does it appear to have loads of binary rubbish like I'd seen before?
Edited by Mark OLESEN - Author Maintainer
It's got loads of binary noise. The exact case I'm testing this on is 104MB, if you'd like me to upload it I can.
By Robert on 2018-03-14T14:20:20 (imported from GitLab project)
- Maintainer
No please don't if it has binary noise, this is an indication that some loop is out of control. Could you add in an old school print just after Line 218 in src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C so we can see what it is actually seeing. Eg,
const surfZoneList zones = ( surf.surfZones().empty() ? surfaceFormatsCore::oneZone(faceLst) : surf.surfZones() ); const bool useFaceMap = (surf.useFaceMap() && zones.size() > 1); Info<< "have " << zones << " surf-zones, using facemap << useFaceMap << endl;
In my previous case this was producing rubbish (when I have UList& instead).
- Author Maintainer
Somehow the changes to src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C weren't updated, I found that out by inserting your print line only to have compilation fail.
Having manually saves STLsurfaceFormat.C and recompiled, I can confirm on multiple test cases that the fix is working here. Thank you!
By Robert on 2018-03-14T15:28:24 (imported from GitLab project)
- Maintainer
Good to hear a) that your system is working, b) that I can stop looking for other things ;)
Cheers, /mark
- Mark OLESEN closed
closed
- Mark OLESEN mentioned in commit 36615732984f7d25aaeab2bce36685a9fe375c18
mentioned in commit 36615732984f7d25aaeab2bce36685a9fe375c18
- Mark OLESEN mentioned in commit ec169b1e
mentioned in commit ec169b1e