wmkdep runs out of open file descriptors
wmkdep.l runs out of open file descriptors, especially when using the -q option on wmake.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Activity
- Mattijs Janssens mentioned in commit b7f3ca53
mentioned in commit b7f3ca53
- Author Maintainer
I've added some error message. An alternative would be to wait for file descriptors to become available (only possible if running multi-threaded)
- Mattijs Janssens added discussion enhancement labels
added discussion enhancement labels
- Maintainer
Might be able to explicitly close them in yywrap() ?
Edited by Mark OLESEN - Author Maintainer
Tried but that doesn't work - you cannot close a file that is on the stack of buffers . Now trying closing only if no buffer on stack:
/* No more buffers on the stack: * Return 1 to inform lex to finish now that all buffers have been read */ if (yyin) { fclose(yyin); yyin = NULL; }
- Author Maintainer
forget above - does not help either - still runs out of 1024 descriptors. I have to set it to 4096.
Edited by Mattijs Janssens Just a reminder that
wmkdepend
was an alternative that was still available until OpenFOAM 2.4.x: https://github.com/OpenFOAM/OpenFOAM-2.4.x/tree/master/wmake/src - at which point it was dropped, because it was based on an outdated code generator (I vaguely remember the name "Coco"-something) (I suspect that @mark was who contributed it several years ago, but I'm not certain of it).Nonetheless, that old alternative did not have this limitation with the description limits, because it would parse each file and keep a local array with the file list. We are still using it on our port for Windows, given that there is no other way for us to remove the maximum open file limit per process.
If by any chance anyone wants to try using something more modern, Kitware uses the Ninja-Build system on VTK and ParaView: https://ninja-build.org/ - I haven't checked if it would even help much here, but they use it in conjunction with CMake for managing the file dependencies, if I remember correctly.
- Mattijs Janssens assigned to @mark and unassigned @Mattijs
- Mark OLESEN mentioned in commit dda3397b
mentioned in commit dda3397b
- Mark OLESEN mentioned in merge request !198 (merged)
mentioned in merge request !198 (merged)
- Mark OLESEN mentioned in commit 9d0b0e0a
mentioned in commit 9d0b0e0a
- Maintainer
- Mark OLESEN closed
closed
- Mark OLESEN reopened
reopened
- Maintainer
Mattijs noticed some flakey parsing of comments - taking a look.
Edited by Mark OLESEN - Mark OLESEN mentioned in commit f3ab1a64
mentioned in commit f3ab1a64
- Mark OLESEN closed
closed