set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> ${BG/Q_${lang}_DEFAULT_EXE_FLAGS}")
- if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ${compiler_id} STREQUAL "XL")
+ if(CMAKE_BUILD_TYPE MATCHES "Deb" AND ${compiler_id} STREQUAL "XL")
# Work around an unknown compiler bug triggered in
# compute_globals(). Using -O0 disables -qhot and this seems
# to break the normal OpenMP flag -qsmp unless qualified with
__BlueGeneQ_set_static_flags(XL C)
__BlueGeneQ_set_static_flags(XL CXX)
-# This suppression stops the following information message from
-# almost every source file at -O3:
-# 1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
-set(COMPILER_SUPPRESSION "-qsuppress=1500-036")
-
set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
# xl.ndebug is appropriate for production calculations. For debugging,
-# use xl to add back error checks and assertions
-set(CMAKE_C_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r)
-set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG ${COMPILER_SUPPRESSION}" CACHE STRING "Compiler optimization flags")
-set(CMAKE_CXX_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r)
-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG ${COMPILER_SUPPRESSION}" CACHE STRING "Compiler optimization flags")
+# use xl to add back error checks and assertions. Using the
+# thread-safe compiler version is required, so use (e.g.)
+# CMAKE_C_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r
+# CMAKE_CXX_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r
mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this
__BlueGeneQ_set_static_flags(XL C)
__BlueGeneQ_set_static_flags(XL CXX)
-# This suppression stops the following information message from
-# almost every source file at -O3:
-# 1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
-set(COMPILER_SUPPRESSION "-qsuppress=1500-036")
-
set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
# xl.ndebug is appropriate for production calculations. For debugging,
-# use xl to add back error checks and assertions
-set(CMAKE_C_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r)
-set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG ${COMPILER_SUPPRESSION}" CACHE STRING "Compiler optimization flags")
-set(CMAKE_CXX_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r)
-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG ${COMPILER_SUPPRESSION}" CACHE STRING "Compiler optimization flags")
+# use xl to add back error checks and assertions. Using the
+# thread-safe compiler version is required, so use (e.g.)
+# CMAKE_C_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r
+# CMAKE_CXX_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r
mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this
--- /dev/null
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2014, by the GROMACS development team, led by
+# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+# and including many others, as listed in the AUTHORS file in the
+# top-level source directory and at http://www.gromacs.org.
+#
+# GROMACS is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# GROMACS is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with GROMACS; if not, see
+# http://www.gnu.org/licenses, or write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# If you want to redistribute modifications to GROMACS, please
+# consider that scientific software is very special. Version
+# control is crucial - bugs must be traceable. We will be happy to
+# consider code for inclusion in the official distribution, but
+# derived work must not be called official GROMACS. Details are found
+# in the README & COPYING files - if they are missing, get the
+# official version at http://www.gromacs.org.
+#
+# To help us fund GROMACS development, we humbly ask that you cite
+# the research papers on the package. Check out http://www.gromacs.org.
+#
+#=============================================================================
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+# Copyright 2010 Todd Gamblin <tgamblin@llnl.gov>
+# Copyright 2012 Julien Bigot <julien.bigot@cea.fr>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+# nor the names of their contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+include(BlueGeneQ-static)
+__BlueGeneQ_set_static_flags(bgclang C)
+__BlueGeneQ_set_static_flags(bgclang CXX)
+
+set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
+
+# Use (e.g.) bgclang and bgclang++ as base compilers inside mpicc and
+# mpicxx
endif()
# xlc
+ # The suppressions below stop information messages about -O3
+ # causing non-strict IEEE compliance that changes the semantics of
+ # the program (duh; 1500-036), warnings about correct PBC-related use of
+ # maximum array indices of DIM-sized C arrays (1500-010).
if (CMAKE_C_COMPILER_ID MATCHES "XL")
GMX_TEST_CFLAG(CFLAGS_OPT "-qarch=auto -qtune=auto" GMXC_CFLAGS)
GMX_TEST_CFLAG(CFLAGS_LANG "-qlanglvl=extc99" GMXC_CFLAGS)
+ GMX_TEST_CFLAG(CFLAGS_LANG "-qsuppress=1500-036 -qsuppress=1500-010" GMXC_CFLAGS)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "XL")
GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-qarch=auto -qtune=auto" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CFLAGS_LANG "-qsuppress=1500-036 -qsuppress=1500-010" GMXC_CXXFLAGS)
endif()
# msvc
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Static BlueGene build toolchain selected, so shared libraries are disabled" FORCE)
endif()
-set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Do not use software reciprocal square root on BlueGene" FORCE)
+set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Do not use software reciprocal square root on BlueGene")
set(GMX_X11 OFF CACHE BOOL "X11 not compatible with BlueGene, disabled!" FORCE)
set(GMX_GPU OFF CACHE BOOL "Cannot do GPU acceleration on BlueGene" FORCE)
You need to arrange for FFTW to be installed correctly, following the
above instructions.
-`mpicc` is used for compiling and linking. This can make it awkward to
+MPI wrapper compilers should be used for compiling and linking. Both
+xlc and bgclang are supported back ends - either might prove to be
+faster in practice. The MPI wrapper compilers can make it awkward to
attempt to use IBM's optimized BLAS/LAPACK called ESSL (see the
-section on
-[linear algebra libraries](#linear-algebra-libraries)). Since mdrun is
-the only part of GROMACS that should normally run on the compute
-nodes, and there is nearly no need for linear algebra support for
-mdrun, it is recommended to use the GROMACS built-in linear algebra
-routines - it is rare for this to run slowly.
+section on [linear algebra
+libraries](#linear-algebra-libraries)). Since mdrun is the only part
+of GROMACS that should normally run on the compute nodes, and there is
+nearly no need for linear algebra support for mdrun, it is recommended
+to use the GROMACS built-in linear algebra routines - this is never
+a problem for normal simulations.
The recommended configuration is to use
- cmake .. -DCMAKE_TOOLCHAIN_FILE=Platform/BlueGeneQ-static-XL-CXX \
+ cmake .. -DCMAKE_C_COMPILER=mpicc \
+ -DCMAKE_CXX_COMPILER=mpicxx \
+ -DCMAKE_TOOLCHAIN_FILE=Platform/BlueGeneQ-static-XL-CXX \
-DCMAKE_PREFIX_PATH=/your/fftw/installation/prefix \
-DGMX_MPI=ON \
-DGMX_BUILD_MDRUN_ONLY=ON
make install
which will build a statically-linked MPI-enabled mdrun for the compute
-nodes. Otherwise, GROMACS default configuration behaviour applies.
+nodes. Or use the Platform/BlueGeneQ-static-bgclang-cxx
+toolchain file if compiling with bgclang. Otherwise, GROMACS default configuration
+behaviour applies.
It is possible to configure and make the remaining GROMACS tools with
the compute-node toolchain, but as none of those tools are MPI-aware
cmdlineprogramcontext.cpp
pargs.cpp
$<TARGET_OBJECTS:onlinehelp-test-shared>)
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "XL")
+ # This suppression stops a very verbose cascade of messages about the
+ # mocks, which is probably a compiler issue.
+ # 1540-2924 (W) Cannot pass an argument of non-POD class type "const gmx::CommandLineHelpContext" through ellipsis.
+ set_property(SOURCE cmdlinemodulemanager.cpp PROPERTY COMPILE_FLAGS "-qsuppress=1540-2924")
+endif()
const char *ShortProgram(void)
{
+ const char *programName = NULL;
+
try
{
// TODO: Use the display name once it doesn't break anything.
- return gmx::getProgramContext().programName();
+ programName = gmx::getProgramContext().programName();
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+ return programName;
}
const char *Program(void)
}
#if defined GMX_LIB_MPI && defined GMX_TARGET_BGQ
+
+#ifdef __clang__
+/* IBM's declaration of this function in
+ * /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/process.h
+ * erroneously fails to specify __INLINE__, despite
+ * /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk/process_impl.h
+ * specifiying __INLINE__, so bgclang thinks they are different enough
+ * to complain about. */
+static uint64_t Kernel_GetJobID();
+#endif
+
#include <spi/include/kernel/location.h>
static int bgq_nodenum(void)
const char *output_env_get_program_name(const output_env_t oenv)
{
+ const char *programName = NULL;
+
try
{
- return oenv->programContext.fullBinaryPath();
+ programName = oenv->programContext.fullBinaryPath();
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+ return programName;
}
const char *output_env_get_short_program_name(const output_env_t oenv)
{
+ const char *programName = NULL;
+
try
{
// TODO: Use the display name once it doesn't break anything.
- return oenv->programContext.programName();
+ programName = oenv->programContext.programName();
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+ return programName;
}
const char *output_env_get_cmd_line(const output_env_t oenv)
{
+ const char *commandLine = NULL;
+
try
{
- return oenv->programContext.commandLine();
+ commandLine = oenv->programContext.commandLine();
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+ return commandLine;
}
gmx_add_unit_test_object_library(onlinehelp-test-shared
mock_helptopic.cpp)
+if (CMAKE_CXX_COMPILER_ID MATCHES "XL")
+ # This suppression stops a very verbose cascade of messages about the
+ # mocks, which is probably a compiler issue.
+ # 1540-2924 (W) Cannot pass an argument of non-POD class type "const gmx::HelpWriterContext" through ellipsis.
+ set_property(SOURCE mock_helptopic.cpp PROPERTY COMPILE_FLAGS "-qsuppress=1540-2924")
+endif()
+
gmx_add_unit_test(OnlineHelpUnitTests onlinehelp-test
helpformat.cpp
helpmanager.cpp