[gmx-users] Link to Intel MKL (fftw) via cmake options

Szilárd Páll szilard.pall at cbr.su.se
Mon Oct 17 14:48:26 CEST 2011


> --- [CMakeCache.txt] ---------------------------------------------
>
> ...
>
> //Flags used by the compiler during all build types
> CMAKE_CXX_FLAGS:STRING=' -msse2 -ip -funroll-all-loops -std=gnu99  '
>
> //Flags used by the compiler during release builds.
> CMAKE_CXX_FLAGS_RELEASE:STRING=-mtune=itanium2 -mtune=core2  -O3 -DNDEBUG
>
> //Flags used by the compiler during all build types
> CMAKE_C_FLAGS:STRING=' -msse2 -ip -funroll-all-loops -std=gnu99  '
>
> //Flags used by the compiler during release builds.
> CMAKE_C_FLAGS_RELEASE:STRING=-mtune=itanium2 -mtune=core2  -O3 -DNDEBUG
>
> ...
>
> --------------------------------------------------------------------
>
> These are obviously the wrong flags for the detected architecture,
> sse2 is no longer available and so are the the mtune architectures.

Indeed, some of those flags are wrong (CXX -std=gnu99), others simply
outdated (-mtune=itanium2). There are plans to correct these issues
for 4.6, but let's agree on the fact that they are not show-stoppers
(FYI you won't get more than a few percent speedup with the right
compiler options, the most I've seen is ~5%.)

If you want to get rid of them, the solution is pretty simple: just
remove the offending options and pick new ones if you think they work
better for you.

However, I'm not sure what do you mean by "sse2 is no longer
available"? Of course it is, both the Intel Compiler and the majority
of current processors support it. Also, -mtune=core2 is perfectly
valid as is -msse2.

>   CMAKE_CXX_FLAGS:STRING=' -msse3 -ip -funroll-all-loops -std=gnu99 '

As Mark said, SSE3 won't help you in any noticeable way.


> But the install is broken. On `make install-mdrun`, the scripts would
> remove any library from "src/gmxlib/CMakeFiles/CMakeRelink.dir"
> and bail out with the error below. Even if you copy the libraries
> by hand to CMakeRelink.dir/, the'll get removed by make install-mdrun
> before trying to link with them.

Now that is a bug. I'd appreciate if you could enter it in
redmine.gromacs.org withe all details on how to reproduce it!

Cheers,
--
Szilárd



More information about the gromacs.org_gmx-users mailing list