Add initial support for python bindings
[alexxy/gromacs.git] / cmake / gmxManageBlueGene.cmake
1 #
2 # This file is part of the GROMACS molecular simulation package.
3 #
4 # Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
5 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 # and including many others, as listed in the AUTHORS file in the
7 # top-level source directory and at http://www.gromacs.org.
8 #
9 # GROMACS is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public License
11 # as published by the Free Software Foundation; either version 2.1
12 # of the License, or (at your option) any later version.
13 #
14 # GROMACS is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
18 #
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with GROMACS; if not, see
21 # http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23 #
24 # If you want to redistribute modifications to GROMACS, please
25 # consider that scientific software is very special. Version
26 # control is crucial - bugs must be traceable. We will be happy to
27 # consider code for inclusion in the official distribution, but
28 # derived work must not be called official GROMACS. Details are found
29 # in the README & COPYING files - if they are missing, get the
30 # official version at http://www.gromacs.org.
31 #
32 # To help us fund GROMACS development, we humbly ask that you cite
33 # the research papers on the package. Check out http://www.gromacs.org.
34
35 # Managing configuration for all kinds of BlueGene systems
36 # BlueGene/L is probably obsolete, but does no harm
37 # BlueGene/P needs testing, but hasn't changed
38 # BlueGene/Q works
39 message(STATUS "Configuring for BlueGene")
40
41 if (${CMAKE_SYSTEM_NAME} STREQUAL "BlueGeneL")
42     # BlueGene/L never had shared lib support.
43     set(BUILD_SHARED_LIBS OFF CACHE BOOL "Shared libraries not compatible with BlueGene/L, disabled!" FORCE)
44 endif()
45 if (${CMAKE_SYSTEM_NAME} MATCHES "BlueGene.*static")
46     # BlueGene/P claims shared library support, but Mark Abraham never
47     # got it to work. BlueGene/Q claims it, but discourages it for
48     # performance reasons. So unless information to the contrary ever
49     # comes to light, we should not mess about giving the user options
50     # that are useless when they've already selected a static toolchain.
51     set(BUILD_SHARED_LIBS OFF CACHE BOOL "Static BlueGene build toolchain selected, so shared libraries are disabled" FORCE)
52 endif()
53
54 set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Do not use software reciprocal square root on BlueGene")
55 set(GMX_X11 OFF CACHE BOOL "X11 not compatible with BlueGene, disabled!" FORCE)
56 set(GMX_GPU OFF CACHE BOOL "Cannot do GPU acceleration on BlueGene" FORCE)
57
58 # It is conceivable you could use ThreadMPI on BlueGene/Q by using its
59 # facility to run lots of jobs on small chunks of the machine. You
60 # certainly need proper MPI to use a whole chunk of the machine that
61 # the scheduler will allocate.
62 set(GMX_THREAD_MPI OFF CACHE BOOL "GROMACS bundled thread-MPI is not supported on BlueGene" FORCE)
63 set(GMX_MPI ON CACHE BOOL "MPI is required on BlueGene" FORCE)
64
65 # Access to /etc/passwd is not available on the back end of BlueGeneP
66 # (at least), despite being detected by CMake. This can cause linker
67 # warnings about harmless things in src/gromacs/utility/cstringutil.h.
68 set(HAVE_PWD_H OFF)
69
70 # The automatic testing for endianness does not work for the BlueGene cross-compiler
71 set(GMX_FLOAT_FORMAT_IEEE754 1 CACHE INTERNAL "" FORCE)
72 set(GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER 1 CACHE INTERNAL "BlueGene has big-endian floating-point byte order (by default)" FORCE)
73 set(GMX_IEEE754_BIG_ENDIAN_WORD_ORDER 1 CACHE INTERNAL "BlueGene has big-endian floating-point word order (by default)" FORCE)