Managing simulation output files

Click For Summary

Discussion Overview

The discussion revolves around managing output files generated from discrete element method (DEM) simulations. Participants explore various organizational strategies and tools for keeping track of input and output files associated with multiple simulation runs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests renaming input and output files to have similar names for easier tracking.
  • Another proposes creating a separate directory for each simulation run to keep all related files together, which could simplify organization.
  • A participant mentions modifying software to generate README files in each directory summarizing input parameters for better reference.
  • There is a suggestion to consider using modern file formats like HDF5 for better data structuring and to include all parameters and comments in a single file.
  • One participant shares their positive experience with HDF5, noting its advantages over traditional text files.
  • Another participant expresses intent to stick with the directory-tree structure for now but is open to exploring HDF5 in the future.

Areas of Agreement / Disagreement

Participants generally agree on the utility of organizing files into directories, but there are differing opinions on the necessity and implementation of renaming files or using specific file formats like HDF5.

Contextual Notes

Some suggestions depend on familiarity with scripting or programming, and the discussion does not resolve which method is superior for file management.

Who May Find This Useful

Researchers and practitioners involved in simulation work, particularly those using DEM or similar computational methods, may find these organizational strategies beneficial.

Avarus
Messages
11
Reaction score
0
Hey all,

This may be a bit of a stupid question, but I'll ask it anyway... For the past weeks I've been running some DEM (discrete element method) simulations, and each simulations produces a couple output files and has different input variables/commands stored in a separate file. Already I start to lose track of which simulation produced which results with which input script, and I still have 4 more years to go!

Is there some kind of 'book keeping' program out there for managing the files involved in a simulation? Or do you have a method of organisation that works well for you? Please teach me, oh masters...

Thanks and regards,

Martijn
 
Technology news on Phys.org
I would arrange for the input and output files to have similar names, e.g. may07input.dat, may07output1.dat, may07output2.dat.

You could accomplish this by renaming the files by hand after each run.

Or you could write a script in Perl or Python or some Unix/Linux shell or whatever other scripting language you know, to run the software and rename the files automatically.

Or if you have access to the source code and know the language it's written in (e.g. you wrote the software yourself), you can have the software generate appropriate output file names based on the input file name.
 
I think the best way is to create a directory for each run, then have all of the input and output files go in the same directory. That way if you lose track, you can go look at the input script which produced the output in the directory. It helps to give each directory a descriptive name as well, as jtbell suggested. When faced with this, I also modified the software to generate a README file in each directory with a (computer generated) summary of the input parameters. That way, after you have generated hundreds or thousands of directories and are looking for a particular one or a particular combination, you can write a script to search through them and find the one you want.
 
I should have thought of the separate-directories trick myself. :thumbs:

Then you don't have to rename files or write a script or mess around with source code.
 
If you have written the code yourself I would suggest changing the output data format.
It might also be worth investigating some more modern file formats for saving data; e.g HDF5
These allow you to structure your data in a much better way, and you can also save all parameters, comments etc in the same file.

I've been using HDF5 on an off for a few years now for my experimental data, and it is MUCH better than just saving text files (ti was orignally developed to handle data generated by supercomputers).

There are many other formats that do the same, but HDF5 is nice because it is free and supported by many software packages (e.g. Matlab and Octave) and you can get free libraries for a many languages (C, Java, Perl, Python etc) that you can use in your own code.
 
  • Like
Likes   Reactions: 1 person
Thanks for the suggestions! For now I'll stick to the directory-tree structure, but in the future I might consider HDF5 data structure. I've actually used that format before, so perhaps I can build a properly structured database in that way...

By the way if anyone else has any more suggestions, please do post them here, I'll keep an eye on this thread...
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 7 ·
Replies
7
Views
43K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K