trying to print a variable

I am trying to get my variables to print but keep getting errors. My input file has :

variable scale1 equal ramp(0,1.5)

variable scale2 equal ramp(0,1)

fix 1 all npt temp 0.60733 0.60733 1.0 iso 1.0 1.0 10.0

fix 2 all adapt 1 pair lj/cut epsilon 1 1 v_scale1

fix 3 all adapt 1 pair lj/cut epsilon 1 2 v_scale2

fix 4 all adapt 1 pair lj/cut epsilon 2 2 v_scale2

dump 1 all atom 10000 dump.block

restart 10000 restart.block

run 5000000 start 0 stop 10000000

I have tried

print ${scale1}

and

fix 5 print 1 ${scale1}

but I keep getting the error

Cannot use ramp in variable formula between runs

any ideas? Thanks

I am trying to get my variables to print but keep getting errors. My input
file has :

variable scale1 equal ramp(0,1.5)
variable scale2 equal ramp(0,1)

fix 1 all npt temp 0.60733 0.60733 1.0 iso 1.0 1.0 10.0
fix 2 all adapt 1 pair lj/cut epsilon 1 1 v_scale1
fix 3 all adapt 1 pair lj/cut epsilon 1 2 v_scale2
fix 4 all adapt 1 pair lj/cut epsilon 2 2 v_scale2
dump 1 all atom 10000 dump.block
restart 10000 restart.block
run 5000000 start 0 stop 10000000

I have tried

print ${scale1}

and

fix 5 print 1 ${scale1}

but I keep getting the error
Cannot use ramp in variable formula between runs

...and rightfully so.

any ideas? Thanks

yes. the problem is, what the error message says.
the ramp function depends on the fraction of steps
that the current run statement has been executed.
thus it is undefined between run statements.

this is why you cannot use the print statement.

in the second case (fix print) you are missing the
quotation marks around the print output. without
the variable will be evaluated immediately and thus
you - again - have the case of an undefined ramp
expression.

cheers,
    axel.