Does commuciation parts have any infulence on serial-execute?

Hello,
I’ve added a potential to lammps. But it is serial , I want make it parallel just as EAM(pair_eam.cpp / pair_eam.h) do. But I only change the communication part in my potential file, when I make serial again using this new file, the press is a little different from before, but energy is not.

before change:

LAMMPS (20 Apr 2011)
Lattice spacing in x,y,z = 2.86 2.86 2.86
Created orthogonal box = (0 0 0) to (28.6 28.6 28.6)
1 by 1 by 1 processor grid
Created 2000 atoms
Setting up run …
Memory usage per processor = 2.80281 Mbytes
Step Temp Press TotEng
0 0 869.14845 -8559.9969
100 5.8160883e-07 869.15324 -8559.9969
200 4.3013561e-07 869.13502 -8559.9969

after change:

LAMMPS (20 Apr 2011)
Lattice spacing in x,y,z = 2.86 2.86 2.86
Created orthogonal box = (0 0 0) to (28.6 28.6 28.6)
1 by 1 by 1 processor grid
Created 2000 atoms
Setting up run …
Memory usage per processor = 2.80281 Mbytes
Step Temp Press TotEng
0 0 866.49865 -8559.9969
100 2.6108129e-23 866.49276 -8559.9969
200 3.6196897e-23 866.4751 -8559.9969


why? Does Communition part, like function" pack_comm() \ unpack_comm() " and “pack_reverse_comm() / unpack_reverse_comm()”, have influence on serial-execute?

If I want to make my potential (a kind of EAM) parallel, what parts do I need to change with respect to the pair_eam.cpp file?

I don’t have any experience in writing parallel code. Any hints will be appreciated?

Thanks.


|

why? Does Communition part, like function" pack_comm() \ unpack_comm() " and "pack_reverse_comm() /

unpack_reverse_comm()", have influence on serial-execute?

It doesn’t make any difference if you did it right. If you did it wrong, then all
bets are off. I suggest you debug your code and see why it is different. The
time 0 pressure difference is a good place to start. It typically means the
forces on atoms are different. Find an atom whose force is different
and find out why.

Steve