[lammps-users] Questions regarding per-atom and global stress tensor

Hi Steve,

thanks a lot for your email. I got the correct stress components using your input script, however it happened only when I submit my job in a single processor. If I submit the job in multi processors the stress components change, although, the volume and pressure calculations remain the same. It seems that the stress components are reduced by the factor of P, where P is the number of processors.
Below are the summary of the results:

Step Temp 2[1] 2[2] 2[3] Volume Press
0 0 16452.12 16452.12 16452.12 590520.42 -0.027860376 (from 1 processor)
0 0 4113.0301 4113.0301 4113.0301 590520.42 -0.027860375 (from 4 processor)
0 0 2056.515 2056.515 2056.515 590520.42 -0.027860375 (from 8 processor)

If I want to run my job in more than one processor should I take this factor into consideration for the actual stress components?

Ishraq Shabib.

Well duh, just a dumb bug. I forgot the MPI_Allreduce's in compute_sum.cpp
I'll post a patch.