#1743: Reduce number of output files per directory -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: review Priority: unset | Milestone: Component: Other | Version: development version Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by rhaas):
I have two suggestions: * instead of snprintf, strcat, strcpy and Util_snprintf it would be easier to use Util_asprintf which allocates memory for the target string internally * to allow thorns to compile with both old and new IOUtils version, if we want to keep the extra nioprocs argument, we should follow other place in IOUtils #define a constant IOUTIL_FILENAME_HAS_NIOPROCS such that user code can test for the new API * do we actually need the extra argument? The function already takes a cGH and IOUtil's GH extension contains an nioprocs field already. I am also not sure about how file_nioprocs is handled. If it is the same as the GH extensions nioprocs then the assert() in line 288 is incorrect since it assumes that the first niprocs processes do IO, which is incorrect, see the logic in IOUtils SetupGH for how the ioprocs are spread out. If file_niprocs is not the same as the GH extensions nioprocs then a different variable name may avoid confusion.
Is it known if this deals with the majority of the output files? There are also per-process files written by CarpetLib, Carpet (maybe?) and TimerReport.