Re: information about simulation speed

From: Jeff Comer (jeffcomer_at_gmail.com)
Date: Tue Dec 02 2014 - 18:09:54 CST

Hi Kshatresh,

The benchmark may be correct. Below is a Bash/Awk script that might
help as it calculates the average performance by extracting all TIMING
lines from the log file. I think this script was originally written by
David Wells (or maybe Chris Maffeo) and later modified by me.

In any case, there are some things you can try in order to improve
your performance. Especially when using GPUs and the multicore-CUDA
build of NAMD, I've found you have to experiment with different
numbers of processors to get the optimal performance. For example, I
have a 4-core Intel Xeon Haswell workstation with a GeForce GTX 750 Ti
graphics card. Surprisingly, for a 10,000 atom system, I get 31 ns/day
for 2 CPUs+1 GPU and 24 ns/day for 4 CPUs+1 GPU. So I get best use of
my computer by running one system on 2 CPUs+1 GPU and another system
on the other 2 CPUs (totaling about 40 ns/day). Other ways of
improving performance involve messing with pmeGridSpacing and cutoff,
but you may be perturbing your force field if you do this. I can tell
you about what cutoffs I use and what validation I've done if you're
interested.

#!/bin/bash

error () {
    echo $@ > /dev/stderr
    exit -1
}
for FILE; do
    if [[ ! -f $FILE ]]; then error "Usage: timing filename
[filename...]"; exit -1; fi
done
if (( $# == 0 )); then error "Usage: timing filename [filename...]";
 exit -1; fi

for FILE; do
    echo -e "\t$FILE"
    ## grab preliminary info from FILE
    PROCS=$(awk '/Running on [0-9]* processors/ {print $4; exit}' $FILE)
    ATOMS=$(awk '/Info: [0-9]* ATOMS/ {print $2; exit}' $FILE)
    TS=$(awk '/Info: TIMESTEP[ \t]+[0-9]*/ {print $3; exit}' $FILE)
    FIRSTTS=$(awk '/FIRST TIMESTEP/ {print $4; exit}' $FILE)
    HOST=$(awk '/Info: [0-9] NAMD/ {print $7}' $FILE)
    CUDA=$(grep -c '^CUDA device' $FILE)

    echo $FIRSTTS
    ## print some info
    echo -e "@$HOST\t$PROCS procs\t$CUDA gpus\t$ATOMS atoms"
    grep "^TIMING" $FILE | awk '{n++;t+=$8};END{printf("<sec/step>=%g
<steps/proc*sec>=%g\n<atoms*steps/proc*sec>=%g <Mans/SU>=%e
<SU/Mans>=%d\n", t/n, n/(p*t), a*n/(p*t),
(a/1e6)*(n/1e6)/(p*t/ts/3600), (p*t/ts/3600)/((a/1e6)*(n/1e6)))}'
p=$PROCS a=$ATOMS ts=$TS
    grep "^TIMING" $FILE | tail -n 1 | awk '{printf("steps=%d
simtime=%.4f ns walltime=%d sec (%.2f hrs) steps/hr=%.1f
ns/day=%.4f\n", $2-fts, ts*($2-fts)/1000000, $7, $7/3600,
($2-fts)*3600/$7, (ts*($2-fts)/1000000)/($7/(24*3600)))}' fts=$FIRSTTS
ts=$TS
    echo
done

–––––––––––––––––––––––––––––––––––———————
Jeffrey Comer, PhD
Assistant Professor
Institute of Computational Comparative Medicine
Nanotechnology Innovation Center of Kansas State
Kansas State University
Office: P-213 Mosier Hall
Phone: 785-532-6311

On Tue, Dec 2, 2014 at 5:45 PM, Kshatresh Dutta Dubey
<kshatresh_at_gmail.com> wrote:
> Hi,
>
> I am using Nvidia GTX 680 gpu for namd (cuda version) run but simulation
> speed, as it shows 0.496354 days/ns (~2ns/day) while system has almost 54000
> atoms including solvent. Isn't it very slow? Please suggest me to get proper
> benchmark.
>
> Regards
> Kshatresh
>
> On Wed, Dec 3, 2014 at 1:35 AM, Kshatresh Dutta Dubey <kshatresh_at_gmail.com>
> wrote:
>>
>> Thanks...I got.
>>
>> On Wed, Dec 3, 2014 at 1:08 AM, Josh Vermaas <vermaas2_at_illinois.edu>
>> wrote:
>>>
>>> Grep around for a "Benchmark" line. They are there.
>>> -Josh
>>>
>>>
>>> On 12/02/2014 05:04 PM, Kshatresh Dutta Dubey wrote:
>>>
>>> Yes, but I found like :
>>>
>>> WallClock: 569.721008 CPUTime: 569.721008 Memory: 128.992188 MB,
>>>
>>> Can we get information in simulation time like ns/day or ps/day?
>>>
>>> On Wed, Dec 3, 2014 at 12:53 AM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>>> wrote:
>>>>
>>>> On Tue, Dec 2, 2014 at 5:50 PM, Kshatresh Dutta Dubey
>>>> <kshatresh_at_gmail.com> wrote:
>>>> > Dear User,
>>>> >
>>>> > Is there any way to get the information about the simulation speed in
>>>> > namd?
>>>> > I know some package like amber prints the speed of simulation in
>>>> > mdout.
>>>>
>>>> have you looked at the NAMD output???
>>>>
>>>> >
>>>> > Regards
>>>> > Kshatresh
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>>>> College of Science & Technology, Temple University, Philadelphia PA, USA
>>>> International Centre for Theoretical Physics, Trieste. Italy.
>>>
>>>
>>>
>>>
>>> --
>>> With best regards
>>>
>>> ************************************************************************************************
>>> Kshatresh Dutta Dubey
>>> Post Doctoral Researcher,
>>> Lise Meitner Center for Computational Quantum Chemistry
>>> Hebrew University of Jerusalem Israel
>>> Jerusalem, Israel
>>>
>>>
>>>
>>
>>
>>
>> --
>> With best regards
>>
>> ************************************************************************************************
>> Kshatresh Dutta Dubey
>> Post Doctoral Researcher,
>> Lise Meitner Center for Computational Quantum Chemistry
>> Hebrew University of Jerusalem Israel
>> Jerusalem, Israel
>>
>>
>
>
>
> --
> With best regards
> ************************************************************************************************
> Kshatresh Dutta Dubey
> Post Doctoral Researcher,
> Lise Meitner Center for Computational Quantum Chemistry
> Hebrew University of Jerusalem Israel
> Jerusalem, Israel
>
>

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:23:05 CST