[gmx-users] single and double

chris.neale at utoronto.ca chris.neale at utoronto.ca
Thu Sep 21 03:31:56 CEST 2006

Thank you very much Stéphane, that's great info.

---original message---

chris.neale at utoronto.ca a écrit :
> My system here is an opls-aa protein in a POPE/DMPE membrane with  
> tip4p waters.
> Prior to adding counterions, grompp yields a net charge of -1.999973  
> and grompp_d yields -2.0. Once I have added counterions, both single  
> and double precision don't give me a warning about a net charge on  
> the system. Either system runs fine for many ns and they don't crash.
> 1. Is the net charge really as close to 0.0 in the single precision  
> version as it is in the double, or just close enough that there is  
> no warning issued?

The net charge is really close to zero, the difference may rely on
hardware roundoff, and on the topology limits (charge precision on each
atom/group). This is why you see the difference between single and
double precision.

> 2. If single is farther from 0.0, is this a problem?

It depends :-)
I assume you're using PME, in this case, the system will be scaled to 0
and for you run, that won't be a problem (since spreading a <1e-4
charges among >100 000 atoms won't interfere much with their net charge
...) and the roundoff errors due to the calculations themselves are
bigger than this single vs double difference.

> 3. Why does single run faster anyway? I though intel processors  
> treated them the exact same way in terms of the operations that  
> needed to be carried out?

It depends of the hardware you're talking about.

On single precision systems, the run would run at the same speed on 32
bits architecture and on 64 bits architectures.
On double precision systems, the same run will take twice the time on 32
bits than on 64bits (roughly).

Globally, single precision == 32bits, double precision == 64bits.

That means on single precision run on 32bits machines will be done in
the same time that double precision on 64bits (roughly again).

This is more or less true with gromacs since processors have more than
two types of calculation units (thinkk of sse, sse2, 3Dnowext, ...) and
gromacs is able to take most of them (if not all) into account via
specialized routines, but that the goal.

> Thanks.
> Chris.



More information about the gromacs.org_gmx-users mailing list