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)
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
// 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:
//
(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.
}
write_g96_conf(out, &frout, -1, NULL);
}
- if (bSeparate)
+ if (bSeparate || bSplitHere)
{
gmx_ffclose(out);
out = NULL;
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();
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]];
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];
/* 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,
}
/* 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)))
{
}
/* 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)))
{
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_);