[gmx-developers] CMake fixes for x86_64
Erik Lindahl
lindahl at cbr.su.se
Fri May 1 21:38:33 CEST 2009
Hi Gino!
Thanks - I might not commit this to CVS, though: the problem is that
this works great when you use GCC, but it breaks for the windows
compilers.
However, we have a new set of kernels in the pipeline where we use SSE
intrinsics instead of raw assembly, and this will enable it on all
platforms soon (if not, I promise to commit your fix :-)
Cheers,
Erik
On May 1, 2009, at 5:16 PM, Gino van den Bergen wrote:
> Hi,
>
> I've unsuccessfully tried to build the current trunk configured using
> CMake with GMX_ACCELERATION set to SSE. It seems that the build for
> sse2_single is broken. I've compared this build to the autoconf
> version
> and noticed that the autoconf version uses the x86_64_sse kernel on my
> machine. After some toying about with the CMakeLists.txt I managed to
> build the nb_kernel_x86_64_sse kernels through CMake. Here are the
> changes (as a result from cvs diff):
>
> Index: CMakeLists.txt
> ===================================================================
> RCS file: /home/gmx/cvs/gmx/CMakeLists.txt,v
> retrieving revision 1.20
> diff -r1.20 CMakeLists.txt
> 235c235
> < # nothing to do
> ---
>> # nothing to do
> 237,249c237,252
> < if(HAVE_XMMINTRIN_H)
> < set(GMX_SSE 1)
> < endif(HAVE_XMMINTRIN_H)
> < if(HAVE_EMMINTRIN_H)
> < set(GMX_SSE2 1)
> < endif(HAVE_EMMINTRIN_H)
> < # if(HAVE_PMMINTRIN_H)
> < # set(GMX_SSE3 1)
> < # endif(HAVE_PMMINTRIN_H)
> < # if(HAVE_SMMINTRIN_H)
> < # set(GMX_SSE4_1 1)
> < # endif(HAVE_SMMINTRIN_H)
> <
> ---
>> if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
>> set(GMX_X86_64_SSE 1)
>> else("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
>> if(HAVE_XMMINTRIN_H)
>> set(GMX_SSE 1)
>> endif(HAVE_XMMINTRIN_H)
>> if(HAVE_EMMINTRIN_H)
>> set(GMX_SSE2 1)
>> endif(HAVE_EMMINTRIN_H)
>> # if(HAVE_PMMINTRIN_H)
>> # set(GMX_SSE3 1)
>> # endif(HAVE_PMMINTRIN_H)
>> # if(HAVE_SMMINTRIN_H)
>> # set(GMX_SSE4_1 1)
>> # endif(HAVE_SMMINTRIN_H)
>> endif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
> Index: src/gmxlib/CMakeLists.txt
> ===================================================================
> RCS file: /home/gmx/cvs/gmx/src/gmxlib/CMakeLists.txt,v
> retrieving revision 1.10
> diff -r1.10 CMakeLists.txt
> 7a8,23
>>
>> if(GMX_X86_64_SSE)
>> enable_language(ASM-ATT)
>> if(CMAKE_ASM-ATT_COMPILER_WORKS)
>> if(GMX_DOUBLE)
>> file(GLOB GMX_SSE2_ASM_SOURCES nonbonded/nb_kernel_x86_64_sse2/
>> *.s )
>> file(GLOB GMX_SSE2_ASM_EXTRA_SOURCES
> nonbonded/nb_kernel_x86_64_sse2/*intel_syntax.s )
>> else(GMX_DOUBLE)
>> file(GLOB GMX_SSE2_ASM_SOURCES nonbonded/nb_kernel_x86_64_sse/
>> *.s )
>> file(GLOB GMX_SSE2_ASM_EXTRA_SOURCES
> nonbonded/nb_kernel_x86_64_sse/*intel_syntax.s )
>> endif(GMX_DOUBLE)
>> list(REMOVE_ITEM GMX_SSE2_ASM_SOURCES $
>> {GMX_SSE2_ASM_EXTRA_SOURCES})
>> endif(CMAKE_ASM-ATT_COMPILER_WORKS)
>> endif(GMX_X86_64_SSE)
>>
>>
> 29c45
> < add_library(gmx ${GMXLIB_SOURCES} ${BLAS_SOURCES} ${LAPACK_SOURCES}
> ${GMX_SSE2_SOURCES})
> ---
>> add_library(gmx ${GMXLIB_SOURCES} ${GMX_SSE2_SOURCES}
> ${GMX_SSE2_ASM_SOURCES} ${BLAS_SOURCES} ${LAPACK_SOURCES})
>
> Cheers,
>
> Gino
>
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
>
More information about the gromacs.org_gmx-developers
mailing list