<div dir="ltr">Are you referring to the pdihs_noener_simd() function? <div><br></div><div>It seems that there is a &quot;#define SIMD_BONDEDS&quot; instruction that is just for this job? If I delete that line, does the SIMD functionality go away? If not, where exactly does the code decide whether to use SIMD functions? Can I disable SIMD selectively for dihedrals only?</div>
<div><br></div><div>Also, would it be preferable to use 4.6 and disable SIMD, or go back to 4.5 and do the hack over there, performance wise? I understand 4.5 has many native assembly loops, whereas 4.6 takes advantage of the compiler, so if I am going to disable SIMD, is it better to use the 4.5 version with native code? </div>
<div><br></div><div>I am probably going to be locked into 1 or 2 cores with this system, so I need to squeeze the maximum out of them. </div><div><br></div><div>Thanks</div><div><br></div><div>Murat</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Sep 26, 2013 at 10:02 AM, Berk Hess <span dir="ltr">&lt;<a href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>But note that in 4.6 with SIMD
      (SSE/AVX) enablebd, dihedrals mostly (when only forces, no
      energies are needed) get calculated by a special SIMD dihedral
      function. You will need modifiy the conditional such that the
      plain C function always gets called.<br>
      <br>
      Cheers,<br>
      <br>
      Berk<div><div class="h5"><br>
      <br>
      On 09/26/2013 08:04 AM, MURAT OZTURK wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
      <div dir="ltr">Thank you very much. I need to build a toy system
        to test it, but sounds just about right. I might even hard-code
        the square of threshold to save another flop, following your
        philosophy. A flop is a flop :)
        <div>
          <br>
        </div>
        <div>Again, thank you. </div>
        <div><br>
        </div>
        <div>Murat</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Sep 26, 2013 at 12:10 AM,
          Bogdan Costescu <span dir="ltr">&lt;<a href="mailto:bcostescu@gmail.com" target="_blank">bcostescu@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>On Wed, Sep 25, 2013 at 5:29 PM, MURAT
              OZTURK &lt;<a href="mailto:murozturk@ku.edu.tr" target="_blank">murozturk@ku.edu.tr</a>&gt;
              wrote:<br>
              &gt; Is it OK to intorduce the conditional into pdihs(),
              and bypass even calling<br>
              &gt; dopdihs() if r_kj  ( as reported by calling
              dih_angle() ) is less then<br>
              &gt; threshold?<br>
              <br>
            </div>
            Yes. It makes sense to abort calculating as soon as you have
            enough<br>
            information to make the decision. You can place your test
            immediately<br>
            after calling dih_angle(), as it gives you r_jk. The code
            could look<br>
            like (based on your own proposal):<br>
            <br>
            /* outside of the loop */<br>
            threshold2 = threshold * threshold;<br>
            <br>
            for (i = 0; (i &lt; nbonds); )<br>
            {<br>
              ...<br>
              phi = dih_angle(...)<br>
              midDist2 = iprod(r_jk, r_jk);<br>
              if (midDist2 &gt; threshold2)<br>
                continue;<br>
              ...<br>
            }<br>
            <br>
            Please note the comparison done on the squares of distances
            instead of<br>
            distances, saving some CPU cycles.<br>
            <br>
            Good luck!<br>
            <span><font color="#888888">Bogdan<br>
              </font></span>
            <div>
              <div>--<br>
                gmx-developers mailing list<br>
                <a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a><br>
                <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><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-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>--<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><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-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br></blockquote></div><br></div>