[gmx-developers] force calculations, especially in do_fnbf()

D. Ensign densign at stanford.edu
Fri May 12 01:47:25 CEST 2006


Greetings,

I've been spending long days in the GROMACS code mines, swinging my pick axe, whistling a
working song (which annoys my coworkers), and tyring to do constraints and integration in
double precision while doing the forces in single precision. Four canaries have died from
the poisonous gases. I'm pleased to report that I haven't noticeably broken anything.
Yet. (And I may have made MRS's RATTLE implementation work a tiny bit better in "single"
precision.)

I've seen, deep down in the bowels of do_fnbf(), the calls to assembler code, which I
don't understand (yet), but which look importantly like something different happens when
I ./configure --disable-float instead of ./configure the regular way.

If I want to do the forces in single precision, then everything that gets to do_fnbf(),
and everything advertised in the ARGS, and is subsequently sent to the assembler code
ought to be in obligate single precision. That is, if I'm working as if the "forces are
in single" then the appropriate assembler functions ought to be used. Of course it's
possible to copy over ordinary precision (implied double) arrays into obligate single
precision arrays. But is it necessary to copy them back?

Notice that I'm taking the strategy of, don't 8888 with the assembly code.

The question boils down to, do these mysterious functions called by do_fnbf() modify
anything other than f[]? For everything that they modify, I either have to make sure it's
obligate single precision throughout the code, or copy it back to an obligate double form
after do_fnbf() is done messing with it.

Any insight, answers, wisdom, or ridicule would be most appreciated.

Dan Ensign
Stanford University
-- 
"Give up learning, and put an end to your troubles." -- Lao Tzu



More information about the gromacs.org_gmx-developers mailing list