Possible Communicate Command Parsing Bug


There appears to be a bug in the 14 July 2011 version of comm.cpp in
the Comm::set() function which would make it impossible to turn off
velocity communication once it is on. Running an input script with
"communicate single vel no" returns "Illegal communicate command". A
copy of the relevant lines in comm.cpp is below:

if (strcmp(arg[iarg+1],"yes") == 0) ghost_velocity = 1;
else if (strcmp(arg[iarg+1],"yes") == 0) ghost_velocity = 0;
else error->all("Illegal communicate command");

There is evidently no comparison which checks for a "no" string, and
changing the second "yes" to a "no" should be sufficient to fix the


James F. Dama
Graduate Student
Department of Chemistry
University of Chicago

you're right - change the 2nd "yes" to a "no" and it should
work. You're probably the first user to try the "no" setting.
Since that is the default, normally there is no need to set it.