-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
project(Gromacs)
include(Dart)
# machine with no git.
#
# NOTE: when releasing the "-dev" suffix needs to be stripped off!
-set(PROJECT_VERSION "4.5.5-dev")
+set(PROJECT_VERSION "4.6-dev")
set(CUSTOM_VERSION_STRING ""
CACHE STRING "Custom version string (if empty, use hard-coded default)")
mark_as_advanced(CUSTOM_VERSION_STRING)
set(SOVERSION 6)
# It is a bit irritating, but this has to be set separately for now!
SET(CPACK_PACKAGE_VERSION_MAJOR "4")
-SET(CPACK_PACKAGE_VERSION_MINOR "5")
-SET(CPACK_PACKAGE_VERSION_PATCH "5")
+SET(CPACK_PACKAGE_VERSION_MINOR "6")
+#SET(CPACK_PACKAGE_VERSION_PATCH "0")
# Cmake modules/macros are in a subdirectory to keep this file cleaner
set(GMX_THREADS OFF CACHE BOOL
"Thread-based parallelization conflicts with MPI." FORCE)
endif(GMX_THREADS)
- find_package(MPI)
+
+ # Work-around for Cray MPI
+ TRY_COMPILE(MPI_FOUND ${CMAKE_BINARY_DIR}
+ "${CMAKE_SOURCE_DIR}/cmake/TestMPI.c"
+ COMPILE_DEFINITIONS )
+ if(NOT MPI_FOUND)
+ # search for normal MPI installations
+ find_package(MPI)
+ endif(NOT MPI_FOUND)
+
if(MPI_FOUND)
set(GROMACS_C_FLAGS ${GROMACS_FLAGS} ${MPI_COMPILE_FLAGS})
set(GROMACS_LINKER_FLAGS ${GROMACS_LINKER_FLAGS} ${MPI_LINK_FLAGS})
include_directories(${MPI_INCLUDE_PATH})
list(APPEND GMX_EXTRA_LIBRARIES ${MPI_LIBRARIES})
- add_definitions( -DMPI ) #for FAHCORE
+ if(GMX_FAHCORE)
+ add_definitions( -DMPI ) #for FAHCORE
+ endif(GMX_FAHCORE)
include(gmxTestMPI_IN_PLACE)
if (GMX_MPI_IN_PLACE)
gmx_test_mpi_in_place(MPI_IN_PLACE_EXISTS)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
if(USE_VERSION_H)
# We need at least git v1.5.1 be able to parse git's date output. If not
- # fund or the version is too small, we can't generate version information.
- find_package(Git 1.5.1)
- # this should at some point become VERSION_LESS
- if(NOT Git_FOUND OR Git_VERSION STRLESS "1.5.1")
- message("No compatible git version found, won't be able to generate proper development version information.")
- set(USE_VERSION_H OFF)
+ # found or the version is too small, we can't generate version information.
+ find_package(Git)
+
+ # Find out the git version
+ if(GIT_FOUND AND NOT GIT_VERSION)
+ execute_process(COMMAND ${GIT_EXECUTABLE} "--version"
+ OUTPUT_VARIABLE _exec_out
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX REPLACE "git version (.*)" "\\1" GIT_VERSION ${_exec_out})
+ set(GIT_VERSION ${GIT_VERSION} CACHE STRING "Git version")
+ mark_as_advanced(GIT_VERSION)
+ endif()
+
+ if(NOT GIT_FOUND OR GIT_VERSION VERSION_LESS "1.5.1")
+ message("No compatible git version found, won't be able to generate proper development version information.")
+ set(USE_VERSION_H OFF)
endif()
endif()
else()
check_function_exists(fseeko HAVE_FSEEKO)
include(gmxTestSignal)
-gmx_test_retsigtype(RETSIGTYPE)
gmx_test_sigusr1(HAVE_SIGUSR1)
include(gmxTestInline)
int i;
for (i=sqrt(z);;i--)
if (z%i==0) return i;
+ return 1;
}
/* largest factor */
if (z==1) return 1;
for (i=z/2;;i--)
if (z%i==0) return i;
+ return 1;
}
/* largest prime factor: WARNING: slow recursion, only use for small numbers */
#ifdef GMX_FFT_FFTW3 /*if not FFTW - then we don't do a 3d plan but insead only 1D plans */
if ((!(flags&FFT5D_INPLACE)) && (!(P[0]>1 || P[1]>1))) { /*don't do 3d plan in parallel or if in_place requested */
int fftwflags=FFTW_DESTROY_INPUT;
- fftw_iodim dims[3];
+ FFTW(iodim) dims[3];
int inNG=NG,outMG=MG,outKG=KG;
FFTW_LOCK;
rotate(NG);
}
}
- if (plan->flags&FFT5D_REALCOMPLEX && ((!(plan->flags&FFT5D_BACKWARD) && s==0) || (plan->flags&FFT5D_BACKWARD && s==2))) {
+ if ((plan->flags&FFT5D_REALCOMPLEX) && ((!(plan->flags&FFT5D_BACKWARD) && s==0) || ((plan->flags&FFT5D_BACKWARD) && s==2))) {
xl[0] = rC[s];
}
}
int x,y,z,l;
int *coor = plan->coor;
int ll=2; /*compare ll values per element (has to be 2 for complex)*/
- if (plan->flags&FFT5D_REALCOMPLEX && plan->flags&FFT5D_BACKWARD)
+ if ((plan->flags&FFT5D_REALCOMPLEX) && (plan->flags&FFT5D_BACKWARD))
{
ll=1;
}