Merge release-5-0 into master
authorRoland Schulz <roland@utk.edu>
Wed, 10 Sep 2014 04:16:09 +0000 (00:16 -0400)
committerRoland Schulz <roland@utk.edu>
Wed, 10 Sep 2014 04:20:34 +0000 (00:20 -0400)
Conflicts:
CMakeLists.txt
only version changes not needed in master
src/gromacs/utility/gmxassert.h
better fix already in master

Change-Id: I8af70d807972758149e9f69b420d528269e9bebd

cmake/ThreadMPI.cmake
cmake/gmxTestCompilerProblems.cmake
src/gromacs/gmxpreprocess/readir.c
src/gromacs/mdlib/domdec.c

index 76e4d37b052a50379452a570b257208026c8e2de..027eff6918746d658974f7e189db78167ca9661d 100644 (file)
@@ -65,6 +65,11 @@ ENDMACRO(TMPI_TEST_ATOMICS VARIABLE)
 try_compile(HAVE_PROCESSOR_NUMBER ${CMAKE_BINARY_DIR} "${CMAKE_SOURCE_DIR}/cmake/TestWinProcNum.c")
 
 include(FindThreads)
+
+if(CMAKE_USE_WIN32_THREADS_INIT AND NOT HAVE_PROCESSOR_NUMBER)
+    message(WARNING "Incomplete Windows Processor Group API. If you want Gromacs to be able to set thread affinity, choose a Mingw distribution with a complete API (e.g. Mingw-w64).")
+endif()
+
 if (CMAKE_USE_WIN32_THREADS_INIT AND HAVE_PROCESSOR_NUMBER)
     set(THREAD_WINDOWS 1)
     set(THREAD_LIB)
index ec4fed218535fd483a48a60f39957c49408e0d6a..e534730013ce567857deb82e2bb5919e86f545f5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,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.
@@ -80,6 +80,19 @@ macro(gmx_test_compiler_problems)
         message(WARNING "All tested PGI compiler versions (up to 12.9.0) generate binaries which produce incorrect results, or even fail to  compile Gromacs. Highly recommended to use a different compiler. If you choose to use PGI, make sure to run the regressiontests.")
     endif()
 
+    if(CMAKE_COMPILER_IS_GNUCC AND WIN32 AND (GMX_SIMD STREQUAL "AVX_256" OR GMX_SIMD STREQUAL "AVX2_256"))
+        message(WARNING "GCC on Windows with AVX crashes. Choose SSE4_1 or a different compiler.") # GCC bug 49001.
+    endif()
+
+    if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND WIN32 AND NOT CYGWIN)
+        if(CMAKE_VERSION VERSION_LESS 3.0.0)
+            message(WARNING "Clang on Windows requires cmake 3.0.0")
+        endif()
+        if(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.5.0)
+            message(WARNING "Clang on Windows requires clang 3.5.0")
+        endif()
+    endif()
+
     if(CMAKE_C_COMPILER_ID MATCHES "Intel" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "12.0.0")
         message(WARNING "Intel compilers before 12.0.0 are not routinely tested, so there may be problems. Version 11.1 with SSE4.1 is known to produce incorrect results. It is highly recommended to use a more up-to-date compiler. If you choose to use this version, make sure you run the regressiontests.")
     endif()
index b12714eb7882944edea49bf1147aa936431f0430..b86bbef806e7f0a6317fe8900035573c4612b2d3 100644 (file)
@@ -369,6 +369,11 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
             warning_error(wi, warn_buf);
         }
 
+        if (ir->implicit_solvent != eisNO)
+        {
+            warning_error(wi, "Implicit solvent is not (yet) supported with the with Verlet lists.");
+        }
+
         if (ir->nstlist <= 0)
         {
             warning_error(wi, "With Verlet lists nstlist should be larger than 0");
@@ -1330,11 +1335,9 @@ nd %s",
     /* IMPLICIT SOLVENT */
     if (ir->coulombtype == eelGB_NOTUSED)
     {
-        ir->coulombtype      = eelCUT;
-        ir->implicit_solvent = eisGBSA;
-        fprintf(stderr, "Note: Old option for generalized born electrostatics given:\n"
-                "Changing coulombtype from \"generalized-born\" to \"cut-off\" and instead\n"
-                "setting implicit-solvent value to \"GBSA\" in input section.\n");
+        sprintf(warn_buf, "Invalid option %s for coulombtype",
+                eel_names[ir->coulombtype]);
+        warning_error(wi, warn_buf);
     }
 
     if (ir->sa_algorithm == esaSTILL)
index 08a80c667231018b85667760266a525cc1a58a2b..27d2bcb14a76e8191b4341857b80396afae1c51e 100644 (file)
@@ -1324,7 +1324,6 @@ static void dd_collect_cg(gmx_domdec_t *dd,
 {
     gmx_domdec_master_t *ma = NULL;
     int                  buf2[2], *ibuf, i, ncg_home = 0, *cg = NULL, nat_home = 0;
-    t_block             *cgs_gl;
 
     if (state_local->ddp_count == dd->comm->master_cg_ddp_count)
     {
@@ -1334,12 +1333,18 @@ static void dd_collect_cg(gmx_domdec_t *dd,
 
     if (state_local->ddp_count == dd->ddp_count)
     {
+        /* The local state and DD are in sync, use the DD indices */
         ncg_home = dd->ncg_home;
         cg       = dd->index_gl;
         nat_home = dd->nat_home;
     }
     else if (state_local->ddp_count_cg_gl == state_local->ddp_count)
     {
+        /* The DD is out of sync with the local state, but we have stored
+         * the cg indices with the local state, so we can use those.
+         */
+        t_block *cgs_gl;
+
         cgs_gl = &dd->comm->cgs_gl;
 
         ncg_home = state_local->ncg_gl;
@@ -1355,8 +1360,8 @@ static void dd_collect_cg(gmx_domdec_t *dd,
         gmx_incons("Attempted to collect a vector for a state for which the charge group distribution is unknown");
     }
 
-    buf2[0] = dd->ncg_home;
-    buf2[1] = dd->nat_home;
+    buf2[0] = ncg_home;
+    buf2[1] = nat_home;
     if (DDMASTER(dd))
     {
         ma   = dd->ma;
@@ -1398,7 +1403,7 @@ static void dd_collect_cg(gmx_domdec_t *dd,
 
     /* Collect the charge group indices on the master */
     dd_gatherv(dd,
-               dd->ncg_home*sizeof(int), dd->index_gl,
+               ncg_home*sizeof(int), cg,
                DDMASTER(dd) ? ma->ibuf : NULL,
                DDMASTER(dd) ? ma->ibuf+dd->nnodes : NULL,
                DDMASTER(dd) ? ma->cg : NULL);