Feature request for minimal file output mode

Issue #120 new
Michael Hardman created an issue

Could I request, or suggest the option of running gs2 in a mode where the output is limited to be only the screen output, the .out.nc, .out and .nc restart files? Currently every gs2 simulation produces about 10 small text files. This is not an issue for small numbers of simulations, but when one is running gs2 industrially for a large parameter scan then the number of files the gs2 produces can be prohibitive on operating systems that have a file number limit.

I can provide more details on which files I would like to be suppressed if that is not transparent from my description here.

Comments (3)

  1. Joseph Parker

    Thanks Michael! Yes, I think that should be possible. I guess a lot of what you want suppressed could be turned off manually using the input file already, but it’s handy to have a single override.

    I’ll look into this - for definiteness, could you list the files that you’d like suppressed?

  2. Michael Hardman reporter

    Hi Joseph, that's good news. The context of this problem is the linear scan that I made with GS2 for my cross-scale work. In that case, the following unnecessary files were output

    .optim

    .fort.25

    .fort.11

    .g

    .gridgen.200

    .error

    .out

    .fftw_wisdom

    You might consider that the .out and .error files should not be suppressed, but in this case I had switched off the diagnostic printing to the .out file, and had directed my analysis instead to data in the .out.nc. Perhaps a separate flag should be set for those output files as opposed to the rest, which I believe are only debug output. As Peter Hill can attest, I was regularly generating tens of thousands of files, and if that could be reduced to instead only thousands then we would be in a much better situation.

    A final note here is that I will probably have to implement your fix separately into my branch, as it is not yet merged with trunk. I am sure this will possible by looking at your commit. If it comes to it, I can supply you with a standard input file for my branch so you can see what files it produces (if this is different to trunk).

  3. David Dickinson

    These files are distributed across quite a few different modules so I think it may not be a pretty solution to get them to all turn off automatically. Out of the listed files I think only fftw_wisdom and possibly out have flags which allow them to be disabled currently. I think the fort and g files come from geometry and I think gridgen.200 comes from gridgen. I don’t really know why the optim file is ever created but I think this is probably from some unfinished feature that could perhaps be removed. I suspect there are likely several more files that can be produced for different paths through the code.

    A simple practical solution to use in the interim may be to provide some sort of “cleanup” script which users can call after their run to just delete a defined set of files (something like cleanup_gs2_run runname.in which then just does something like RUNNAME=$(echo ${1} | sed ‘s/.in\b//g’) ; rm -v ${RUNNAME}.{optim,fort.25,fort.11,g,gridgen.200,out,fftw_wisdom} , although I’m sure there’s a better way to do this). This could then be put in the submission script after the mpirun statement to automatically cleanup after the simulation finishes.

  4. Log in to comment