This is a page for testing out the use of the LLVM compiler backend for use in Amber.
There are two options: use clang/clang++ (only for C/C++ source code) or use the dragonegg backend to use the LLVM optimizers with the front-end being supplied by GCC. For Fortran code, dragonegg is required. This page is the result of some of the tests I've run trying to use dragonegg and/or clang with Amber.
The computers I've run this test on are my Desktop and Mac laptop:
Desktop: AMD FX-6100 hex-core CPU. GCC 4.7.3, clang/llvm/dragonegg-3.3. Gentoo Linux
Laptop: Intel Core 2 Duo. GCC 4.7.3, clang/llvm/dragonegg-3.3. Mac OS X 10.9.1
Compilation Efficiency
Machine | Compiler Set | Build time (mm:ss)* |
---|---|---|
Desktop | dragonegg 3.3 | 9:28 (-j6 4:01) |
Desktop | GCC 4.7.3 | 17:24 (-j6 7:45) |
Desktop | Intel 13.1.3 | 28:01 (-j6 14:10) |
Desktop | clang + dragonegg 3.3 | N/A** |
Laptop | dragonegg 3.3 | 22:59 |
Laptop | GCC 4.7.3 | 28:28 |
*As computed via [[time make install]] — The time next in parentheses corresponds to parallel make where -j# corresponds to running with # threads.
**The clang compiler failed to build the reduce program. It built cpptraj just fine, and linked fine with dragonegg-supplied gfortran to build sander and pmemd. As a result, only performance stats could be collected from the built programs (see below). It seemed to be a bit slower than dragonegg/GCC, though.
Computational Performance
I set up benchmarks for 3 codes: cpptraj, pmemd, and sander with QM/MM. Each benchmark is described shortly in the sections following the table. All tests considered the serial executables.
Machine | Compiler Set | Cpptraj Timings* | pmemd Timings | sander QM/MM timings |
---|---|---|---|---|
Desktop | dragonegg 3.3 | 57.83 s | 119.45 s | 252.05 s |
Desktop | GCC 4.7.3 | 72.47 s | 110.83 s | 250.56 s |
Desktop | Intel 13.1.3 | 55.43 s | 94.01 s | 208.57 s |
Desktop | clang + dragonegg 3.3 | 60.82 s | 119.60 s | 252.74 s |
*Averaged over 2 consecutive runs on a 6 GB trajectory.
Cpptraj test
The cpptraj test uses the following input file:
parm ../4LYT.solv10.parm7
trajin 4LYT.solv10.md1.nc
# Some time-consuming tasks
autoimage
#closest 500 :1-129 closestout closest_500.nc name closest_500 outprefix closest
radial radial.dat 0.1 15 :WAT@O= :1 volume radial
where 4LYT.solv10.md1.nc is a NetCDF trajectory with 25,750 frames. The 4LYT.solv10.parm7 defines a system with 21,548 atoms.
Pmemd test
The pmemd test uses the following input file:
Explicit solvent molecular dynamics constant pressure MD
&cntrl
imin=0, irest=1, ntx=5,
ntpr=50, ntwx=0, nstlim=1000,
dt=0.002, ntt=1, tempi=300,
temp0=300, tautp=10.0, ig=-1,
ntp=0, ntc=2, ntf=2, cut=8,
ntb=1, iwrap=1, ioutfm=1,
/
The same system (4LYT.solv10.parm7) with 21,548 atoms as the test run for cpptraj is run for pmemd.
sander QM/MM test
The crambin test case (642 atoms) from the Amber test suite is used. The input file was adjusted (shown below):
Crambin: 10 cycles md using qm calculation
&cntrl
imin =0, nstlim=1000,
ntpr=10, ntb=0, cut=8.1,
ifqnt=1,ntwx=0,ntwv=0,igb=6
/
&qmmm
iqmatoms= 80,81,82,83,84,85,86,87,88,89,90,
91,92,99,100,101,102,103,104,
105,106,107,108,115,116,117,118,
125,126,127,128,129,130,131,132,133,
134,135,136,137,138,139,140,141,142,
149,150,151,152,153,
160,161,162,163,164,165,166,167,
174,175,176,177,178,179,180,181,182,
183,184,185,186,187,
194,195,196,197,198,199,200,201,
qm_theory='PM6',adjust_q=0,
qmcharge=1
/