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

Mark Abraham Mark.Abraham at anu.edu.au
Mon Oct 17 05:18:31 CEST 2011


On 17/10/2011 7:04 AM, Mirco Wahab wrote:
> On 10/16/2011 2:25 PM, Mark Abraham wrote:
>> On 15/10/2011 9:02 PM, Mirco Wahab wrote:
>>> On 10/15/2011 1:15 AM, Mark Abraham wrote:
>>>> I use
>>>> ...
>>> ...
>>> //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.
>>> The correct options for the actual compiler for Intel64 would read:
>>> CMAKE_CXX_FLAGS:STRING=' -msse3 -ip -funroll-all-loops -std=gnu99 '
>>> CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
>>> with some option-warnings but without error.
>>
>> Sure. GROMACS will not benefit noticeably from the SSE3 instruction set,
>> so we don't bother looking for it.
>
> OK, I can understand that. But if the options (-mtune ***, -msse2)
> are not longer available with the actual free Intel Compiler suites,
> shouldn't the cmake definitions be adapted to this fact in order
> to avoid loads of compiler warnings?

If someone can identify a way to detect old and new, free and non-free 
compiler suites then we might consider it. Reality is that GROMACS 
spends a heavy majority of its time in loops written mostly in assembly 
code (using SSE or SSE2 if applicable), or in the FFT library. Compiler 
performance makes a negligible contribution to performance of the rest, 
so it is really not worth while maintaining complex compiler tweaks.

>>> 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.
>>> ...
>> That looks very weird. What cmake version? What does make install-mdrun
>> VERBOSE=1 say?
>
> I'll attach the error messages err.msg, 5.9 KB).
>  - cmake version 2.8.3
>  - gcc 4.5.1 x64 (Linux) (20101208)

With cmake 2.8.2 and icc 12.1.0 20110811 using the aforementioned flags, 
I get smooth installation of the git version of 4.5.5. Moreover, I don't 
even get

.../build/src/gmxlib/CMakeFiles/CMakeRelink.dir

being created. So I think there is something idiosyncratic about your 
tool chain that is at the root of this.

Mark



More information about the gromacs.org_gmx-users mailing list