Data communication

Dear user,

I have an query about data communication in lammps. In lammps code data communication did in single precession or double precession?

Thanks in advance for your time and consideration.

Thanks

Notan

I don’t know if this answers your question, but atom positions, velocities, and forces in LAMMPS are represented using 64bit doubles. (Check out “atom.h”. If you grep " float " *.h in the LAMMPS’ “src/” directory, you’ll see a few places where single precision floats are used, but that code seems to be specific for the calculation of long-range electrostatic interactions.)

Cheers
Andrew

Thanks for your reply. I want to know whether the communication via MPI is done in single precision or double precession in Molecular dynamics code.

Thanks

Notan

Thanks for your reply. I want to know whether the communication via MPI is
done in single precision or double precession in Molecular dynamics code.

​what do you need to know this for?

communication of data is done as 32-bit integer, 64-bit integer and double
precision floating point using (64-bit) doubles as storage elements for the
communication buffers.​ while encoding of 32-bit integers into doubles can
be done with a typecast, doing the same for 64-bit integer requires a bit
more trickery (see the ubuf struct).

​axel​