amber-developers: Altivec wrapper for PMEMD

From: Mengjuei Hsieh <mengjueh.uci.edu>
Date: Tue, 15 Jun 2004 01:40:55 -0700

Hi,

Although there are few people playing AMBER on Macintosh here, this is
just
for your information.

I attached a wrapper for vrsqrtf (1/r^.5) in altivec (available in Apple
G4/G5 machine) on MacOS X. You can call vrsqrtd_wrapper(input array,
output
array, number of item in the array) from PMEMD. This wrapper accepts
double
precision input and output while altivec is still thinking in single
precision, so beware of those accuracy issues.

And the patch file for PMEMD as a minimal modification (just an added-in
modification, it won't delete any line or modify any loop in the code).

Installation:
1. You need to compile an object file vector.o first
    cp vector.c amber8/src/pmemd/
    cd amber8/src/pmemd/
    gcc -c -O3 -fast -funroll-loops -mcpu=G5 -faltivec vector.c
2. Patch short_ene_bigcache_opt.f90, this command also make a backup.
    cd amber8/src/pmemd/src
    patch -b -p0 < patch.foraltivec.txt
3. Use the config.h.nopar attached here and make a new binary
    cp config.h.nopar amber8/src/pmemd/config.h
    cd amber8/src/pmemd/
    make clean; make

Benchmark:
    I don't have any G5 machine around at the time I wrote this new
wrapper.
However it boosts my powerbook g4-400 (yes, it's damned slow) on jac for
about 20%.

Best,
-- 
Mengjuei Hsieh, Luo group, Molecular Biology and Biochemistry, University
of
California Irvine. Tel: 49562, Address: 3144 Natural Science I building,
UCI, Irvine CA 92697-3900. Group Homepage: http://rayl0.bio.uci.edu/





Received on Wed Apr 05 2006 - 23:50:01 PDT
Custom Search