From 2257c90300fdc661e0d9b8c9b5185c361e5fff61 Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Wed, 25 Jun 2014 23:58:19 -0400 Subject: [PATCH] Fix Phi Platform file for MPI The Platform file was only working without MPI. One could still compile with MPI without using the toolchain. But now this method described in the installguide works for MPI too. Change-Id: I188e3e970a2d4e777ba98cb9e0ea83f6c1276c62 --- cmake/Platform/XeonPhi.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/Platform/XeonPhi.cmake b/cmake/Platform/XeonPhi.cmake index f3845788b9..3e7956a83c 100644 --- a/cmake/Platform/XeonPhi.cmake +++ b/cmake/Platform/XeonPhi.cmake @@ -31,9 +31,14 @@ # # To help us fund GROMACS development, we humbly ask that you cite # the research papers on the package. Check out http://www.gromacs.org. - -set(CMAKE_C_COMPILER "icc") -set(CMAKE_CXX_COMPILER "icpc") +if(NOT GMX_MPI) + set(CMAKE_C_COMPILER "icc") + set(CMAKE_CXX_COMPILER "icpc") +else() + set(CMAKE_C_COMPILER "mpiicc") + set(CMAKE_CXX_COMPILER "mpiicpc") + set(GMX_PREFER_STATIC_LIBS ON CACHE BOOL "Shared libraries on Xeon Phi with MPI don't work.") +endif() set(CMAKE_CXX_FLAGS "-mmic" CACHE STRING "Flags used by the compiler during all build types.") set(CMAKE_C_FLAGS "-mmic" CACHE STRING "Flags used by the compiler during all build types.") set(GMX_FFT_LIBRARY "mkl" CACHE STRING "FFT library") -- 2.22.0