<div><br class="Apple-interchange-newline">That way of calling CMake triggers an interesting bug in the option generator and CFLAGS will essentially override part of the auto-generated compiler options. Diff of relevant lines in CMakeCache.txt are below, the only difference is that the second file (&quot;+&quot; in the diff) was generated by running &quot;CFLAGS=-march=native cmake...&quot;:</div>
<div><br></div><div><div> //Flags used by the compiler during all build types</div><div>-CMAKE_C_FLAGS:STRING=&#39;-msse2  -Wall -Wno-unused -Wunused-value  &#39;</div><div>+CMAKE_C_FLAGS:STRING=&#39;-msse2  -march=native &#39;</div>
<div> </div><div> //Flags used by the compiler during debug builds.</div><div>-CMAKE_C_FLAGS_DEBUG:STRING=-fno-inline  -g</div><div>+CMAKE_C_FLAGS_DEBUG:STRING=-g</div></div><div> </div><div><div>-//Flags used by the compiler during release builds.</div>
<div>-CMAKE_C_FLAGS_RELEASE:STRING=-fomit-frame-pointer -funroll-all-loops -fexcess-precision=fast  -O3 -DNDEBUG</div><div>+//Flags used by the compiler during release builds (/MD /Ob1 /Oi</div><div>+// /Ot /Oy /Gs will produce slightly less optimized but smaller</div>
<div>+// files).</div><div>+CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG</div></div><div><br></div><div>As this messes with &quot;considered to be best basic set of options&quot;, we could state that CFLAGS should not be used, but it might be a better alternative to make the configuration prepend the CFLAG to the CMAKE_C_FLAGS and keep our generated set of flags as well.</div>
<div><br></div><div>I&#39;m not sure which options is best. Thoughts?</div><div><br></div>--<br>Szilárd<br>
<br><br><div class="gmail_quote">On Wed, Oct 17, 2012 at 10:12 PM, Jochen Hub <span dir="ltr">&lt;<a href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
many thanks for the help. I now compiled with gcc 4.7 and with manually adding export CFLAGS=-mfma4 (that is what you meant, right?). Now the warning does not appear any more.<br>
<br>
I am not sure though how Gromacs performed on this hardware using these settings, as the AVX kernels are apparently not in release-4.6.<br>
<br>
Thanks,<br>
Jochen<br>
<br>
<br>
Am 10/17/12 5:12 PM, schrieb Szilárd Páll:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Wed, Oct 17, 2012 at 4:46 PM, Berk Hess &lt;<a href="mailto:hess@kth.se" target="_blank">hess@kth.se</a><br></div><div class="im">
&lt;mailto:<a href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>&gt;&gt; wrote:<br>
<br>
    Hi,<br>
<br>
    Apparently icc can compile the code, so than it&#39;s not strange that<br>
    you end up in this situation. But we should avoid this from happening.<br>
    SSE4.1 would be the next supported level, but you really want the<br>
    vex instructions and not plain SSE, as the latter is much slower.<br>
<br>
<br>
AMD explicitly states that only up to -msse3 should be used on Bulldozer<br>
and I have never tried to generate SSE4.1 instructions with icc and run<br>
it on AMD. I would not be surprised if it didn&#39;t work.<br>
<br>
--<br>
Szilárd<br>
<br>
    The best thing would be to use gcc, preferably 4.7.<br>
<br>
    Cheers,<br>
<br>
    Berk<br>
<br>
    ----- Reply message -----<br>
    From: &quot;Szilárd Páll&quot; &lt;<a href="mailto:szilard.pall@cbr.su.se" target="_blank">szilard.pall@cbr.su.se</a><br></div><div class="im">
    &lt;mailto:<a href="mailto:szilard.pall@cbr.su.se" target="_blank">szilard.pall@cbr.su.se</a><u></u>&gt;&gt;<br>
    To: &quot;Discussion list for GROMACS development&quot;<br></div><div class="im">
    &lt;<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a> &lt;mailto:<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@<u></u>gromacs.org</a>&gt;&gt;<br>
    Subject: [gmx-developers] warning Emulating FMA instructions - this<br>
    is probably not what you want!<br>
    Date: Wed, Oct 17, 2012 15:25<br>
<br>
<br>
    Hi,<br>
<br>
    First of all, as far as I know, the new icc 13 can not generate<br>
    AMD-compatible FMA4/XOP (v12 surely cant:<br>
    <a href="http://developer.amd.com/Assets/CompilerOptQuickRef-62004200.pdf" target="_blank">http://developer.amd.com/<u></u>Assets/CompilerOptQuickRef-<u></u>62004200.pdf</a>),<br>
    so I find it strange that you&#39;ve ended up with<br>
    GMX_ACCELERATION=AVX_128_FMA using an Intel compiler -- unless you<br>
    set the acceleration manually. To get FMA4 support you need to use a<br>
    recent gcc version, the newer the better. The Verlet kernels don&#39;t<br>
    benefit much from FMA4, so if you want to, you can use Intel<br>
    Compiler, but then you need to set the acceleration to SSE2 (max<br>
    SSE3 works, but we don&#39;t use these instructions).<br>
<br>
    On Wed, Oct 17, 2012 at 11:14 AM, Jochen Hub &lt;<a href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a><br></div><div class="im">
    &lt;mailto:<a href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>&gt;&gt; wrote:<br>
<br>
        Hi developers,<br>
<br>
        does anyone know how to interpret this icc warning:<br>
<br>
        [  8%]<br></div>
        /home/jhub/src/gromacs/__<u></u>include/gmx_x86_avx_128_fma.h(<u></u>__88):<div class="im"><br>
        warning #1224: #warning directive: Emulating FMA instructions -<br>
        this is probably not what you want!<br>
<br>
           #warning Emulating FMA instructions - this is probably not<br>
        what you want!<br>
<br>
<br>
    This warning is related to a bug in the build system, you&#39;ll need to<br>
    add the -mfma4 flag to the compiler flags manually.<br>
<br>
    --<br>
    Szilard<br>
<br>
<br>
        I am compiling 46-release on a Interlagos 6378 with OpenMPI and<br>
        icc 13.0.0 20120731. My cmake line is:<br>
<br>
        cmake $gmxsrc \<br></div>
             -DFFTW_LIBRARY=$FFTW_LOCATION/<u></u>__lib/libfftw3f.a \<br>
             -DFFTW3F_INCLUDE_DIR=$FFTW___<u></u>LOCATION/include \<br>
             -DFFTW3F_LIBRARIES=$FFTW___<u></u>LOCATION/lib/libfftw3f.a \<div class="im"><br>
             -DCMAKE_INSTALL_PREFIX=$(pwd) \<br>
             -DGMX_X11=OFF \<br>
             -DCMAKE_CXX_COMPILER=$MPICXX \<br>
             -DCMAKE_C_COMPILER=$MPICC \<br>
             -DGMX_MPI=ON \<br>
             -DGMX_PREFER_STATIC_LIBS=ON \<br>
             -DGMX_GPU=OFF<br>
<br>
        and cmake reported:<br>
<br>
        -- Performing Test GNU_AVX_CFLAG<br>
        -- Performing Test GNU_AVX_CFLAG - Success<br>
        -- Enabling 128-bit AVX Gromacs acceleration (with<br>
        fused-multiply add), and it will help compiler optimization.<br>
<br>
        Thanks a lot,<br>
        Jochen<br>
<br>
<br>
<br>
<br>
        --<br></div>
        ------------------------------<u></u>__---------------------<div class="im"><br>
        Dr. Jochen Hub<br>
        Computational Molecular Biophysics Group<br>
        Institute for Microbiology and Genetics<br>
        Georg-August-University of Göttingen<br>
        Justus-von-Liebig-Weg 11, 37077 Göttingen, Germany.<br></div>
        Phone: <a href="tel:%2B49-551-39-14189" value="+495513914189" target="_blank">+49-551-39-14189</a> &lt;tel:%2B49-551-39-14189&gt;<br>
        <a href="http://cmb.bio.uni-goettingen." target="_blank">http://cmb.bio.uni-goettingen.</a><u></u>__de/<br>
        &lt;<a href="http://cmb.bio.uni-goettingen.de/" target="_blank">http://cmb.bio.uni-<u></u>goettingen.de/</a>&gt;<br>
        ------------------------------<u></u>__---------------------<br>
        --<br>
        gmx-developers mailing list<br>
        <a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a> &lt;mailto:<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@<u></u>gromacs.org</a>&gt;<br>
        <a href="http://lists.gromacs.org/__mailman/listinfo/gmx-__developers" target="_blank">http://lists.gromacs.org/__<u></u>mailman/listinfo/gmx-__<u></u>developers</a><div class="im"><br>
        &lt;<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/<u></u>mailman/listinfo/gmx-<u></u>developers</a>&gt;<br>
        Please don&#39;t post (un)subscribe requests to the list. Use the<br></div>
        www interface or send it to gmx-developers-request@__<a href="http://gromacs.org" target="_blank">groma<u></u>cs.org</a><br>
        &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-<u></u>request@gromacs.org</a>&gt;.<br>
<br>
<br>
<br>
    --<br>
    gmx-developers mailing list<br>
    <a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a> &lt;mailto:<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@<u></u>gromacs.org</a>&gt;<div class="im">
<br>
    <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/<u></u>mailman/listinfo/gmx-<u></u>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@<u></u>gromacs.org</a><br></div>
    &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-<u></u>request@gromacs.org</a>&gt;.<br>
<br>
<br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
------------------------------<u></u>---------------------<br>
Dr. Jochen Hub<br>
Computational Molecular Biophysics Group<br>
Institute for Microbiology and Genetics<br>
Georg-August-University of Göttingen<br>
Justus-von-Liebig-Weg 11, 37077 Göttingen, Germany.<br>
Phone: <a href="tel:%2B49-551-39-14189" value="+495513914189" target="_blank">+49-551-39-14189</a><br>
<a href="http://cmb.bio.uni-goettingen.de/" target="_blank">http://cmb.bio.uni-goettingen.<u></u>de/</a><br>
------------------------------<u></u>---------------------<br>
</div></div></blockquote></div><br>