check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(isnan HAVE_ISNAN)
check_function_exists(_isnan HAVE__ISNAN)
-check_function_exists(isfinite HAVE_ISFINITE)
-check_function_exists(_isfinite HAVE__ISFINITE)
check_function_exists(fsync HAVE_FSYNC)
check_function_exists(_fileno HAVE__FILENO)
check_function_exists(fileno HAVE_FILENO)
include(gmxTestPipes)
gmx_test_pipes(HAVE_PIPES)
+include(gmxTestIsfinite)
+gmx_test_isfinite(HAVE_ISFINITE)
+gmx_test__isfinite(HAVE__ISFINITE)
+gmx_test__finite(HAVE__FINITE)
+
include(gmxTestInlineASM)
gmx_test_inline_asm_gcc_x86(GMX_X86_GCC_INLINE_ASM)
gmx_test_inline_asm_msvc_x86(GMX_X86_MSVC_INLINE_ASM)
+++ /dev/null
-#!/bin/sh -x
-if [ -n "${CMakeVersion}" ] ; then
- export PATH=$HOME/tools/cmake-${CMakeVersion}/bin:$PATH
-fi
-export CMAKE_LIBRARY_PATH=/usr/lib/atlas-base
-if [ $GMX_MPI = on ]; then
- export OMPI_CC=gcc-${CompilerVersion}
- export OMPI_CXX=g++-${CompilerVersion}
- export OMPI_FC=gfortran-${CompilerVersion}
- export CC=mpicc
- export CXX=mpic++
- export FC=mpif90
-else
- export CC=gcc-${CompilerVersion}
- export CXX=g++-${CompilerVersion}
- export FC=gfortran-${CompilerVersion}
-fi
-cmake -D GMX_DOUBLE=${GMX_DOUBLE} -D GMX_MPI=${GMX_MPI} -D GMX_OPENMP=${GMX_OPENMP} \
- -DGMX_EXTERNAL_BLAS=${GMX_EXTERNAL} -DGMX_EXTERNAL_LAPACK=${GMX_EXTERNAL} \
- -DGMX_DEFAULT_SUFFIX=off -DCMAKE_BUILD_TYPE=Debug . &&
-make &&
-ctest -D ExperimentalTest -V
-REM Requires Windows SDK and CMake to be in the path
-REM Run Windows SDK SetEnv script
-SetEnv /Release && ^
-cmake -G "Visual Studio 10 Win64" -D GMX_DOUBLE=%GMX_DOUBLE% -D GMX_MPI=%GMX_MPI% -D GMX_OPENMP=%GMX_OPENMP% -DGMX_DEFAULT_SUFFIX=off . && ^
-msbuild /m:2 /p:Configuration=MinSizeRel All_Build.vcxproj && ^
-ctest -D ExperimentalTest -C MinSizeRel -V
+mkdir releng
+cd releng
+git init && git fetch ssh://jenkins@gerrit.gromacs.org:29418/releng refs/heads/4.6.0 && git checkout -q -f FETCH_HEAD && cd .. && python -u releng/GerritBuild.py
--- /dev/null
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME BlueGeneP-static CACHE STRING "Cross-compiling for BlueGene/P")
+
+# set the compiler
+set(CMAKE_C_COMPILER mpixlc_r)
+set(CMAKE_CXX_COMPILER mpixlcxx_r)
+
+set(GMX_ACCELERATION "BlueGene" CACHE STRING "Forcing BlueGene acceleration when using BlueGene toolchain")
--- /dev/null
+# - Define macro to check if isfinite or _isfinite exists
+#
+# gmx_test_isfinite(VARIABLE)
+#
+# VARIABLE will be set to true if isfinite exists
+#
+# gmx_test__isfinite(VARIABLE)
+#
+# VARIABLE will be set to true if _isfinite exists
+#
+# gmx_test__finite(VARIABLE) - disabled since it doesn't seem to work the way the MSVC docs suggest
+#
+# VARIABLE will be set to true if _finite exists
+#
+
+MACRO(gmx_test_isfinite VARIABLE)
+ MESSAGE(STATUS "Checking for isfinite")
+
+ set(CMAKE_REQUIRED_INCLUDES "math.h")
+ set(CMAKE_REQUIRED_LIBRARIES "m")
+ check_c_source_compiles(
+ "#include <math.h>
+int main(void) {
+ float f;
+ isfinite(f);
+}" isfinite_compile_ok)
+
+ if(isfinite_compile_ok)
+ MESSAGE(STATUS "Checking for isfinite - yes")
+ set(${VARIABLE} ${isfinite_compile_ok}
+ "Result of test for isfinite")
+ else(isfinite_compile_ok)
+ MESSAGE(STATUS "Checking for isfinite - no")
+ endif(isfinite_compile_ok)
+ENDMACRO(gmx_test_isfinite VARIABLE)
+
+MACRO(gmx_test__isfinite VARIABLE)
+ MESSAGE(STATUS "Checking for _isfinite")
+
+ set(CMAKE_REQUIRED_INCLUDES "math.h")
+ set(CMAKE_REQUIRED_LIBRARIES "m")
+ check_c_source_compiles(
+ "#include <math.h>
+int main(void) {
+ float f;
+ _isfinite(f);
+}" _isfinite_compile_ok)
+
+ if(_isfinite_compile_ok)
+ MESSAGE(STATUS "Checking for _isfinite - yes")
+ set(${VARIABLE} ${_isfinite_compile_ok}
+ "Result of test for _isfinite")
+ else(_isfinite_compile_ok)
+ MESSAGE(STATUS "Checking for _isfinite - no")
+ endif(_isfinite_compile_ok)
+ENDMACRO(gmx_test__isfinite VARIABLE)
+
+# Necessary for MSVC
+MACRO(gmx_test__finite VARIABLE)
+ MESSAGE(STATUS "Checking for _finite")
+
+ set(CMAKE_REQUIRED_INCLUDES "float.h")
+ check_c_source_compiles(
+ "#include <float.h>
+int main(void) {
+ float f;
+ _finite(f);
+}" _finite_compile_ok)
+
+ if(_finite_compile_ok)
+ MESSAGE(STATUS "Checking for _finite - yes")
+ set(${VARIABLE} ${_finite_compile_ok}
+ "Result of test for _finite")
+ else(_finite_compile_ok)
+ MESSAGE(STATUS "Checking for _finite - no")
+ endif(_finite_compile_ok)
+ENDMACRO(gmx_test__finite VARIABLE)
real gmx_erf(real x);
real gmx_erfc(real x);
+gmx_bool gmx_isfinite(real x);
+
/*! \brief Check if two numbers are within a tolerance
*
* This routine checks if the relative difference between two numbers is
/* Define to 1 if you have the _isfinite() function. */
#cmakedefine HAVE__ISFINITE
+/* Define to 1 if you have the _finite() function. */
+#cmakedefine HAVE__FINITE
+
/* Define to 1 if you have the fsync() function. */
#cmakedefine HAVE_FSYNC
#include <math.h>
#include <limits.h>
#include "maths.h"
+#ifdef HAVE__FINITE
+#include "float.h"
+#endif
int gmx_nint(real a)
{
t*(-0.82215223+t*0.17087277)))))))));
return ans;
}
+
+gmx_bool gmx_isfinite(real x)
+{
+ gmx_bool returnval = TRUE;
+ /* If no suitable function was found, assume the value is
+ * finite. */
+
+#ifdef HAVE_ISFINITE
+ returnval = isfinite(x);
+#elif defined HAVE__ISFINITE
+ returnval = _isfinite(x);
+#elif defined HAVE__FINITE
+ returnval = _finite(x);
+#endif
+ return returnval;
+}
}
+static void check_settle(gmx_mtop_t *sys)
+{
+ int i,j,cgj1,nra;
+
+ nra = interaction_function[F_SETTLE].nratoms;
+ for(i=0; (i<sys->nmoltype); i++)
+ {
+ for(j=0; (j<sys->moltype[i].ilist[F_SETTLE].nr); j+=nra+1)
+ {
+ cgj1 = sys->moltype[i].cgs.index[j+1];
+ if (j+2 >= cgj1)
+ gmx_fatal(FARGS,"For SETTLE you need to have all atoms involved in one charge group. Please fix your topology.");
+ }
+ }
+}
+
int main (int argc, char *argv[])
{
static const char *desc[] = {
check_vel(sys,state.v);
}
+ /* check for charge groups in settles */
+ check_settle(sys);
+
/* check masses */
check_mol(sys,wi);
{
fprintf(fplog,"%s",buf);
}
- #ifdef HAS_ISFINITE
- if (!isfinite(d1))
- gmx_fatal(FARGS,"Bond length not finite.")
- #else
- #ifdef HAS__ISFINITE
- if (!_isfinite(d1))
- gmx_fatal(FARGS,"Bond length not finite.")
- #endif
- #endif
+ if (!gmx_isfinite(d1))
+ {
+ gmx_fatal(FARGS,"Bond length not finite.");
+ }
(*warncount)++;
}
for(i=0; i<GD->nData; i++)
{
dumpdata[i] = (real)(GD->ctTheory[i]);
-#ifdef HAS_ISFINITE
- if (!isfinite(dumpdata[i]))
-#elif defined HAS__ISFINITE
- if (!_isfinite(dumpdata[i]))
-#else
- if (0)
-#endif
+ if (!gmx_isfinite(dumpdata[i]))
{
gmx_fatal(FARGS, "Non-finite value in acf.");
}
"[TT]-cl[tt] writes average (with option [TT]-av[tt]) or central",
"structure of each cluster or writes numbered files with cluster members",
"for a selected set of clusters (with option [TT]-wcl[tt], depends on",
- "[TT]-nst[tt] and [TT]-rmsmin[tt]).[BR]",
+ "[TT]-nst[tt] and [TT]-rmsmin[tt]). The center of a cluster is the",
+ "structure with the smallest average RMSD from all other structures",
+ "of the cluster.[BR]",
};
FILE *fp,*log;