<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">It seems that for many other packages
it does work, so we might want to comply with that.<br>
<br>
But here we seem to have another issue: -mfma4 was not added
automatically.<br>
CMakeLists.txt never checks for this. Did Erik simply forget to do
so?<br>
<br>
Cheers,<br>
<br>
Berk<br>
<br>
On 10/18/2012 01:01 PM, Szilárd Páll wrote:<br>
</div>
<blockquote
cite="mid:CANnYEw5u6ua76dVa2E6PVZRbiGfH+-5ULkWOa4P6tCkxFHDcbQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
That's correct. The point I was trying to make is that we might
end up hearing about this issue in the future if people use CFLAGS
just by routine. I fact, I'm not even sure that cmake is not
supposed to pick up CLAGS as well and it's some later cmake pass
rewriting compiler options is that the current code is trying to
overcome, but it ends up loosing some options when CFLAGS is set.
<div>
<br>
</div>
<div>Any comments? Should CFLAGS work?<br>
<div><br>
<div>--<br>
Szilárd<br>
<br>
<br>
<div class="gmail_quote">On Thu, Oct 18, 2012 at 9:43 AM,
Jochen Hub <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Following Szilard, I tried to use<br>
<br>
cmake -DCMAKE_C_FLAGS=-mfma4 ...<br>
<br>
instead of export CFLAGS=-mfma4 to add the -mfma4 flag.
Now, the only difference in CMakeCache.txt is<br>
<br>
< CMAKE_C_FLAGS:STRING='-mavx -Wall -Wno-unused
-Wunused-value '<br>
---<br>
> CMAKE_C_FLAGS:STRING=-mavx -Wall -Wno-unused
-Wunused-value -mfma4<br>
<br>
which is just what I wanted, right? (and the warning on
emulating FMA instructions does not appear any more).<br>
<br>
Jochen<br>
<br>
<br>
Am 10/17/12 11:28 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>
<div class="h5">
<br>
That way of calling CMake triggers an interesting
bug in the option<br>
generator and CFLAGS will essentially override
part of the<br>
auto-generated compiler options. Diff of relevant
lines in<br>
CMakeCache.txt are below, the only difference is
that the second file<br>
("+" in the diff) was generated by running
"CFLAGS=-march=native cmake...":<br>
<br>
//Flags used by the compiler during all build
types<br>
-CMAKE_C_FLAGS:STRING='-msse2 -Wall -Wno-unused
-Wunused-value '<br>
+CMAKE_C_FLAGS:STRING='-msse2 -march=native '<br>
//Flags used by the compiler during debug
builds.<br>
-CMAKE_C_FLAGS_DEBUG:STRING=-fno-inline -g<br>
+CMAKE_C_FLAGS_DEBUG:STRING=-g<br>
-//Flags used by the compiler during release
builds.<br>
-CMAKE_C_FLAGS_RELEASE:STRING=-fomit-frame-pointer
-funroll-all-loops<br>
-fexcess-precision=fast -O3 -DNDEBUG<br>
+//Flags used by the compiler during release
builds (/MD /Ob1 /Oi<br>
+// /Ot /Oy /Gs will produce slightly less
optimized but smaller<br>
+// files).<br>
+CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG<br>
<br>
As this messes with "considered to be best basic
set of options", we<br>
could state that CFLAGS should not be used, but it
might be a better<br>
alternative to make the configuration prepend the
CFLAG to the<br>
CMAKE_C_FLAGS and keep our generated set of flags
as well.<br>
<br>
I'm not sure which options is best. Thoughts?<br>
<br>
--<br>
Szilárd<br>
<br>
<br>
On Wed, Oct 17, 2012 at 10:12 PM, Jochen Hub <<a
moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a><br>
</div>
</div>
<div class="im">
<mailto:<a moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>>>
wrote:<br>
<br>
Hi all,<br>
<br>
many thanks for the help. I now compiled with
gcc 4.7 and with<br>
manually adding export CFLAGS=-mfma4 (that is
what you meant,<br>
right?). Now the warning does not appear any
more.<br>
<br>
I am not sure though how Gromacs performed on
this hardware using<br>
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>
<br>
On Wed, Oct 17, 2012 at 4:46 PM, Berk Hess
<<a moz-do-not-send="true"
href="mailto:hess@kth.se" target="_blank">hess@kth.se</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>><br>
</div>
<div class="im">
<mailto:<a moz-do-not-send="true"
href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>
<mailto:<a moz-do-not-send="true"
href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>>>>
wrote:<br>
<br>
Hi,<br>
<br>
Apparently icc can compile the code, so
than it's not<br>
strange that<br>
you end up in this situation. But we
should avoid this from<br>
happening.<br>
SSE4.1 would be the next supported
level, but you really<br>
want the<br>
vex instructions and not plain SSE, as
the latter is much<br>
slower.<br>
<br>
<br>
AMD explicitly states that only up to -msse3
should be used on<br>
Bulldozer<br>
and I have never tried to generate SSE4.1
instructions with icc<br>
and run<br>
it on AMD. I would not be surprised if it
didn'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: "Szilárd Páll" <<a
moz-do-not-send="true"
href="mailto:szilard.pall@cbr.su.se"
target="_blank">szilard.pall@cbr.su.se</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:szilard.pall@cbr.su.se"
target="_blank">szilard.pall@cbr.su.se</a>><br>
</div>
<div class="im">
<mailto:<a moz-do-not-send="true"
href="mailto:szilard.pall@cbr.su.se"
target="_blank">szilard.pall@cbr.su.se</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:szilard.pall@cbr.su.se"
target="_blank">szilard.pall@cbr.su.se</a>>__>><br>
To: "Discussion list for GROMACS
development"<br>
<<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>><br>
</div>
<div class="im">
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@" target="_blank">gmx-developers@</a>__<a
moz-do-not-send="true" href="http://gromacs.org"
target="_blank">gromacs.org</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>>>><br>
Subject: [gmx-developers] warning
Emulating FMA<br>
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>
</div>
<a moz-do-not-send="true"
href="http://developer.amd.com/__Assets/CompilerOptQuickRef-__62004200.pdf"
target="_blank">http://developer.amd.com/__Assets/CompilerOptQuickRef-__62004200.pdf</a><br>
<<a moz-do-not-send="true"
href="http://developer.amd.com/Assets/CompilerOptQuickRef-62004200.pdf"
target="_blank">http://developer.amd.com/Assets/CompilerOptQuickRef-62004200.pdf</a>>),
<div class="im"><br>
so I find it strange that you've ended
up with<br>
GMX_ACCELERATION=AVX_128_FMA using an
Intel compiler --<br>
unless you<br>
set the acceleration manually. To get
FMA4 support you need<br>
to use a<br>
recent gcc version, the newer the
better. The Verlet<br>
kernels don'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<br>
(max<br>
SSE3 works, but we don't use these
instructions).<br>
<br>
On Wed, Oct 17, 2012 at 11:14 AM,
Jochen Hub <<a moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>><br>
</div>
<div class="im">
<mailto:<a moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>
<mailto:<a moz-do-not-send="true"
href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>>>>
wrote:<br>
<br>
Hi developers,<br>
<br>
does anyone know how to interpret
this icc warning:<br>
<br>
[ 8%]<br>
<br>
</div>
/home/jhub/src/gromacs/____include/gmx_x86_avx_128_fma.h(____88):
<div class="im"><br>
<br>
warning #1224: #warning directive:
Emulating FMA<br>
instructions -<br>
this is probably not what you want!<br>
<br>
#warning Emulating FMA
instructions - this is<br>
probably not<br>
what you want!<br>
<br>
<br>
This warning is related to a bug in the
build system,<br>
you'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<br>
OpenMPI and<br>
icc 13.0.0 20120731. My cmake line
is:<br>
<br>
cmake $gmxsrc \<br>
</div>
-DFFTW_LIBRARY=$FFTW_LOCATION/____lib/libfftw3f.a
\<br>
-DFFTW3F_INCLUDE_DIR=$FFTW_____LOCATION/include
\<br>
<br>
-DFFTW3F_LIBRARIES=$FFTW_____LOCATION/lib/libfftw3f.a
\
<div class="im"><br>
<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<br>
optimization.<br>
<br>
Thanks a lot,<br>
Jochen<br>
<br>
<br>
<br>
<br>
--<br>
</div>
------------------------------____---------------------
<div class="im"><br>
<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 moz-do-not-send="true"
href="tel:%2B49-551-39-14189"
value="+495513914189" target="_blank">+49-551-39-14189</a>
<a class="moz-txt-link-rfc2396E" href="tel:%2B49-551-39-14189"><tel:%2B49-551-39-14189></a><br>
</div>
<a class="moz-txt-link-rfc2396E" href="tel:%2B49-551-39-14189"><tel:%2B49-551-39-14189></a><br>
<a moz-do-not-send="true"
href="http://cmb.bio.uni-goettingen."
target="_blank">http://cmb.bio.uni-goettingen.</a>____de/<br>
<<a moz-do-not-send="true"
href="http://cmb.bio.uni-__goettingen.de/"
target="_blank">http://cmb.bio.uni-__goettingen.de/</a><br>
<<a moz-do-not-send="true"
href="http://cmb.bio.uni-goettingen.de/"
target="_blank">http://cmb.bio.uni-goettingen.de/</a>>><br>
------------------------------____---------------------
<div class="im"><br>
--<br>
gmx-developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>><br>
</div>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@" target="_blank">gmx-developers@</a>__<a
moz-do-not-send="true" href="http://gromacs.org"
target="_blank">gromacs.org</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>>><br>
<a moz-do-not-send="true"
href="http://lists.gromacs.org/____mailman/listinfo/gmx-____developers"
target="_blank">http://lists.gromacs.org/____mailman/listinfo/gmx-____developers</a><br>
<<a moz-do-not-send="true"
href="http://lists.gromacs.org/__mailman/listinfo/gmx-__developers"
target="_blank">http://lists.gromacs.org/__mailman/listinfo/gmx-__developers</a>>
<div class="im"><br>
<br>
<br>
<<a moz-do-not-send="true"
href="http://lists.gromacs.org/__mailman/listinfo/gmx-__developers"
target="_blank">http://lists.gromacs.org/__mailman/listinfo/gmx-__developers</a><br>
<<a moz-do-not-send="true"
href="http://lists.gromacs.org/mailman/listinfo/gmx-developers"
target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a>>><br>
Please don't post (un)subscribe
requests to the list.<br>
Use the<br>
www interface or send it to<br>
</div>
gmx-developers-request@__<a
moz-do-not-send="true" href="http://groma__cs.org"
target="_blank">groma__cs.org</a> <<a
moz-do-not-send="true" href="http://gromacs.org"
target="_blank">http://gromacs.org</a>><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers-__request@gromacs.org"
target="_blank">gmx-developers-__request@gromacs.org</a>
<div class="im"><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers-request@gromacs.org"
target="_blank">gmx-developers-request@gromacs.org</a>>>.<br>
<br>
<br>
<br>
--<br>
gmx-developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>><br>
</div>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@" target="_blank">gmx-developers@</a>__<a
moz-do-not-send="true" href="http://gromacs.org"
target="_blank">gromacs.org</a>
<div class="im"><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a>>><br>
<br>
<a moz-do-not-send="true"
href="http://lists.gromacs.org/__mailman/listinfo/gmx-__developers"
target="_blank">http://lists.gromacs.org/__mailman/listinfo/gmx-__developers</a><br>
<<a moz-do-not-send="true"
href="http://lists.gromacs.org/mailman/listinfo/gmx-developers"
target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a>><br>
Please don't post (un)subscribe
requests to the list. Use the<br>
www interface or send it to<br>
gmx-developers-request@__<a
moz-do-not-send="true" href="http://gromacs.org"
target="_blank">gromacs.org</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers-request@gromacs.org"
target="_blank">gmx-developers-request@gromacs.org</a>><br>
</div>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers-__request@gromacs.org"
target="_blank">gmx-developers-__request@gromacs.org</a><br>
<mailto:<a moz-do-not-send="true"
href="mailto:gmx-developers-request@gromacs.org"
target="_blank">gmx-developers-request@gromacs.org</a>>>.
<div class="im"><br>
<br>
<br>
<br>
<br>
<br>
--<br>
------------------------------__---------------------<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 moz-do-not-send="true"
href="tel:%2B49-551-39-14189"
value="+495513914189" target="_blank">+49-551-39-14189</a>
<a class="moz-txt-link-rfc2396E" href="tel:%2B49-551-39-14189"><tel:%2B49-551-39-14189></a><br>
<a moz-do-not-send="true"
href="http://cmb.bio.uni-goettingen."
target="_blank">http://cmb.bio.uni-goettingen.</a>__de/
<<a moz-do-not-send="true"
href="http://cmb.bio.uni-goettingen.de/"
target="_blank">http://cmb.bio.uni-goettingen.de/</a>><br>
------------------------------__---------------------<br>
<br>
<br>
</div>
</blockquote>
<br>
-- <br>
<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>
Phone: <a moz-do-not-send="true"
href="tel:%2B49-551-39-14189" value="+495513914189"
target="_blank">+49-551-39-14189</a><br>
<a moz-do-not-send="true"
href="http://cmb.bio.uni-goettingen.de/"
target="_blank">http://cmb.bio.uni-goettingen.de/</a><br>
---------------------------------------------------<br>
</div>
<div class="im">
-- <br>
gmx-developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:gmx-developers@gromacs.org"
target="_blank">gmx-developers@gromacs.org</a><br>
</div>
<a moz-do-not-send="true"
href="http://lists.gromacs.org/mailman/listinfo/gmx-developers"
target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don't post (un)subscribe requests to the list.
Use the www interface or send it to <a
moz-do-not-send="true"
href="mailto:gmx-developers-request@gromacs.org"
target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>