Set_internal_variable()

Hello Sir,

I am trying to use set_internal_variable for Fortran code which uses LAMMPS as library. Following are the code lines
CALL lmp%set_internal_variable(“my_variable”, time_md)
CALL lmp%command(“print ${my_variable}”)

But i got warning and error:

WARNING: WARNING: unable to set internal variable “my_variable” [Fortran/set_variable] ((library):0)
ERROR on proc 1: Substitution for illegal variable my_variable (src/input.cpp:666)
Last command: print ${my_variable}

Where time_md is a double precession variable of FORTRAN. My question is, What i am doing wrong in using set_internal_variable command.?
Thank you
Adnan

You are trying to set the value of a variable that has not been defined and thus LAMMPS knows nothing about it.