[lammps-users] updating an older version of LAMMPs to have internal style variables

Hi everyone,

I emailed regarding this a few weeks back but I got a specific problem now which I thought would be best addressed via a new thread. I’m updating an older version of lammps (feb 2016) which doesn’t have an internal style variable so that I can adopt fix controller to my old lammps. I looked at the structure of modern (Nov 2016) variable.cpp files which have an internal style variable and updated my feb 2016 variable.cpp and variable.h files accordingly. I did so by checking where INTERNAL is invoked in Nov 2016 variable.cpp and added that functionality to my feb 2016 variable.cpp and variable.h.

I compiled lammps and was able to successfully get an executable. However, I get a segmentation fault whenever I try to define an internal style variable. Equal style variables work fine but internal style variables crash with a segmentation fault. Note that it crashes even when fix controller is not called.

I know this is very simplistic and probably naive of me but I am far from a c++ expert. I would greatly appreciate it if someone could let me know if more files must be modified, or if I must include another modification to my variable.cpp or variable.h apart from the obvious inclusion of all INTERNAL FUNCTIONS?

Many thanks!