<div dir="ltr"><div>Hi,</div><div><br></div><div>Please don&#39;t reply to a digest, because that is confusing for everybody... (and for a mailing list with O(1) posts per day, in which you want to participate in discussion, please subscribe in non-digest mode!)</div><div><br></div>Vincent said<div><br><div>&gt; Hi, the <span style="font-size:12.8px">architecture of my machine is like CPU+GPU which are both on chip. I can use MPI but it will only use the &quot;CPU&quot; part of my machine. So I want to parallelize the hotspot by offload it to the &quot;GPU&quot; part. My idea is to do some modification on the code to split the nblist which is like the OpenMP version of the code. But for the lack of support of OpenMP, is there anyway to split the nblist while compiling with OpenMP=OFF? </span><br></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Such loops do O(100k) operations, which is far too small to think about accelerating with offloading to a device with maybe hundreds of cores, unless maybe your GPU shares L3 cache.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">You would do well to consider reading some of the published work about the parallelization of GROMACS, e.g. </span><span style="font-size:12.8000001907349px;line-height:19.2000007629395px"><a href="http://www.sciencedirect.com/science/article/pii/S0010465513001975">http://www.sciencedirect.com/science/article/pii/S0010465513001975</a>. There&#39;s already an OpenCL port in GROMACS, too.</span></div><div><span style="font-size:12.8000001907349px;line-height:19.2000007629395px"><br></span></div><div><span style="font-size:12.8000001907349px;line-height:19.2000007629395px">What is your objective? Why is parallelising GROMACS on some mystery hardware with neither SIMD nor OpenMP a good thing to do for someone learning about GROMACS?</span></div><div><span style="font-size:12.8000001907349px;line-height:19.2000007629395px"><br></span></div><div><span style="font-size:12.8000001907349px;line-height:19.2000007629395px">Mark</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 24, 2015 at 9:25 AM Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi,<br>
      <br>
      Why not simply use MPI parallelization?<br>
      <br>
      But what (exotic) architecture does not support OpenMP and SIMD?
      If you don&#39;t have SIMD, I would think it&#39;s not worth using it for
      production. You get great performance from a cheap Intel CPU +
      NVidia GPU machine.<br>
      <br>
      Cheers,<br>
      <br>
      Berk</div></div><div text="#000000" bgcolor="#FFFFFF"><div><br>
      <br>
      On 2015-11-24 06:05, Vinson Leung wrote:<br>
    </div></div><div text="#000000" bgcolor="#FFFFFF">
    <blockquote type="cite">
      
      <div dir="ltr">Hi everyone, I am new learner to Gromacs and I want
        to implement Gromacs in a multi-core CPU machine which is  for
        my research. Because the machine we use only support MPI (no
        openmp, no SIMD), so I profiled the MPI-only version of
        Gromacs-5.0.4 and found that the hotspot was nbnxn_kernel_ref()
        in src/gromacs/mdlib/nbnxn_kernel_ref.c which occupied 80% of
        the total running time. Naturally I want to accelerate the
        nbnxn_kernel_ref() by parallelization with multi-thread. After I
        simply make some analysis and found that the structure
        of nbnxn_kernel_ref() is like below:
        <div>========================================================</div>
        <div>for (nb = 0 ; nb &lt; nnbl; nb++)</div>
        <div>{</div>
        <div>......</div>
        <div>      for( n = 0 ; n &lt; nbl-&gt;nci ; n++ )  // defined
          in nbnxn_kernel_ref_outer.h</div>
        <div>      {</div>
        <div>      ....</div>
        <div>      }</div>
        <div>...h</div>
        <div>}</div>
        <div>========================================================</div>
        <div>So here is my quesion. When I compile with OpenMP=OFF, the
          value of nnbl is 1 during the runtime.  So  can I  parallelize
          the inner loop by just evenly separate the inner loop  (
          nbl-&gt;nci )  to multi-core? </div>
        <div>Or I found that when I compile with OpenMP=ON the value of
          nnbl is not 1 which I can parallelize the outer loop with
          multi-thread. But my machine does not support OpenMP. So is
          there any way to make some modification in the code and
          compile with OpenMP=OFF to make the value of nnbl is not 1?</div>
        <div>Thanks.</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div>

--<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>