<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div dir="ltr" class="gmail_signature">On Thu, Apr 25, 2019 at 12:21 PM Mahmood Naderan &lt;<a href="mailto:nt_mahmood@yahoo.com">nt_mahmood@yahoo.com</a>&gt; wrote:<br></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-852978352894065041ydpf4147f18yahoo-style-wrap" style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div><div>Thanks Szilard,</div><div><br></div><div>I looked at that. It seems that it is a big GPU kernel and specific parts of it are executed using #ifdef macros and those are actually enabled whenever it is needed in <a href="http://nbnxn_cuda.cu" target="_blank">nbnxn_cuda.cu</a>.</div></div></div></div></blockquote><div><br></div><div>Not really. Combinations of LJ and Coulomb flavors as well input/output functionalities (force, force and energy, pruning) are all generated and compiled into the binary. Selection happens at runtime, see in nbnxn_cuda.cu:select_nbnxn_kernel().</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-852978352894065041ydpf4147f18yahoo-style-wrap" style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div><div>However, the names are still vague for me. For example, I assume that the FUNC_NAME is something like <span><span>ElecEw_VdwLJCombLB_F</span></span> but grepping even *LJComb* shows no match.</div></div></div></div></blockquote><div><br></div><div>It should show up; this a common component of the short-range pair interaction kernel over all architectures, CPU and GPU, so it will be all over the place in the nbnxn module. Try &quot;git grep LJComb&quot;.</div><div><br></div><div>The CUDA kernel generation happens in src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-852978352894065041ydpf4147f18yahoo-style-wrap" style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div><div>Instead I see &quot;<span>#ifndef LJ_COMB</span>&quot;. I would like to know which part of the kernel is used for <span><span><span>ElecEw_VdwLJCombLB_F?</span></span></span></div></div></div></div></blockquote><div><br></div><div>See the mapping of macros to filenames in the above file.</div><div><br></div><div>Let me know if something is still unclear.</div><div><br></div><div>Cheers,</div>--<br>Szilárd<br class="gmail-Apple-interchange-newline"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-852978352894065041ydpf4147f18yahoo-style-wrap" style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div><div><br></div><div><br></div><div><br></div><div class="gmail-m_-852978352894065041ydpf4147f18signature">Regards,<br>Mahmood</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="gmail-m_-852978352894065041yahoo_quoted_6265137473" class="gmail-m_-852978352894065041yahoo_quoted">
            <div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Thursday, April 25, 2019, 1:29:46 PM GMT+4:30, Szilárd Páll &lt;<a href="mailto:pall.szilard@gmail.com" target="_blank">pall.szilard@gmail.com</a>&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="gmail-m_-852978352894065041yiv3132218080"><div><div dir="ltr"><div dir="ltr"><div>Hi Mahmood,</div><div><br clear="none"></div><div>The kernels are preprocessor-generated, including the kernel names (see NB_KERNEL_FUNC_NAME() macro); the common source code is in src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh.<br clear="none"></div><div><br clear="none"></div><div>Cheers,<br clear="none"></div><div><div><div class="gmail-m_-852978352894065041yiv3132218080gmail_signature" dir="ltr">--<br clear="none">Szilárd</div></div><br clear="none"></div></div></div><br clear="none"><div class="gmail-m_-852978352894065041yiv3132218080gmail_quote"><div class="gmail-m_-852978352894065041yiv3132218080yqt0801659908" id="gmail-m_-852978352894065041yiv3132218080yqt30938"><div class="gmail-m_-852978352894065041yiv3132218080gmail_attr" dir="ltr">On Wed, Apr 24, 2019 at 7:24 PM Mahmood &lt;<a rel="nofollow" shape="rect" href="mailto:nt_mahmood@yahoo.com" target="_blank">nt_mahmood@yahoo.com</a>&gt; wrote:<br clear="none"></div><blockquote class="gmail-m_-852978352894065041yiv3132218080gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-852978352894065041yiv3132218080gmail-m_7309833779300565241ydp9338e8dayahoo-style-wrap" style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div><div>Hi,</div><div><br clear="none"></div><div>How can I see the code of a GPU kernel named <span>nbnxn_kernel_ElecEw_VdwLJCombLB_F_cuda?</span></div><div><span><br clear="none"></span></div><div><span>That exists in src<span>/gromacs/mdlib/nbnxn_cuda/<a rel="nofollow" shape="rect" href="http://nbnxn_cuda.cu" target="_blank">nbnxn_cuda.cu</a></span> however, I can not find its implementation. <br clear="none"></span></div><div><span><br clear="none"></span></div><div><span>Can someone help?</span></div><div><span><br clear="none"></span></div><div><span><br clear="none"></span></div><div><br clear="none"></div><div class="gmail-m_-852978352894065041yiv3132218080gmail-m_7309833779300565241ydp9338e8dasignature">Regards,<br clear="none">Mahmood</div></div></div></div>-- <br clear="none">
Gromacs Developers mailing list<br clear="none">
<br clear="none">
* Please search the archive at <a rel="nofollow" shape="rect" href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br clear="none">
<br clear="none">
* Can&#39;t post? Read <a rel="nofollow" shape="rect" href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br clear="none">
<br clear="none">
* For (un)subscribe requests visit<br clear="none">
<a rel="nofollow" shape="rect" href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a rel="nofollow" shape="rect" href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div></div></div></div></div>
            </div>
        </div></div></blockquote></div></div></div></div></div></div>