[lammps-users] Question on compute_stress_atom.html

Hi all,
  I recently upgraded to the May 21 version of LAMMPS from a January 2008 version and found that the same set of 4 commands noted on http://lammps.sandia.gov/doc/compute_stress_atom.html:

compute peratom all stress/atom
compute p all sum c_peratom[1] c_peratom[2] c_peratom[3]
variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
thermo_style custom step temp etotal press v_press

Give the following error when we try to execute using the same input file that works without any problems with the January version of the code:

"ERROR: Invalid compute style"

Has something changed in the new version (May 21) of LAMMPS that the syntax of the commands need to be changed or might something else be going on?

Thanks!

Mike

Use
compute p all sum c_peratom[1] c_peratom[2] c_peratom[3]
intead of
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]

Vikas is correct. I'll change the doc page for compute stress/atom
to reflect compute reduce instead of compute sum.

Steve

Sorry, it should be other way round
Use
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
instead of
compute p all sum c_peratom[1] c_peratom[2] c_peratom[3]