ERROR: Label wasn't found in input script

Submitted by laudari on Fri, 01/22/2021 - 06:37

Hello Liggghts forum,
I tried to save some variables in csv format which are mentioned below.
While running simulation,
I got an error.
I think I did mistake while including ' jump command and label'

Could you kindly help me to solve this problem?

Thank you so much

My script
============================\
################################################################################################################
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

variable t equal step*dt
#variable sm equal sim_time
variable a equal atoms
variable b equal fz
variable c equal fx
variable d equal fy
variable f equal vx
variable g equal vy
variable h equal vz
##########################################################################################################################
run 100
#########################################################################################################################

fix file all print 1 "$t, $b,$c, $d, $f, $g $h, $a " file test.csv title "time, fz, fx, fy, vx, vy, vz, a"
=================================================
jump in.particleA runloop
jump SELF runloop
label break
run 1000000 upto
unfix ins

======================

It would be a great help if I get some solutions to this problem.

Error
-------------------------------------------------
INFO: Particle insertion ins: inserted 1 particle templates (mass 1.413717e-07) at step 1
- a total of 1 particle templates (mass 1.413717e-07) inserted so far.
100 1 2.6938695e-11 0 0.132
Loop time of 0.579203 on 1 procs for 100 steps with 1 atoms, finish time Fri Jan 22 14:30:33 2021

Pair time (%) = 0.000117855 (0.0203478)
Neigh time (%) = 0.311281 (53.743)
Comm time (%) = 0.000108477 (0.0187287)
Outpt time (%) = 1.9906e-05 (0.00343679)
Other time (%) = 0.267676 (46.2145)

Nlocal: 1 ave 1 max 1 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 100
Dangerous builds = 0
ERROR: Label wasn't found in input script (/build/liggghts-YO7u74/liggghts-3.8.0+repack1/src/input.cpp:223)

SHUBHAM AGARWAL | Mon, 01/25/2021 - 03:12

Hello
You have not defined any label for runloop in the script. Also, I am not able to understand why you to use jump runloop . If you still want to use, you can define:

label runloop
%%%% Commands%%
jump SELF runloop
label break
run 1000000 upto
unfix ins

-Shubham

laudari | Mon, 01/25/2021 - 04:03

Hello Shubham, really appreciate your reply.
I was having problem in loop commands. Since I am new in liggghts, I am trying to give my full effort.

DId you mean by I have to define label like this:

label runloop

variable b loop 5
variable c loop 5

jump SELF runloop
label break
run 1000000 upto
unfix ins

Thanks alot.

SHUBHAM AGARWAL | Mon, 01/25/2021 - 06:54

Hello
The problem with the above algo is that there is no condition to exit the loop. You can consider the following example and try to modify your code:

label loop
variable a loop 5
print "A = $a"
if "$a > 2" then "jump in.script break" ## Condition to break the loop
next a ## to increase the value of variable a
jump in.script loop ## To jump again to the first label
label break ## Break label (once you jump to this step, loop is terminated!!)
variable a delete

Let me know if you have further questions

Cheers
Shubham

laudari | Fri, 01/29/2021 - 07:13

Hi @Shubham really thank you for your reply,
And sorry for late response.
I will be back if I get any problem while including loop idea in my script.

Thanks a lot