Lammps giving error, 'finalize was not called on proc0'

I am getting the following error message when I am running my simulation. The code is same as given here-
and the code for generation of my 30 chains, 1000 momomers each system is

My command to run was ‘mpirun -np 8 lammps-daily < input.lmp’. (I am on an ubuntu, 8-core i-7 machine)

your actual error is: ERROR on proc X: Substitution for illegal variable (…/input.cpp:450)

check the LAMMPS error docs: for what it means. seems as if your input script was flawed.