Skip to content

Dump Inspection & Export Tools

A few operators, each with a command-line wrapper script in scripts/tools, inspect or convert a .dump checkpoint file without writing an input deck by hand. CMake also installs launchers of the wrappers next to the exaDEM binary in the build directory.

Note

The export operators only write files from MPI rank 0: run them with a single rank (mpirun -n 1) for a complete export.

dump_inspector

Reads the header of a .dump file and prints its content (format version, number of particles, step, physical time, fields, domain). No particle data is read.

Parameter Description
filename .dump file to inspect
- dump_inspector:
   filename: CheckpointFiles/exadem_0000012345.dump
./scripts/tools/dump_inspector.sh CheckpointFiles/exadem_0000012345.dump   # from the source tree
./dump_inspector CheckpointFiles/exadem_0000012345.dump                    # from the build directory

dump_to_txt / ConvExaDEMToTxt

Exports a .dump file to plain-text column files: <pattern_name>_particles.txt (one row per particle, columns taken from the header of the dump), <pattern_name>_interactions.txt (one row per interaction, only if the dump has interactions) and <pattern_name>_summary.txt. Dumps with or without the cluster field (fragmentation) are detected automatically.

Parameter Description
filename .dump file to export
pattern_name prefix of the output files
- dump_to_txt:
   filename: exadem_0000012345.dump
   pattern_name: exadem_0000012345
./scripts/tools/ConvExaDEMToTxt CheckpointFiles/exadem_0000012345.dump my_export   # from the source tree
./ConvExaDEMToTxt CheckpointFiles/exadem_0000012345.dump my_export                 # from the build directory

dump_to_rockable / ConvExaDEMToRockable

Exports the particles of a .dump file to a Rockable .conf file.

Parameter Description
filename .dump file to convert
conf_filename output Rockable .conf file
shape_filename .shp file mapping each type index to its shape name (optional); copied next to conf_filename as shape.shp, and used to write one density <group> <value> line per group present. Without it, the name column is the numeric type index, no density line is written and no shape.shp is copied
dt time step written on the dt line (optional, default 0): it is not stored in a .dump

Note

Only particles are exported: interactions and drivers are not written (nDriven is always 0).

1
2
3
4
5
- dump_to_rockable:
   filename: ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump
   conf_filename: conf0.conf
   shape_filename: ExaDEMOutputDir/CheckpointFiles/RestartShapeFile.shp
   dt: 0.0001
1
2
3
./scripts/tools/ConvExaDEMToRockable ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump conf0.conf
./scripts/tools/ConvExaDEMToRockable ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump conf0.conf ExaDEMOutputDir/CheckpointFiles/RestartShapeFile.shp
./ConvExaDEMToRockable ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump conf0.conf   # from the build directory

--last picks the highest-iteration exadem_*.dump (and RestartShapeFile.shp, if present) under <input-dir>/CheckpointFiles/; <input-dir> defaults to ExaDEMOutputDir and is set with --input-dir=DIR; --dt=VALUE sets the time step:

./scripts/tools/ConvExaDEMToRockable --last conf0.conf
./scripts/tools/ConvExaDEMToRockable --last conf0.conf --input-dir=OtherOutputDir --dt=0.0001

dump_to_xyz / ConvExaDEMToXYZ

Exports the particles of a .dump file to an .xyz file: the number of particles, the upper corner of the domain, then one type x y z row per particle. The field set of the dump (interaction/fragmentation, with or without group) is detected from its header.

Parameter Description
filename .dump file to convert
xyz_filename output .xyz file
shape_filename .shp file mapping each type index to its shape name, used as type column (optional); without it (and without type_map), the numeric type index is used
type_map list of names indexed by type, e.g. [S1, S2, S3] (optional); takes priority over shape_filename
1
2
3
4
5
- dump_to_xyz:
   filename: ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump
   xyz_filename: out.xyz
   shape_filename: ExaDEMOutputDir/CheckpointFiles/RestartShapeFile.shp
   type_map: [S1, S2, S3]
1
2
3
./scripts/tools/ConvExaDEMToXYZ ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump out.xyz
./scripts/tools/ConvExaDEMToXYZ ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump out.xyz ExaDEMOutputDir/CheckpointFiles/RestartShapeFile.shp
./ConvExaDEMToXYZ ExaDEMOutputDir/CheckpointFiles/exadem_0000012345.dump out.xyz   # from the build directory

--last and --input-dir=DIR work as for ConvExaDEMToRockable; --type-map=[S1,S2,S3] maps the type indices to names without a .shp file (and takes priority over one):

./scripts/tools/ConvExaDEMToXYZ --last out.xyz
./scripts/tools/ConvExaDEMToXYZ --last out.xyz --input-dir=OtherOutputDir --type-map=[S1,S2,S3]