<div dir='auto'>Hi,<div dir="auto"><br></div><div dir="auto">An i9-7940X has slightly more than 1 TFLOPS peak in double precision.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto">Berk</div><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Jul 24, 2019 19:19, James &lt;james@ryley.com&gt; wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Thanks for all the information. Unless I am misunderstanding the numbers, yes, compared to single precision, the GeForce cards are awful (about 1/30th of single precision performance). That being said, because single precision speed is absurdly high, the GeForce 1080 Ti still provides 330-350 GFLOPS in double. In comparison, the i9-7940X provides about 60 GFLOPS in double according to the benchmarks I've seen (<a href="https://ranker.sisoftware.co.uk/top_device.php?q=c2ffc9f1d7bad7eaccbe83b395fcc1f0d6be83b690e8d5e4c2a7c2ffcfe1d4f281bc8c&amp;l=en">https://ranker.sisoftware.co.uk/top_device.php?q=c2ffc9f1d7bad7eaccbe83b395fcc1f0d6be83b690e8d5e4c2a7c2ffcfe1d4f281bc8c&amp;l=en</a>). So, assuming the processor can keep the GPU fed, even the "awful" performance of the GeForce 1080 Ti would be like adding ~5 CPUs.</div><div><br></div><div>If you were to move to the Volta-based cards, their double precision performance is in the 6 - 7.4 TFLOP range, or 100X faster than a high-end i9 (and presumably way beyond what you could get from a dual or quad Xeon system). Granted, the Volta cards are expensive, but if you want a whole cluster in a box, it seems like a pretty good deal. (Again, if the processor can keep the GPU fed -- I have no idea if you could actually realize anywhere near a 100X speedup).</div><div><br></div><div>Either of these scenarios seems pretty good to me -- unless the processor cannot keep the GPU fed.</div><div><br></div><div>Assuming that a substantial double precision speedup could be realized, I'd be interested in knowing if anyone on the list would like to implement this on a contract basis. If so, feel free to contact me directly.</div><div><br clear="all"><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr">Sincerely,<br>
          James&nbsp;<br></div></div></div></div><br></div></div><br><div class="elided-text"><div dir="ltr">On Wed, Jul 24, 2019 at 7:17 AM &lt;<a href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a>&gt; wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex">Send gromacs.org_gmx-developers mailing list submissions to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:gromacs.org_gmx-developers@maillist.sys.kth.se">gromacs.org_gmx-developers@maillist.sys.kth.se</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a><br>
<br>
You can reach the person managing the list at<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:gromacs.org_gmx-developers-owner@maillist.sys.kth.se">gromacs.org_gmx-developers-owner@maillist.sys.kth.se</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of gromacs.org_gmx-developers digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
&nbsp; &nbsp;1. Re: Double precision on GPU's (Szil?rd P?ll)<br>
&nbsp; &nbsp;2. Re: Double precision on GPU's (Berk Hess)<br>
&nbsp; &nbsp;3. Re: Double precision on GPU's (Erik Lindahl)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 24 Jul 2019 15:20:21 +0200<br>
From: Szil?rd P?ll &lt;<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a>&gt;<br>
To: Discussion list for GROMACS development<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a>&gt;<br>
Subject: Re: [gmx-developers] Double precision on GPU's<br>
Message-ID:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;CANnYEw7nm=36HCY29EXSRFZyYz8bcMZWM5L=<a href="mailto:pNd06PNehgKknw@mail.gmail.com">pNd06PNehgKknw@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
<br>
Indeed, a straight port without much performance optimization may not be a<br>
lot of effort, but integrating an additional kernel flavor into the<br>
existing codebase will mean added complexity which will probably require<br>
some refactoring and preliminary work to accommodate the new set of kernels<br>
without code duplication and avoiding introducing complexity or performance<br>
overhead in the current kernels.<br>
<br>
However also note that most NVIDIA consumer cards -- which are very widely<br>
used by our users -- have a 32x lower DP throughput than SP which is far<br>
more than what what most people would find acceptable, I'd say.<br>
<br>
--<br>
Szil?rd<br>
<br>
<br>
On Mon, Jul 22, 2019 at 10:28 PM Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; IIRC all Nvidia Tesla cards have always had double precision, at half the<br>
&gt; throughput of single precision. But there are very few cases where double<br>
&gt; precision is needed. Energy drift in single precision is never an issue,<br>
&gt; unless you really can not use a thermostat.<br>
&gt;<br>
&gt; But having said that, making the GPU code, either CUDA or OpenCL work in<br>
&gt; double precision is probably not much effort. But making it work<br>
&gt; efficiently requires optimizing several algorithmic parameters and maybe<br>
&gt; changing the arrangement of some data in the different GPU memory levels.<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Berk<br>
&gt;<br>
&gt; On 7/22/19 10:10 PM, James wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; My apologies if this question has been previously discussed. I just joined<br>
&gt; the list and all I know is that from reading the docs and release comments,<br>
&gt; writ ing code for double precision on GPU's is not a priority.<br>
&gt;<br>
&gt; However, I believe all recent upper-end Nvidia cards have native double<br>
&gt; precision (which was not true several generations ago). So, you don't have<br>
&gt; to have a real "scientific computing" GPU to take advantage of this -- most<br>
&gt; people probably already have the hardware. Still, I understand that most<br>
&gt; people do not need/want to run double precision. But, some do (and you have<br>
&gt; to if you are concerned with conservation of energy -- the energy drift in<br>
&gt; single precision is substantial).<br>
&gt;<br>
&gt; So, I would like to ask what the level of effort to do this is believed to<br>
&gt; be? Would it require a lot of new code, or would it be porting the single<br>
&gt; precision code to double precision?<br>
&gt;<br>
&gt; Sincerely,<br>
&gt; James<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Gromacs Developers mailing list<br>
&gt;<br>
&gt; * Please search the archive at<br>
&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
&gt; posting!<br>
&gt;<br>
&gt; * Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;<br>
&gt; * For (un)subscribe requests visit<br>
&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
&gt; or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190724/6b8b282e/attachment-0001.html">http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190724/6b8b282e/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 24 Jul 2019 15:25:53 +0200<br>
From: Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt;<br>
To: <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
Subject: Re: [gmx-developers] Double precision on GPU's<br>
Message-ID: &lt;<a href="mailto:e49ccd11-2dc5-1d52-efe7-e39299fcf436@kth.se">e49ccd11-2dc5-1d52-efe7-e39299fcf436@kth.se</a>&gt;<br>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"<br>
<br>
Hi,<br>
<br>
The energy conservation check can still be done with a thermostat, as <br>
GROMACS keeps track of the amount of energy the thermostat adds to or <br>
removes from the system.<br>
<br>
I don't understand what you mean exactly with "energy balance". Either <br>
you are interested in energy dissipation between different parts of the <br>
system, in which case you often can not use a thermostat, or you are not <br>
and then you can, and probably should, use a thermostat (and still keep <br>
track of energy conservation).<br>
<br>
Cheers,<br>
<br>
Berk<br>
<br>
On 2019-07-23 21:19 , James wrote:<br>
&gt; Hi Berk,<br>
&gt;<br>
&gt; Thank you for the information. I prefer not to use thermostats, at <br>
&gt; least when trying to get quantitative values, because (and I may be <br>
&gt; misunderstanding thermostats, but since changing the temperature <br>
&gt; changes the energy, I assume this is true) then I cannot use "energy <br>
&gt; in = energy out" as a sanity check. I'm more interested in energy <br>
&gt; balance than in maintaining a given temperature.<br>
&gt;<br>
&gt; If I were to be able to get the double precision GPU stuff coded, <br>
&gt; would the team be willing to maintain it? Or, since I don't know the <br>
&gt; code, perhaps a better question is: Does someone who is already <br>
&gt; familiar with the relevant code have time to do this as a side project <br>
&gt; (with compensation)? If anyone is interested, please feel free to <br>
&gt; contact me off list.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; James<br>
&gt;<br>
&gt; =======================================<br>
&gt; Hi,<br>
&gt;<br>
&gt; IIRC all Nvidia Tesla cards have always had double precision, at half<br>
&gt; the throughput of single precision. But there are very few cases where<br>
&gt; double precision is needed. Energy drift in single precision is never an<br>
&gt; issue, unless you really can not use a thermostat.<br>
&gt;<br>
&gt; But having said that, making the GPU code, either CUDA or OpenCL work in<br>
&gt; double precision is probably not much effort. But making it work<br>
&gt; efficiently requires optimizing several algorithmic parameters and maybe<br>
&gt; changing the arrangement of some data in the different GPU memory levels.<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Berk<br>
&gt;<br>
&gt; On 7/22/19 10:10 PM, James wrote:<br>
&gt; &gt;/Hi, /&gt;//&gt;/My apologies if this question has been previously discussed. I just /&gt;/joined the list and all I know is that from reading the docs and /&gt;/release comments, writing code for double precision on GPU's is not a /&gt;/priority. /&gt;//&gt;/However, I believe all recent upper-end Nvidia cards have native /&gt;/double precision (which was not true several generations ago). So, you /&gt;/don't have to have a real "scientific computing" GPU to take advantage /&gt;/of this -- most people probably already have the hardware. Still, I /&gt;/understand that most people do not need/want to run double precision. /&gt;/But, some do (and you have to if you are concerned with conservation /&gt;/of energy -- the energy drift in single precision is substantial). /&gt;//&gt;/So, I would like to ask what the level of effort to do this is /&gt;/believed to be? Would it require a lot of new code, or would it be /&gt;/porting the single precision code to double precision? /&gt;//&gt;/Sincerely, /&gt;/James /&gt;<br>
&gt;<br>
&gt;<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190724/54a798c7/attachment-0001.html">http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190724/54a798c7/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 24 Jul 2019 16:17:24 +0200<br>
From: Erik Lindahl &lt;<a href="mailto:erik.lindahl@gmail.com">erik.lindahl@gmail.com</a>&gt;<br>
To: <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
Subject: Re: [gmx-developers] Double precision on GPU's<br>
Message-ID: &lt;<a href="mailto:CF6EF0AC-6C50-4CC7-95EB-049E997C610B@gmail.com">CF6EF0AC-6C50-4CC7-95EB-049E997C610B@gmail.com</a>&gt;<br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hi,<br>
<br>
Just to add some minor things to what Berk already said:<br>
<br>
1. With current nvidia cards, for the Tesla line the double precision floprate is 50% of single. However, for the consumer cards it's only 1/8-1/12th. In practice the latter is so low that it's often better to run on the CPU instead. This is the main reason we haven't bothered with it yet - most academic labs use GeForce :-)<br>
<br>
2. You are likely well aware of this, but for users in general another problem with skipping thermostats for complex biophysical systems is that the potential energy often goes down as the system relaxes - which will make the temperature go up in an NVE ensemble.<br>
<br>
3. Having said that, I think it should be a fairly straightforward minor project for someone. It's probably mostly a matter of changing variable types so they compile to double if GMX_DOUBLE is set.<br>
<br>
Cheers,<br>
<br>
Erik<br>
<br>
Erik Lindahl &lt;<a href="mailto:erik.lindahl@scilifelab.se">erik.lindahl@scilifelab.se</a>&gt;<br>
Professor of Biophysics<br>
Science for Life Laboratory<br>
Stockholm University &amp; KTH<br>
Office (SciLifeLab): +46 8 524 81567<br>
Cell (Sweden): +46 73 4618050<br>
Cell (US): +1 (650) 924 7674 <br>
<br>
<br>
<br>
&gt; On 24 Jul 2019, at 15:25, Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt; wrote:<br>
&gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; The energy conservation check can still be done with a thermostat, as GROMACS keeps track of the amount of energy the thermostat adds to or removes from the system.<br>
&gt; <br>
&gt; I don't understand what you mean exactly with "energy balance". Either you are interested in energy dissipation between different parts of the system, in which case you often can not use a thermostat, or you are not and then you can, and probably should, use a thermostat (and still keep track of energy conservation).<br>
&gt; <br>
&gt; Cheers,<br>
&gt; <br>
&gt; Berk<br>
&gt; <br>
&gt;&gt; On 2019-07-23 21:19 , James wrote:<br>
&gt;&gt; Hi Berk,<br>
&gt;&gt; <br>
&gt;&gt; Thank you for the information. I prefer not to use thermostats, at least when trying to get quantitative values, because (and I may be misunderstanding thermostats, but since changing the temperature changes the energy, I assume this is true) then I cannot use "energy in = energy out" as a sanity check. I'm more interested in energy balance than in maintaining a given temperature.<br>
&gt;&gt; <br>
&gt;&gt; If I were to be able to get the double precision GPU stuff coded, would the team be willing to maintain it? Or, since I don't know the code, perhaps a better question is: Does someone who is already familiar with the relevant code have time to do this as a side project (with compensation)? If anyone is interested, please feel free to contact me off list.<br>
&gt;&gt; <br>
&gt;&gt; Thanks,<br>
&gt;&gt; James<br>
&gt;&gt; <br>
&gt;&gt; =======================================<br>
&gt;&gt; Hi,<br>
&gt;&gt; <br>
&gt;&gt; IIRC all Nvidia Tesla cards have always had double precision, at half <br>
&gt;&gt; the throughput of single precision. But there are very few cases where <br>
&gt;&gt; double precision is needed. Energy drift in single precision is never an <br>
&gt;&gt; issue, unless you really can not use a thermostat.<br>
&gt;&gt; <br>
&gt;&gt; But having said that, making the GPU code, either CUDA or OpenCL work in <br>
&gt;&gt; double precision is probably not much effort. But making it work <br>
&gt;&gt; efficiently requires optimizing several algorithmic parameters and maybe <br>
&gt;&gt; changing the arrangement of some data in the different GPU memory levels.<br>
&gt;&gt; <br>
&gt;&gt; Cheers,<br>
&gt;&gt; <br>
&gt;&gt; Berk<br>
&gt;&gt; <br>
&gt;&gt; On 7/22/19 10:10 PM, James wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; My apologies if this question has been previously discussed. I just <br>
&gt;&gt; &gt; joined the list and all I know is that from reading the docs and <br>
&gt;&gt; &gt; release comments, writing code for double precision on GPU's is not a <br>
&gt;&gt; &gt; priority.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; However, I believe all recent upper-end Nvidia cards have native <br>
&gt;&gt; &gt; double precision (which was not true several generations ago). So, you <br>
&gt;&gt; &gt; don't have to have a real "scientific computing" GPU to take advantage <br>
&gt;&gt; &gt; of this -- most people probably already have the hardware. Still, I <br>
&gt;&gt; &gt; understand that most people do not need/want to run double precision. <br>
&gt;&gt; &gt; But, some do (and you have to if you are concerned with conservation <br>
&gt;&gt; &gt; of energy -- the energy drift in single precision is substantial).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; So, I would like to ask what the level of effort to do this is <br>
&gt;&gt; &gt; believed to be? Would it require a lot of new code, or would it be <br>
&gt;&gt; &gt; porting the single precision code to double precision?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Sincerely,<br>
&gt;&gt; &gt; James<br>
&gt;&gt; &gt;<br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; Gromacs Developers mailing list<br>
&gt; <br>
&gt; * Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
&gt; <br>
&gt; * Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt; <br>
&gt; * For (un)subscribe requests visit<br>
&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190724/98915b6c/attachment.html">http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190724/98915b6c/attachment.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
-- <br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
<br>
End of gromacs.org_gmx-developers Digest, Vol 183, Issue 10<br>
***********************************************************<br>
</blockquote></div>
</blockquote></div><br></div></div>