First part of commit for redesigned SIMD module - namechanges.
[alexxy/gromacs.git] / cmake / Platform / BlueGeneL-static-XL-C.cmake
1 #
2 # This file is part of the GROMACS molecular simulation package.
3 #
4 # Copyright (c) 2010,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 # derived from http://cmake.org/Wiki/CmakeBlueGene
36
37 # the name of the target operating system
38 set(CMAKE_SYSTEM_NAME BlueGeneL CACHE STRING "Cross-compiling for BlueGene/L")
39
40 # adjust to suit your machine's versions
41 #    /bgl/BlueLight/V1R3M2_140_2007-070424/ppc/bglsys
42 set(BLRTS_PATH /bgl/BlueLight/V1R3M4_300_2008-080728/ppc/bglsys CACHE STRING "Path to the BlueGene/L system libraries and includes")
43
44 # set the compiler
45 set(CMAKE_C_COMPILER  /opt/ibmcmp/vac/bg/8.0/bin/blrts_xlc)
46 set(CMAKE_C_FLAGS "-O3 -qbgl -qarch=auto -qtune=auto -qnoautoconfig -qfloat=norngchk -qhot")
47 set(CMAKE_EXE_LINKER_FLAGS "-L${BLRTS_PATH}/lib")
48 set(CMAKE_CXX_COMPILER  /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC)
49
50 set(MPI_LIBRARY mpich.rts CACHE STRING "MPI library for BlueGene" FORCE)
51 set(MPI_EXTRA_LIBRARY msglayer.rts devices.rts rts.rts devices.rts CACHE STRING "Extra MPI libraries for BlueGene" FORCE)
52 set(MPI_INCLUDE_PATH ${BLRTS_PATH}/include  CACHE STRING "MPI include path for BlueGene" FORCE)
53
54 # This adds directories that find commands should specifically ignore for cross compiles.
55 # Most of these directories are the includeand lib directories for the frontend on BG/P systems.
56 # Not ignoring these can cause things like FindX11 to find a frontend PPC version mistakenly.
57 # We use this on BG instead of re-rooting because backend libraries are typically strewn about
58 # the filesystem, and we can't re-root ALL backend libraries to a single place.
59
60 set(CMAKE_SYSTEM_IGNORE_PATH
61   /lib             /lib64             /include
62   /usr/lib         /usr/lib64         /usr/include
63   /usr/local/lib   /usr/local/lib64   /usr/local/include
64   /usr/X11/lib     /usr/X11/lib64     /usr/X11/include
65   /usr/lib/X11     /usr/lib64/X11     /usr/include/X11
66   /usr/X11R6/lib   /usr/X11R6/lib64   /usr/X11R6/include
67   /usr/X11R7/lib   /usr/X11R7/lib64   /usr/X11R7/include
68 )
69
70 # set the search path for the environment coming with the compiler
71 # and a directory where you can install your own compiled software
72 set(CMAKE_FIND_ROOT_PATH
73     /bgl/BlueLight/ppcfloor/
74     ${BLRTS_PATH}
75     /opt/ibmcmp/xlmass/bg
76 )
77
78 # adjust the default behaviour of the FIND_XXX() commands:
79 # search headers and libraries in the target environment, search 
80 # programs in the host environment
81 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
82 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
83 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
84
85 set(GMX_SIMD "BlueGene" CACHE STRING "Forcing BlueGene SIMD when using BlueGene toolchain")