From 10e3efa6b5f9c681a3c8ce402057e4cf9937e0e9 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Fri, 22 Jun 2007 10:22:27 -0400 Subject: ENH: add support for BlueGene/L Alex --- Modules/CMakeLists.txt | 2 +- Modules/FindMPI.cmake | 7 ++++++- Modules/Platform/BlueGeneL.cmake | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 Modules/Platform/BlueGeneL.cmake diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt index 01e2595..c575043 100644 --- a/Modules/CMakeLists.txt +++ b/Modules/CMakeLists.txt @@ -1,5 +1,5 @@ # just install the modules -# new file added, force rerunning cmake +# new file added, force rerunning cmake # SUBDIRS(Platform) INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cmake$) diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 5e91664..477fa6b 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -13,7 +13,7 @@ FIND_PATH(MPI_INCLUDE_PATH NAMES mpi.h ) FIND_LIBRARY(MPI_LIBRARY - NAMES mpich2 mpi mpich + NAMES mpich2 mpi mpich mpich.rts PATH_SUFFIXES mpi/lib PATHS "$ENV{ProgramFiles}/MPICH/SDK/Lib" @@ -29,4 +29,9 @@ FIND_LIBRARY(MPI_EXTRA_LIBRARY "C:/Program Files/MPICH/SDK/Lib" DOC "If a second mpi library is necessary, specify it here.") +# on BlueGene/L the MPI lib is named libmpich.rts.a, there also these additional libs are required +IF("${MPI_LIBRARY}" MATCHES "mpich.rts") + SET(MPI_EXTRA_LIBRARY msglayer.rts devices.rts rts.rts devices.rts CACHE STRING "Additional MPI libs" FORCE) +ENDIF("${MPI_LIBRARY}" MATCHES "mpich.rts") + MARK_AS_ADVANCED(MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY) diff --git a/Modules/Platform/BlueGeneL.cmake b/Modules/Platform/BlueGeneL.cmake new file mode 100644 index 0000000..a89988a --- /dev/null +++ b/Modules/Platform/BlueGeneL.cmake @@ -0,0 +1,22 @@ +#the compute nodes on BlueGene/L don't support shared libs +SET(CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS TRUE) + +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty + +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a +SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe +SET(CMAKE_DL_LIBS "" ) + +SET(CMAKE_FIND_LIBRARY_PREFIXES "lib") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + + +INCLUDE(Platform/UnixPaths) -- cgit v0.12