Reading Restart files in multiple processors

Hello All,

I was performing equilibriation(NPT, NVT, NVE) in a system of Carbon Nanotube(10,10) of length 65 nanometer. After this, I was trying to fix thermal conductivity by reading the restart files obtained at the end of the equilibration by using “read_restart equil.restart2” command.

While the same procedure is running successfully for other lengths of the CNT (5nm, 20nm, 35nm, 80nm, 95nm), its giving the error of "Invalid flag in header section of restart file " which means “unrecognised entry in the restart file”. The same error is also getting displayed when I was performing the simulations for the CNT of length 110nm.

I do not really understand why is this happening. Can anyone please help me sort out my error. Thank you so much.

Best,
Upamanyu Ray

There is not enough information here.
Which version of lammps is this with?
was the restart written by the same version?

Can you make the inputs available?

Axel.

Hello,

I am working in TACC Lonestar and the restart files were also written by the same version. Also it worked correctly for other lengths of CNT (5nm, 20nm, 35nm, 80nm, 95m) but not for these lengths (50nm and 95nm).

The input files are as follows :

### EQUILIBRATION

dimension 3
units metal
atom_style molecular
read_data data.cnt50
pair_style airebo 3.0 1 1

pair_coeff * * CH.airebo C
group Carbon type 1

thermo 1

thermo_style custom step temp epair pe ke etotal press vol
minimize 1.0e-6 1.0e-8 0.1 10000

fix 1 Carbon npt temp 300.0 300.0 0.1 iso 0 0 0.1

thermo 50
timestep 0.001
dump 1 Carbon atom 100 dump.atom

run 5000000
unfix 1

write_restart equil.restart0

fix 2 Carbon nvt temp 300.0 300.0 0.1
run 5000000
unfix 2

write_restart equil.restart1

fix 3 all nve
run 2000000

write_restart equil.restart2

THERMAL COND

read_restart equil.restart2
pair_style airebo 3.0 1 1

pair_coeff * * CH.airebo C
group Carbon type 1

log log.thermal
reset_timestep 0
timestep 0.001
variable t equal 150000
thermo $t
fix NVT all nvt temp 300.0 300.0 0.1

compute ke Carbon ke/atom

variable temperature atom c_ke/(1.5*8.617e-5)
fix thermal all thermal/conductivity 300 z 100

thermo_style custom step temp pe ke etotal press lx ly lz f_thermal
run 7000000
write_restart equil.restart3

fix TEP all ave/spatial 1 10000 10000 z lower 3 v_temperature file t

emp.cnt50 units box
run 1000000
write_restart equil.restart4

The simulations are not running after the line marked in redg iving the error of *"*Invalid flag in header section of restart file " which means *"*unrecognised entry in the restart file" . Can you please help? Thank you.

Hello,

I am working in TACC Lonestar and the restart files were also written by the
same version. Also it worked correctly for other lengths of CNT (5nm, 20nm,
35nm, 80nm, 95m) but not for these lengths (50nm and 95nm).

sorry, but this is useless. you didn't answer *any* of my questions.

axel.

Exxtremely sorry, but I did not really understand your questions then. Which inputs do you mean when you are saying “Can you make the inputs available?”. Thank you.

Exxtremely sorry, but I did not really understand your questions then. Which
inputs do you mean when you are saying "Can you make the inputs available?".

i also asked about the *exact* version. "the same" doesn't help.

when i mean available, i mean in a form that i (or somebody else who
feels like tracking this down) can run them. just copying the input
script is not enough. the data files (e.g. one that works and one that
doesn't) are required as well.

axel.

Thank you so much for your patience, Axel. My LAMMPS version is 14th May, 2013 and the restart was written in the same version

The required inputs are attached. Thanks

in.cnt (676 Bytes)

in.cntthermal (661 Bytes)

data.cnt50 (403 KB)

forget it! i have no more patience left.

this is only half of what i asked for, and you don't even tell me in
which order to run it or made an effort to reduce the amount of time
it takes to run this.

figure it out yourself.

axel.

well all i can say is thank you so much for your time. but i gave everything i had in that order starting from equilibriation (in.cnt) and then the thermal calculations (in.cntthermal). the input files which ran and which did not are exactly the same but for different lengths. only the data files vary. i am attaching the correct ones here too. and thank you again for taking time out of your busy schedule and replying. trying to sort it out.thanks

data.cnt65 (525 KB)

CH.airebo (905 KB)

in.cnt (676 Bytes)

in.cntthermal (661 Bytes)

well all i can say is thank you so much for your time. but i gave everything
i had in that order starting from equilibriation (in.cnt) and then the
thermal calculations (in.cntthermal). the input files which ran and which
did not are exactly the same but for different lengths. only the data files
vary. i am attaching the correct ones here too. and thank you again for
taking time out of your busy schedule and replying. trying to sort it
out.thanks

i cannot reproduce your problems. they don't make any sense anyway.

what i *do* see is that your equilibration protocol is very questionable.

your minimize command is incorrect. it uses a floating point number
where an integer should be, so actually no minimization happens.

then it doesn't make any sense *at all* to run an isotropic NPT
variable cell MD on a 1d periodic system.

even more so, your time constant for the box relaxation is too small
and you should rather first equilibrate your system with a fixed
volume, since if i run with only the z dimension free to relax, you
entire CNT shatters because of the abuse.
so, if you *do* want this sorted out, you have to very carefully
document (with a short/small a simulation as possible, nobody that
wants to debug an input has time to wait a couple of days for a crash
to happen) what *exactly* it is that is the cause.
remove all parts of the input that do not make a change and reduce the
length of the run to the absolute minimum to reproduce your problem.

also you have to document how exactly you ran the input (e.g. with how
many processors and what processor assignment, if more than a few).
for such a 1d system with lots of empty space, one usually needs to
adjust the processor distribution to avoid having idle CPUs with no
atoms (which *can* cause crashes for some parts of lammps that didn't
take that into account).

so here is your "homework". do it well, and you *may* have somebody
help you. remember that if you want help, you need to help people to
help you, and not force people to *make you* provide what is needed.

axel.

What Axel (or any developer) needs is 2 things:

a) an input script and data file that runs and produces a restart file
b) a 2nd input script that reads the restart file and throws the error you mention about illegal header value

The scripts and the system should be as small and simple as possible,
it should run quickly, and ideally on a single processor. Don’t just
give us your production run with a 1000 line script that
runs for 10 million timesteps on 256 procs.

The simpler you make the problem to see for us, the
quicker it can be fixed.

Steve

I got that now Steve. Thanks a lot for your help.

The scripts you are provided are already close
to what we need to reproduce it. (you are saying
the 2nd script throws an error on the 1st read_restart
command?).

However, the 1st script, while simple, runs a long
minimize, then 3M steps. Can you reproduce
the same problem with a short minimize and a single
short run to produce the bad restart file?
And can you do it on a single processor or does
it need to be a parallel run to see the problem?

Steve