Hi,<br><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 3:20 PM, Renato Freitas <span dir="ltr">&lt;<a href="mailto:renatoffs@gmail.com">renatoffs@gmail.com</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
Do you think that the &quot;NODE&quot; and &quot;Real&quot; time difference could be<br>
attributed to some compilation problem in the mdrun-gpu. Despite I&#39;m<br>
asking this I didn&#39;t get any error in the compilation.<br></blockquote><div><br></div><div>It is very odd that these are different for you system. What operating system and compiler do you use? </div><div><br></div><div>

Is HAVE_GETTIMEOFDAY set in src/config.h? </div><div><br></div><div>I attached a small test program which uses the two different timers used for NODE and Real time. You can compile it with cc time.c -o time and run it with ./time. Do you get roughly the same time twice with the test program or do you see the same discrepancy as with GROMACS?</div>

<div><br></div><div>Roland</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks,<br>
<br>
Renato<br>
<br>
2010/10/22 Szilárd Páll &lt;<a href="mailto:szilard.pall@cbr.su.se">szilard.pall@cbr.su.se</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi Renato,<br>
&gt;<br>
&gt; First of all, what you&#39;re seeing is pretty normal, especially that you<br>
&gt; have a CPU that is crossing the border of insane :) Why is it normal?<br>
&gt; The PME algorithms are just simply not very well not well suited for<br>
&gt; current GPU architectures. With an ill-suited algorithm you won&#39;t be<br>
&gt; able to see the speedups you can often see in other application areas<br>
&gt; - -even more so that you&#39;re comparing to Gromacs on a i7 980X. For<br>
&gt; more info + benchmarks see the Gromacs-GPU page:<br>
&gt; <a href="http://www.gromacs.org/gpu" target="_blank">http://www.gromacs.org/gpu</a><br>
&gt;<br>
&gt; However, there is one strange thing you also pointed out. The fact<br>
&gt; that the &quot;NODE&quot; and &quot;Real&quot; time in your mdrun-gpu timing summary is<br>
&gt; not the same, but has 3x deviation is _very_ unusual. I&#39;ve ran<br>
&gt; mdrun-gpu on quite a wide variety of hardware but I&#39;ve never seen<br>
&gt; those two counter deviate. It might be an artifact from the cycle<br>
&gt; counters used internally that behave in an unusual way on your CPU.<br>
&gt;<br>
&gt; One other thing I should point out is that you would be better off<br>
&gt; using the standard mdrun which in 4.5 by default has thread-support<br>
&gt; and therefore will run on a single cpu/node without MPI!<br>
&gt;<br>
&gt; Cheers,<br>
&gt; --<br>
&gt; Szilárd<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Oct 21, 2010 at 9:18 PM, Renato Freitas &lt;<a href="mailto:renatoffs@gmail.com">renatoffs@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Hi gromacs users,<br>
&gt;&gt;<br>
&gt;&gt; I have installed the lastest version of gromacs (4.5.1) in an i7 980X<br>
&gt;&gt; (6 cores or 12 with HT on; 3.3 GHz) with 12GB of RAM and compiled its<br>
&gt;&gt; mpi version. Also I compiled the GPU-accelerated<br>
&gt;&gt; version of gromacs. Then I did a  2 ns simulation using a small system<br>
&gt;&gt; (11042 atoms)  to compare the performance of mdrun-gpu vs mdrun_mpi.<br>
&gt;&gt; The results that I got are bellow:<br>
&gt;&gt;<br>
&gt;&gt; ############################################<br>
&gt;&gt; My *.mdp is:<br>
&gt;&gt;<br>
&gt;&gt; constraints         =  all-bonds<br>
&gt;&gt; integrator          =  md<br>
&gt;&gt; dt                  =  0.002    ; ps !<br>
&gt;&gt; nsteps              =  1000000  ; total 2000 ps.<br>
&gt;&gt; nstlist             =  10<br>
&gt;&gt; ns_type             =  grid<br>
&gt;&gt; coulombtype    = PME<br>
&gt;&gt; rvdw                = 0.9<br>
&gt;&gt; rlist               = 0.9<br>
&gt;&gt; rcoulomb            = 0.9<br>
&gt;&gt; fourierspacing      = 0.10<br>
&gt;&gt; pme_order           = 4<br>
&gt;&gt; ewald_rtol          = 1e-5<br>
&gt;&gt; vdwtype             =  cut-off<br>
&gt;&gt; pbc                 =  xyz<br>
&gt;&gt; epsilon_rf    =  0<br>
&gt;&gt; comm_mode           =  linear<br>
&gt;&gt; nstxout             =  1000<br>
&gt;&gt; nstvout             =  0<br>
&gt;&gt; nstfout             =  0<br>
&gt;&gt; nstxtcout           =  1000<br>
&gt;&gt; nstlog              =  1000<br>
&gt;&gt; nstenergy           =  1000<br>
&gt;&gt; ; Berendsen temperature coupling is on in four groups<br>
&gt;&gt; tcoupl              = berendsen<br>
&gt;&gt; tc-grps             = system<br>
&gt;&gt; tau-t               = 0.1<br>
&gt;&gt; ref-t               = 298<br>
&gt;&gt; ; Pressure coupling is on<br>
&gt;&gt; Pcoupl = berendsen<br>
&gt;&gt; pcoupltype = isotropic<br>
&gt;&gt; tau_p = 0.5<br>
&gt;&gt; compressibility = 4.5e-5<br>
&gt;&gt; ref_p = 1.0<br>
&gt;&gt; ; Generate velocites is on at 298 K.<br>
&gt;&gt; gen_vel = no<br>
&gt;&gt;<br>
&gt;&gt; ########################<br>
&gt;&gt; RUNNING GROMACS ON GPU<br>
&gt;&gt;<br>
&gt;&gt; mdrun-gpu -s topol.tpr -v &gt; &amp; out &amp;<br>
&gt;&gt;<br>
&gt;&gt; Here is a part of the md.log:<br>
&gt;&gt;<br>
&gt;&gt; Started mdrun on node 0 Wed Oct 20 09:52:09 2010<br>
&gt;&gt; .<br>
&gt;&gt; .<br>
&gt;&gt; .<br>
&gt;&gt;     R E A L   C Y C L E   A N D   T I M E   A C C O U N T I N G<br>
&gt;&gt;<br>
&gt;&gt;  Computing:     Nodes   Number          G-Cycles        Seconds     %<br>
&gt;&gt; ------------------------------------------------------------------------------------------------------<br>
&gt;&gt;  Write traj.    1               1021                    106.075 31.7            0.2<br>
&gt;&gt;  Rest                   1               64125.577               19178.6 99.8<br>
&gt;&gt; ------------------------------------------------------------------------------------------------------<br>
&gt;&gt;  Total          1               64231.652               19210.3 100.0<br>
&gt;&gt; ------------------------------------------------------------------------------------------------------<br>
&gt;&gt;<br>
&gt;&gt;                        NODE (s)                Real (s)                (%)<br>
&gt;&gt;       Time:    6381.840                19210.349               33.2<br>
&gt;&gt;                       1h46:21<br>
&gt;&gt;                        (Mnbf/s)   (MFlops)     (ns/day)        (hour/ns)<br>
&gt;&gt; Performance:    0.000   0.001   27.077  0.886<br>
&gt;&gt;<br>
&gt;&gt; Finished mdrun on node 0 Wed Oct 20 15:12:19 2010<br>
&gt;&gt;<br>
&gt;&gt; ########################<br>
&gt;&gt; RUNNING GROMACS ON MPI<br>
&gt;&gt;<br>
&gt;&gt; mpirun -np 6 mdrun_mpi -s topol.tpr -npme 3 -v &gt; &amp; out &amp;<br>
&gt;&gt;<br>
&gt;&gt; Here is a part of the md.log:<br>
&gt;&gt;<br>
&gt;&gt; Started mdrun on node 0 Wed Oct 20 18:30:52 2010<br>
&gt;&gt;<br>
&gt;&gt;     R E A L   C Y C L E   A N D   T I M E   A C C O U N T I N G<br>
&gt;&gt;<br>
&gt;&gt;  Computing:             Nodes   Number  G-Cycles    Seconds             %<br>
&gt;&gt; --------------------------------------------------------------------------------------------------------------<br>
&gt;&gt;  Domain decomp. 3              100001     1452.166      434.7             0.6<br>
&gt;&gt;  DD comm. load          3              10001        0.745          0.2<br>
&gt;&gt;       0.0<br>
&gt;&gt;  Send X to PME         3              1000001    249.003       74.5<br>
&gt;&gt;          0.1<br>
&gt;&gt;  Comm. coord.           3              1000001   637.329        190.8<br>
&gt;&gt;          0.3<br>
&gt;&gt;  Neighbor search        3              100001     8738.669      2616.0<br>
&gt;&gt;         3.5<br>
&gt;&gt;  Force                       3              1000001   99210.202<br>
&gt;&gt; 29699.2        39.2<br>
&gt;&gt;  Wait + Comm. F       3              1000001   3361.591       1006.3         1.3<br>
&gt;&gt;  PME mesh               3              1000001   66189.554     19814.2<br>
&gt;&gt;       26.2<br>
&gt;&gt;  Wait + Comm. X/F    3              60294.513 8049.5          23.8<br>
&gt;&gt;  Wait + Recv. PME F 3              1000001    801.897        240.1           0.3<br>
&gt;&gt;  Write traj.                 3              1015         33.464<br>
&gt;&gt;  10.0             0.0<br>
&gt;&gt;  Update                     3              1000001    3295.820<br>
&gt;&gt; 986.6          1.3<br>
&gt;&gt;  Constraints              3              1000001     6317.568<br>
&gt;&gt; 1891.2          2.5<br>
&gt;&gt;  Comm. energies       3              100002      70.784          21.2<br>
&gt;&gt;           0.0<br>
&gt;&gt;  Rest                        3                              2314.844<br>
&gt;&gt;    693.0           0.9<br>
&gt;&gt; --------------------------------------------------------------------------------------------------------------<br>
&gt;&gt;  Total                        6              252968.148    75727.5<br>
&gt;&gt;                 100.0<br>
&gt;&gt; --------------------------------------------------------------------------------------------------------------<br>
&gt;&gt; --------------------------------------------------------------------------------------------------------------<br>
&gt;&gt;  PME redist. X/F        3              2000002    1945.551      582.4<br>
&gt;&gt;          0.8<br>
&gt;&gt;  PME spread/gather   3              2000002    37219.607    11141.9        14.7<br>
&gt;&gt;  PME 3D-FFT            3              2000002    21453.362     6422.2<br>
&gt;&gt;        8.5<br>
&gt;&gt;  PME solve               3              1000001     5551.056<br>
&gt;&gt; 1661.7           2.2<br>
&gt;&gt; --------------------------------------------------------------------------------------------------------------<br>
&gt;&gt;<br>
&gt;&gt; Parallel run - timing based on wallclock.<br>
&gt;&gt;<br>
&gt;&gt;                        NODE (s)         Real (s)                    (%)<br>
&gt;&gt;       Time:    12621.257       12621.257           100.0<br>
&gt;&gt;                       3h30:21<br>
&gt;&gt;                        (Mnbf/s)           (GFlops)                (ns/day)              (hour/ns)<br>
&gt;&gt; Performance:    388.633            28.773          13.691         1.753<br>
&gt;&gt; Finished mdrun on node 0 Wed Oct 20 22:01:14 2010<br>
&gt;&gt;<br>
&gt;&gt; ######################################<br>
&gt;&gt; Comparing the performance values for the two simulations I saw that in<br>
&gt;&gt; &quot;numeric terms&quot; the simulation using the GPU gave (for example) ~27<br>
&gt;&gt; ns/day, while when I used  mpi this value is aproximatelly half (13.7<br>
&gt;&gt; ns/day).<br>
&gt;&gt; However, when I compared the time that each simulation<br>
&gt;&gt; started/finished, the simulation using mpi tooks 211 minutes while the<br>
&gt;&gt; gpu simulation tooked 320 minutes to finish.<br>
&gt;&gt;<br>
&gt;&gt; My questions are:<br>
&gt;&gt;<br>
&gt;&gt; 1. Why in the performace values I got better results with the GPU?<br>
&gt;&gt;<br>
&gt;&gt; 2. Why the simulation running on GPU was 109 min. slower than on 6<br>
&gt;&gt; cores, since my video card is a GTX 480 with 480 gpu cores? I was<br>
&gt;&gt; expecting that the GPU would accelerate greatly the simulations.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Does anyone have some idea?<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt;<br>
&gt;&gt; Renato<br>
&gt;&gt; --<br>
&gt;&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt;&gt; Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt;&gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt;&gt; Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt;<br>
&gt; --<br>
&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt; Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt; Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;<br>
</div></div>--<br>
<div><div></div><div class="h5">gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>