<div dir="ltr">Hi,<br><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 17, 2018 at 8:21 AM David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Den 2018-11-16 kl. 23:26, skrev Erik Lindahl:<br>
&gt; I think that would kill performance. Tables are very sensitive to memory trashing (since they easily exhaust cache) so we want to keep the number as low as humanly possible. Similarly, for the verlet kernels it will likely be reasonably efficient to do 4x4 lookups for distances that are similar, but very bad to have to load 4x4 different tables.<br>
This is why I proposed to have one table per neighborlist, but have many <br>
neighborlists. This keeps the innerloops simpler.<br></blockquote><div><br></div><div>That would avoid thrashing between tables, but might use the coordinates less efficiently. Probably useful though, depending on the number of tables and how many interactions each has.</div><div> </div><div>&gt; Also having one table for Van der Waals rather than two, and not having </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
to look up the C6 and C12 should help a bit.<br>
&gt; <br>
&gt; Tables are simply not very compatible with SIMD, although it’s a bit better with GPUs. But, overall I think It might be worth more looking into dynamically compiled analytical functions - processors are getting so fast that flops are almost free, but memory access painful.<br>
It depends on the analytical function :) If using Slaters they may end <br>
up being a couple of thousand lines of code.<br>
<br>
Finally, if flops are almost free, what is the problem with using sqrt <br>
instead of invsqrt, in particular for table lookups?<br></blockquote><div><br></div><div>Use r-squared then :-D</div><div><br></div><div>Mark</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; <br>
&gt; Cheers,<br>
&gt; <br>
&gt; Erik<br>
&gt; <br>
&gt; --<br>
&gt; Erik Lindahl &lt;<a href="mailto:erik.lindahl@scilifelab.se" target="_blank">erik.lindahl@scilifelab.se</a>&gt;<br>
&gt; Professor of Biophysics<br>
&gt; Science for Life Laboratory<br>
&gt; Stockholm University &amp; KTH<br>
&gt; Office (SciLifeLab): <a href="tel:08-524%20815%2067" value="+46852481567" target="_blank">+46 8 524 81567</a><br>
&gt; Cell (Sweden): <a href="tel:073-461%2080%2050" value="+46734618050" target="_blank">+46 73 4618050</a><br>
&gt; Cell (US): 1 267 307 8746<br>
&gt; <br>
&gt; <br>
&gt;&gt; On Nov 16, 2018, at 11:10 PM, David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Den 2018-11-14 kl. 09:11, skrev Berk Hess:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt; I don&#39;t really think we need a usecase, but more people motivated to work on it.<br>
&gt;&gt;&gt; We have delayed the work also because we are waiting for a new non-bonded kernel structure. But we just as well start without that, since it will not take much work to port the additional tabulated kernels to a new framework.<br>
&gt;&gt;&gt; What is a dependency is a selecting the table index based on atom type (pairs). We want to get rid of the (mis)use of energy groups for this purpose in the group scheme.<br>
&gt;&gt;<br>
&gt;&gt; We can even do some small optimizations: if we have tables based on atomtype pairs, we do not need separate dispersion and repulsion tables anymore and we can put the force constants in the table as well. Although the large amount of tables will make it memory inefficient, the inner loop will be simpler. One could also make one neighborlist per atomtype pair, such that only one table goes to the innerloop and no atomtypes have to be looked up either. Of course the neighborlists would be shorter.<br>
&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt; Berk<br>
&gt;&gt;&gt;&gt; On 13/11/2018 23.53, Mark Abraham wrote:<br>
&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Not much has happened. I did some basic cleanup, and Erik has worked on some table classes in src/gromacs/tables. Alfredo has some old GPU kernels buried somewhere on Gerrit.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; It would be good to identify a use case that someone has interest in to e.g. contribute coding time, test cases, design idea sounding board. AFAIK none of the GROMACS core developers uses this feature, so their priorities tend to align elsewhere. However, we know it&#39;s useful to people, so we&#39;d like to find a group that can work together to make it happen!<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Some of those dot points are a bit out of date, but the general list of things to do is about right.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Mark<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Tue, Nov 13, 2018 at 3:48 PM Adriaan Riet &lt;<a href="mailto:adriaan.riet@case.edu" target="_blank">adriaan.riet@case.edu</a> &lt;mailto:<a href="mailto:adriaan.riet@case.edu" target="_blank">adriaan.riet@case.edu</a>&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     Hello everyone,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     I know that Feature #1347 talks about the necessary steps to get<br>
&gt;&gt;&gt;&gt;     tables into Verlet (pasted below). I&#39;m curious to know where this<br>
&gt;&gt;&gt;&gt;     sits. I&#39;m happy to contribute where (if) I can, but don&#39;t see<br>
&gt;&gt;&gt;&gt;     clearly where to jump in. Have the points of the list been<br>
&gt;&gt;&gt;&gt;     integrated into redmine feature requests? Have any of these been<br>
&gt;&gt;&gt;&gt;     implemented yet?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     Thanks,<br>
&gt;&gt;&gt;&gt;     Adriaan Riet<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     Things to do (roughly in order):<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;       * support regressiontests being able to read tables from grompp<br>
&gt;&gt;&gt;&gt;         or mdrun, so that new functionality in the code doesn&#39;t need<br>
&gt;&gt;&gt;&gt;         matching changes to the other repo for valid testing in the<br>
&gt;&gt;&gt;&gt;         few cases where they use tables (|*CSTab*| in group-scheme<br>
&gt;&gt;&gt;&gt;         kernels)<br>
&gt;&gt;&gt;&gt;       * add integration tests, e.g. a Martini-style(?) non-bonded, and<br>
&gt;&gt;&gt;&gt;         several kinds of bonded interactions<br>
&gt;&gt;&gt;&gt;       * extract code from mdlib (particularly init_forcerec) so that<br>
&gt;&gt;&gt;&gt;         it is callable at grompp time, make sure grompp can issue all<br>
&gt;&gt;&gt;&gt;         notes and warnings, permit mdrun to repeat any of those that<br>
&gt;&gt;&gt;&gt;         it might need to. Keep code for making hardware-specific<br>
&gt;&gt;&gt;&gt;         layout decisions in mdrun, because we won&#39;t know whether the<br>
&gt;&gt;&gt;&gt;         kernels need tables for CPUs or GPUs until then. If we can do<br>
&gt;&gt;&gt;&gt;         it without significant loss of accuracy, grompp should handle<br>
&gt;&gt;&gt;&gt;         any regularization of the user input (e.g. by constructing and<br>
&gt;&gt;&gt;&gt;         testing CPU and GPU tables, if necessary).<br>
&gt;&gt;&gt;&gt;       * move e.g. dihedral-interaction table reading to grompp, bump<br>
&gt;&gt;&gt;&gt;         .tpr version, write to .tpr, read in mdrun, add infrastructure<br>
&gt;&gt;&gt;&gt;         to support gmx check and gmx dump on new .tpr contents<br>
&gt;&gt;&gt;&gt;       * move angle- and bond-interaction table reading to grompp,<br>
&gt;&gt;&gt;&gt;         probably another .tpr version bump<br>
&gt;&gt;&gt;&gt;       * move short-range interaction tables to grompp for group scheme<br>
&gt;&gt;&gt;&gt;       * extend |[pairs]| to permit atom-type pairs to use an<br>
&gt;&gt;&gt;&gt;         interaction shape read from a table, e.g. from a file named on<br>
&gt;&gt;&gt;&gt;         that line of the topology. Should we have a per-pair-type<br>
&gt;&gt;&gt;&gt;         scaling parameter? Requirements for simulations that use only<br>
&gt;&gt;&gt;&gt;         user tables, and those that mix user tables with normal<br>
&gt;&gt;&gt;&gt;         short-ranged interaction types probably differ.<br>
&gt;&gt;&gt;&gt;       * add Verlet-scheme table-support infrastructure<br>
&gt;&gt;&gt;&gt;       * add CPU kernels (hopefully in new scheme)<br>
&gt;&gt;&gt;&gt;       * add GPU kernels (recycle from Alfredo&#39;s patch in gerrit)<br>
&gt;&gt;&gt;&gt;       * after some time passes and master branch rebases enough,<br>
&gt;&gt;&gt;&gt;         remove workaround from regressiontests (which is anyway only<br>
&gt;&gt;&gt;&gt;         needed for group-scheme kernel testing)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     --     Gromacs Developers mailing list<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     * Please search the archive at<br>
&gt;&gt;&gt;&gt;     <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a><br>
&gt;&gt;&gt;&gt;     before posting!<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     * For (un)subscribe requests visit<br>
&gt;&gt;&gt;&gt;     <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
&gt;&gt;&gt;&gt;     or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a><br>
&gt;&gt;&gt;&gt;     &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>&gt;.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; -- <br>
&gt;&gt; David van der Spoel, Ph.D., Professor of Biology<br>
&gt;&gt; Head of Department, Cell &amp; Molecular Biology, Uppsala University.<br>
&gt;&gt; Box 596, SE-75124 Uppsala, Sweden. Phone: <a href="tel:018-471%2042%2005" value="+46184714205" target="_blank">+46184714205</a>.<br>
&gt;&gt; <a href="http://www.icm.uu.se" rel="noreferrer" target="_blank">http://www.icm.uu.se</a><br>
&gt;&gt; -- <br>
&gt;&gt; Gromacs Developers mailing list<br>
&gt;&gt;<br>
&gt;&gt; * Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
&gt;&gt;<br>
&gt;&gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt;<br>
&gt;&gt; * For (un)subscribe requests visit<br>
&gt;&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">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" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
<br>
<br>
-- <br>
David van der Spoel, Ph.D., Professor of Biology<br>
Head of Department, Cell &amp; Molecular Biology, Uppsala University.<br>
Box 596, SE-75124 Uppsala, Sweden. Phone: <a href="tel:018-471%2042%2005" value="+46184714205" target="_blank">+46184714205</a>.<br>
<a href="http://www.icm.uu.se" rel="noreferrer" target="_blank">http://www.icm.uu.se</a><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" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div></div>