Merge "Merge release-5-0 into master"
authorRoland Schulz <roland@rschulz.eu>
Thu, 30 Oct 2014 18:19:22 +0000 (19:19 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 30 Oct 2014 18:19:22 +0000 (19:19 +0100)
src/external/gmock-1.7.0/CMakeLists.txt
src/external/gmock-1.7.0/README.Gromacs
src/external/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxlib/checkpoint.cpp
src/gromacs/gmxpreprocess/calc_verletbuf.c
src/gromacs/mdlib/sim_util.cpp
src/gromacs/selection/nbsearch.cpp

index c9404bf48be0b3eef9b666d115a8fcbe65910753..b9a0f2aada7b4c3182a86679eea043c33d261234 100644 (file)
@@ -67,7 +67,7 @@ endif()
 
 add_library(gmock STATIC ${UNITTEST_TARGET_OPTIONS} ${GMOCK_SOURCES} ${GTEST_SOURCES})
 set_property(TARGET gmock APPEND PROPERTY COMPILE_DEFINITIONS
-             "_GNU_SOURCE=1;${GMOCK_COMPILE_DEFINITIONS}")
+             "_GNU_SOURCE=1;${GMOCK_COMPILE_DEFINITIONS};GTEST_CAN_STREAM_RESULTS=0")
 
 set(GMOCK_LIBRARIES gmock ${PTHREADS_LIBRARIES} PARENT_SCOPE)
 set(GTEST_LIBRARIES ${GMOCK_LIBRARIES} PARENT_SCOPE)
index 7560c11d5157083df1a45ff465c42583ddd9c27f..fd2f2a772dd3a2f764713fad1d6938c84502bac8 100644 (file)
@@ -20,3 +20,12 @@ This is not the case on all platforms, so on line 1610 of gtest/src/gtest.cc
 we have added a define to only use this if GTEST_HAS_WCSCASECMP is set. Since
 we never set this define, we fall back on the alternative internal implementation
 which should be perfectly fine for now.
+
+gmock-1.7.0 also assumes that streaming results to a socket is
+something you can always do on Linux, but the implementation uses
+getaddrinfo(), about which the Cray linker warns because its use would
+require shared libraries at run time. Since Gromacs testing doesn't
+use this feature, we'd just want to turn it off, but there's no
+interface for that. So, GTEST_CAN_STREAM_RESULTS is added in
+gtest/include/gtest/internal/gtest-port.h to allow the default
+behaviour to be applied only if the user hasn't gotten involved.
\ No newline at end of file
index dc4fe0cb6b89413946629fae704827c60600425a..811078c80d6a6fe7923baf5979537447ac5d740b 100644 (file)
@@ -85,6 +85,8 @@
 //   GTEST_CREATE_SHARED_LIBRARY
 //                            - Define to 1 when compiling Google Test itself
 //                              as a shared library.
+//   GTEST_CAN_STREAM_RESULTS - Define to 1/0 to indicate that streaming
+//                              results to a socket is/isn't available
 
 // This header defines the following utilities:
 //
@@ -679,8 +681,12 @@ using ::std::tuple_size;
     (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
 
 // Determines whether test results can be streamed to a socket.
-#if GTEST_OS_LINUX
-# define GTEST_CAN_STREAM_RESULTS_ 1
+#ifndef GTEST_CAN_STREAM_RESULTS
+# if GTEST_OS_LINUX
+#  define GTEST_CAN_STREAM_RESULTS_ 1
+# endif
+#else
+# define GTEST_CAN_STREAM_RESULTS_ GTEST_CAN_STREAM_RESULTS
 #endif
 
 // Defines some utility macros.
index 242a6031b075c824f6ca6373e441350295213026..87cd62d53f63770bd325a77644ac86561525bbfb 100644 (file)
@@ -1838,7 +1838,7 @@ int gmx_trjconv(int argc, char *argv[])
                                         }
                                         write_g96_conf(out, &frout, -1, NULL);
                                 }
-                                if (bSeparate)
+                                if (bSeparate || bSplitHere)
                                 {
                                     gmx_ffclose(out);
                                     out = NULL;
index cf722fcff0d48e57c71ad052615dafd5743cb2c6..438eafba7df1a448ca468cc11332e7a8b9d062f9 100644 (file)
@@ -2046,13 +2046,13 @@ static void read_checkpoint(const char *fn, FILE **pfplog,
         cp_error();
     }
 
-    ret = do_cpt_swapstate(gmx_fio_getxdr(fp), TRUE, &state->swapstate, NULL);
+    ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, &state->edsamstate, NULL);
     if (ret)
     {
         cp_error();
     }
 
-    ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, &state->edsamstate, NULL);
+    ret = do_cpt_swapstate(gmx_fio_getxdr(fp), TRUE, &state->swapstate, NULL);
     if (ret)
     {
         cp_error();
index 676c8c09d183edf975fd49d496e78ab9392bfeab..5c8329344c8434cb468cda962731219e7d12259e 100644 (file)
@@ -208,8 +208,8 @@ static void get_vsite_masses(const gmx_moltype_t  *moltype,
             for (i = 0; i < il->nr; i += 1+NRAL(ft))
             {
                 const t_iparams *ip;
-                real             cam[5] = {0}, inv_mass, m_aj;
-                int              a1, j, aj, coeff;
+                real             cam[5] = {0}, inv_mass, coeff, m_aj;
+                int              a1, j, aj;
 
                 ip = &ffparams->iparams[il->iatoms[i]];
 
@@ -247,10 +247,10 @@ static void get_vsite_masses(const gmx_moltype_t  *moltype,
                     case F_VSITEN:
                         /* Exact */
                         inv_mass = 0;
-                        for (j = 0; j < 3*ip->vsiten.n; j += 3)
+                        for (j = 0; j < 3*ffparams->iparams[il->iatoms[i]].vsiten.n; j += 3)
                         {
                             aj    = il->iatoms[i+j+2];
-                            coeff = ip[il->iatoms[i+j]].vsiten.a;
+                            coeff = ffparams->iparams[il->iatoms[i+j]].vsiten.a;
                             if (moltype->atoms.atom[aj].ptype == eptVSite)
                             {
                                 m_aj = vsite_m[aj];
index e35e31a8e60044796c1c9544952f14757386949c..ca9c53f513a198da49e9631f64c5bd9283ddfd91 100644 (file)
@@ -1405,18 +1405,6 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         /* Communicate the forces */
         wallcycle_start(wcycle, ewcMOVEF);
         dd_move_f(cr->dd, f, fr->fshift);
-        /* Do we need to communicate the separate force array
-         * for terms that do not contribute to the single sum virial?
-         * Position restraints and electric fields do not introduce
-         * inter-cg forces, only full electrostatics methods do.
-         * When we do not calculate the virial, fr->f_novirsum = f,
-         * so we have already communicated these forces.
-         */
-        if (EEL_FULL(fr->eeltype) && cr->dd->n_intercg_excl &&
-            (flags & GMX_FORCE_VIRIAL))
-        {
-            dd_move_f(cr->dd, fr->f_novirsum, NULL);
-        }
         if (bSepLRF)
         {
             /* We should not update the shift forces here,
@@ -1521,7 +1509,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         }
 
         /* If we have NoVirSum forces, but we do not calculate the virial,
-         * we sum fr->f_novirum=f later.
+         * we sum fr->f_novirsum=f later.
          */
         if (vsite && !(fr->bF_NoVirSum && !(flags & GMX_FORCE_VIRIAL)))
         {
@@ -1996,7 +1984,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
         }
 
         /* If we have NoVirSum forces, but we do not calculate the virial,
-         * we sum fr->f_novirum=f later.
+         * we sum fr->f_novirsum=f later.
          */
         if (vsite && !(fr->bF_NoVirSum && !(flags & GMX_FORCE_VIRIAL)))
         {
index 7e32fa6536b1ad066a2d7cdb1bb9df420a9fc742..801ee2a1db6c94e9a23fe234de1e971b47350549 100644 (file)
@@ -628,7 +628,6 @@ void AnalysisNeighborhoodPairSearchImpl::reset(int testIndex)
     testIndex_ = testIndex;
     if (testIndex_ >= 0 && testIndex_ < static_cast<int>(testPositions_.size()))
     {
-        copy_rvec(testPositions_[testIndex_], xtest_);
         if (search_.bGrid_)
         {
             search_.mapPointToGridCell(testPositions_[testIndex], testcell_, xtest_);