ERROR: Label wasn't found in input script

Hello , everyone ,

I want to use a variable of loop style to do a series of runs.

My input script looks like below

setup part( not copied, only the part of loop is shown here) …
variable index loop 10
label loop
log lammps.{index}.log thermo_style custom step c_crelax pe f_fixw1 f_fixw2 f_fixw3 thermo {ndump}
dump iddump all custom {ndump} dump.{index}.lammpstrj id type q x y z element
dump_modify iddump element Ni H C sort id flush yes
#run 5000000
run 500
undump iddump
next index
jump SELF loop

When I run this script, I find that there is no error if I used only one cpu, but an error of “ERROR
Label wasn’t not found in input script” arised, if I used more then one processor.

How to fix this problem?

thank you for any suggestions !

Geng Sun

Hello , everyone ,

I want to use a variable of loop style to do a series of runs.

My input script looks like below

setup part( not copied, only the part of loop is shown here) .........
variable index loop 10
label loop
log lammps.\{index\}\.log thermo\_style custom step c\_crelax pe f\_fixw1 f\_fixw2 f\_fixw3 thermo {ndump}
dump iddump all custom \{ndump\} dump\.{index}.lammpstrj id type q
x y z element
dump_modify iddump element Ni H C sort id flush yes
#run 5000000
run 500
undump iddump
next index
jump SELF loop

When I run this script, I find that there is no error if I used only one
cpu, but an error of "ERROR
Label wasn't not found in input script" arised, if I used more then one
processor.

How to fix this problem?

have you read this part of the "jump" command documentation?

IMPORTANT NOTE: The SELF option is not guaranteed to work when the
current input script is being read through stdin (standard input),
e.g.

lmp_g++ < in.script

since the SELF option invokes the C-library rewind() call, which may
not be supported for stdin on some systems or by some MPI
implementations. This can be worked around by using the -in
command-line argument, e.g.

lmp_g++ -in in.script

or by using the -var command-line argument to pass the script name as
a variable to the input script. In the latter case, a variable called
"fname" could be used in place of SELF, e.g.

lmp_g++ -var fname in.script < in.script