[lammps-users] restart2data difficulties

Hi Lammps Users,

I am having some difficulty with converting a binary restart file to an
ASCII file using the restart2data tool.

The restart file is from an older version of LAMMPS:
  Restart file version = 9 Sep 2010

And I used these versions to try to get it to convert (none worked):
  restart2data version = 6 Jan 2011
  restart2data version = 10 Sept 2010
  restart2data version = 15 Jan 2010

I had 1 compiler complain on compiling the restart2data.cpp:
/opt/intel/Compiler/11.1/064/lib/intel64/libimf.so: warning: warning:
feupdateenv is not implemented and will always fail

When I try to run the simulation from the restart file, I get an error
message.
LAMMPS (9 Jan 2011)
Reading restart file ...
ERROR: Invalid flag in header section of restart file
[[email protected]] ONE OF THE PROCESSES TERMINATED BADLY: CLEANING UP

Any ideas on what to try? Is there such a thing as a 9 Sep 2010
restart2data.cpp out there?

Thanks for your help,
John

Every LAMMPS distribution (on any date) has a tools
dir with a restart2data.cpp file. That file should be
compatible with that version. So if you have the 9Sept10
version, you should have the restart2data source code?

Steve

Every LAMMPS distribution (on any date) has a tools
dir with a restart2data.cpp file. That file should be
compatible with that version. So if you have the 9Sept10
version, you should have the restart2data source code?

Steve

john,

Hi Lammps Users,

I am having some difficulty with converting a binary restart file to an
ASCII file using the restart2data tool.

The restart file is from an older version of LAMMPS:
Restart file version = 9 Sep 2010

And I used these versions to try to get it to convert (none worked):
restart2data version = 6 Jan 2011
restart2data version = 10 Sept 2010
restart2data version = 15 Jan 2010

I had 1 compiler complain on compiling the restart2data.cpp:
/opt/intel/Compiler/11.1/064/lib/intel64/libimf.so: warning: warning:
feupdateenv is not implemented and will always fail

this indicates that you would have tried to compile with
the intel fortran(!) compiler or tried to link the fortran runtime
statically. this is not needed.

When I try to run the simulation from the restart file, I get an error
message.
LAMMPS (9 Jan 2011)
Reading restart file ...
ERROR: Invalid flag in header section of restart file
[[email protected]] ONE OF THE PROCESSES TERMINATED BADLY: CLEANING UP

that implies that you tried to run restart2data in parallel.
restart2data is a serial program. if you run multiple copies
you can expect problems like corrupted files or file access issues.

Any ideas on what to try? Is there such a thing as a 9 Sep 2010
restart2data.cpp out there?

please note that the "version data" on restart2data is not
changed with every new patch when the restart file format
remains the same.

you may get a warning, without it being a problem.

axel.

Hi Steve,

This is a distribution that was installed on a cluster. I contacted the
administrator and he was able to get an older version of restart2data from
svn (the 10 Sep version). Unfortunately I don't think that the source code
for the 9 Sep Lammps executable is on file because it has been superseded
with a newer version.
Any ideas on what I could try?

Thanks again,
John

Hi Steve,

This is a distribution that was installed on a cluster. I contacted the
administrator and he was able to get an older version of restart2data from
svn (the 10 Sep version). Unfortunately I don't think that the source code
for the 9 Sep Lammps executable is on file because it has been superseded
with a newer version.
Any ideas on what I could try?

you have access to _any_ version of restart2data through the public
svn and git repositories here at temple. you can do this even with a
web browser. check out:

http://git.icms.temple.edu/git/?p=lammps-ro.git;a=history;f=tools/restart2data.cpp;h=79c9a16453a3777d0a5c0c7cdc4e91d3a8047c9f;hb=HEAD

the version that was current on 9 sep is this one (from august)

http://git.icms.temple.edu/git/?p=lammps-ro.git;a=blob;f=tools/restart2data.cpp;hb=d359806af09bc2f835f1be317f3b450049d14a80

axel.

So I tried all the versions and I checked the restart2data output files
with diff. There's no difference in the result I get with all the
versions. At least the output is consistent!

What I get is this:
LAMMPS data file from restart file: timestep = 3060000, procs = 8

15360 atoms

1 atom types

-2.5222000000000001e+01 2.5222000000000001e+01 xlo xhi
-3.5000000000000000e+01 3.5000000000000000e+01 ylo yhi
-3.0000000000000000e+01 3.0000000000000000e+01 zlo zhi

Masses

1 12.011

Atoms
<snip>

Velocities
<snip>

Is this restart file missing anything obvious?

Thanks for the advice on the compilers Alex, I fixed it, but the multi
processor error was an output from LAMMPS not restart2data. The LAMMPS
executable crashes when I try to use the restart2data formatted output.

Thanks again!
John

So I tried all the versions and I checked the restart2data output files
with diff. There's no difference in the result I get with all the
versions. At least the output is consistent!

What I get is this:
LAMMPS data file from restart file: timestep = 3060000, procs = 8

15360 atoms

1 atom types

-2.5222000000000001e+01 2.5222000000000001e+01 xlo xhi
-3.5000000000000000e+01 3.5000000000000000e+01 ylo yhi
-3.0000000000000000e+01 3.0000000000000000e+01 zlo zhi

Masses

1 12.011

Atoms
<snip>

Velocities
<snip>

Is this restart file missing anything obvious?

nope.

Thanks for the advice on the compilers Alex, I fixed it, but the multi
processor error was an output from LAMMPS not restart2data. The LAMMPS

my bad. i looked closer.

i think your problem is that you are trying to read a data
file - as produced by restart2data - with the read_restart command.

you have to use read_data

am i guessing right this time?

cheers,
    axel.

You're right!! It was not clear to me that you have to put the
restart2data output in the read_data field, and not the read_restart
field. It works like a charm.

If I could make a suggestion, perhaps it might be helpful to make this
more explicit in the documentation?

Thanks for your help!
John

You're right!! It was not clear to me that you have to put the
restart2data output in the read_data field, and not the read_restart
field. It works like a charm.

If I could make a suggestion, perhaps it might be helpful to make this
more explicit in the documentation?

i wouldn't know how? it is pretty obvious to me and was
from the time i started learning to use lammps.

why don't you have a look at the parts of the documentation
that you were looking at before and suggest changes.

thanks,
    axel.

What documentation do you mean?

The tool prints out:
Syntax: restart2data restart-file data-file (input-file)

when it runs (also in the header of the source file),
but is there some other doc on it?

That one-liner seems pretty clear to me ...

Steve

Sorry Steve, I forgot to CC the list, here's the suggestion I sent before:

Sure, no problem.

For example,
http://lammps.sandia.gov/doc/read_restart.html
http://lammps.sandia.gov/doc/read_data.html

There's no reference to restart2data in the read_data documentation. It
might be helpful to include a warning to not use output from restart2data
in the read_restart documentation, and instructions to use the
restart2data output with read_data in the read_data documentation.

Also in the restart2data documentation (here:
http://lammps.sandia.gov/doc/Section_tools.html#restart), this line can be
confusing:
"The file restart2data.cpp converts a binary LAMMPS restart file into an
ASCII data file."

This can be misinterpreted (as I did), because converting a "binary LAMMPS
restart file into an ASCII data file" can mean something different than,
for example, converting a "binary LAMMPS restart file into a LAMMPS data
file" which is more specific. Not all ASCII data files are LAMMPS data
files, and I didn't catch on to the intended meaning. I (wrongly) assumed
it was an ASCII formatted restart file.

I recommend adding a line like this:
Use read_data to read the output file from the restart2data tool, not
read_restart.

I hope that is helpful!
Thanks again,
John