Output file with same name produces corrupted sdds file
Posted: 19 Jun 2008, 10:53
I came across a way (e.g. user error) to corrupt an output file by accidentally
using the same file name for two output data:
&closed_orbit
output="%s.clo"
...
&end
&correct
mode = "orbit", method = "global",
trajectory_output = "%s.clo"
...
&end
The output file ending in .clo turned out to be a corrupted SDDS file.
The output of closed_orbit and correct are closed orbit data,
so I used the ".clo" suffix, which has been traditional for closed_orbit.
However the files in the commands &closed_orbit and &correct are
supposed to be different. What happened was that two headers were written
and binary data from two calculations was interleaved in the file.
I should have used a different suffix for the &correct trajectory_output.
This applies in general for all output files of the various elegant commands.
Louis Emery
using the same file name for two output data:
&closed_orbit
output="%s.clo"
...
&end
&correct
mode = "orbit", method = "global",
trajectory_output = "%s.clo"
...
&end
The output file ending in .clo turned out to be a corrupted SDDS file.
The output of closed_orbit and correct are closed orbit data,
so I used the ".clo" suffix, which has been traditional for closed_orbit.
However the files in the commands &closed_orbit and &correct are
supposed to be different. What happened was that two headers were written
and binary data from two calculations was interleaved in the file.
I should have used a different suffix for the &correct trajectory_output.
This applies in general for all output files of the various elegant commands.
Louis Emery