#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015, 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.
#
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-#
+
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
__BlueGeneQ_set_static_flags(XL CXX)
set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
-# xl.ndebug is appropriate for production calculations. For debugging,
-# use xl to add back error checks and assertions. Using the
-# thread-safe compiler version is required, so use (e.g.)
-# CMAKE_C_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r
-# CMAKE_CXX_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015, 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.
#
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-#
+
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
__BlueGeneQ_set_static_flags(XL CXX)
set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
-# xl.ndebug is appropriate for production calculations. For debugging,
-# use xl to add back error checks and assertions. Using the
-# thread-safe compiler version is required, so use (e.g.)
-# CMAKE_C_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r
-# CMAKE_CXX_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this
"Use option [TT]-pbc mol[tt] in addition to [TT]-center[tt] when you",
"want all molecules in the box after the centering.[PAR]",
- "Option [TT]-box[tt] sets the size of the new box. If you want to"
- "modify only some of the dimensions, e.g. when reading from a trajectory,"
- "you can use -1 for those dimensions that should stay the same"
+ "Option [TT]-box[tt] sets the size of the new box. This option only works",
+ "for leading dimensions and is thus generally only useful for rectangular boxes.",
+ "If you want to modify only some of the dimensions, e.g. when reading from",
+ "a trajectory, you can use -1 for those dimensions that should stay the same",
"It is not always possible to use combinations of [TT]-pbc[tt],",
"[TT]-fit[tt], [TT]-ur[tt] and [TT]-center[tt] to do exactly what",
if (bSetBox)
{
/* generate new box */
- clear_mat(fr.box);
+ if (fr.bBox == FALSE)
+ {
+ clear_mat(fr.box);
+ }
for (m = 0; m < DIM; m++)
{
if (newbox[m] >= 0)
{
fr.box[m][m] = newbox[m];
}
+ else
+ {
+ if (fr.bBox == FALSE)
+ {
+ gmx_fatal(FARGS, "Cannot preserve a box that does not exist.\n");
+ }
+ }
}
}
return;
}
+/*! \brief Return whether an end state with the given coupling-lambda
+ * value describes fully-interacting VDW.
+ *
+ * \param[in] couple_lambda_value Enumeration ecouplam value describing the end state
+ * \return Whether VDW is on (i.e. the user chose vdw or vdw-q in the .mdp file)
+ */
+static gmx_bool couple_lambda_has_vdw_on(int couple_lambda_value)
+{
+ return (couple_lambda_value == ecouplamVDW ||
+ couple_lambda_value == ecouplamVDWQ);
+}
+
void get_ir(const char *mdparin, const char *mdparout,
t_inputrec *ir, t_gromppopts *opts,
warninp_t wi)
*/
if (ir->efep != efepNO && ir->fepvals->n_lambda == 0 &&
ir->fepvals->sc_alpha != 0 &&
- ((opts->couple_lam0 == ecouplamVDW && opts->couple_lam0 == ecouplamVDWQ) ||
- (opts->couple_lam1 == ecouplamVDWQ && opts->couple_lam1 == ecouplamVDW)))
+ (couple_lambda_has_vdw_on(opts->couple_lam0) &&
+ couple_lambda_has_vdw_on(opts->couple_lam1)))
{
warning(wi, "You are using soft-core interactions while the Van der Waals interactions are not decoupled (note that the sc-coul option is only active when using lambda states). Although this will not lead to errors, you will need much more sampling than without soft-core interactions. Consider using sc-alpha=0.");
}
/* turn energy calculation always on/off (for debugging/testing only) */
bCalcEner = (bCalcEner || always_ener) && !never_ener;
- /* don't launch the kernel if there is no work to do */
- if (plist->nsci == 0)
+ /* Don't launch the non-local kernel if there is no work to do.
+ Doing the same for the local kernel is more complicated, since the
+ local part of the force array also depends on the non-local kernel.
+ So to avoid complicating the code and to reduce the risk of bugs,
+ we always call the local kernel, the local x+q copy and later (not in
+ this function) the stream wait, local f copyback and the f buffer
+ clearing. All these operations, except for the local interaction kernel,
+ are needed for the non-local interactions. */
+ if (iloc == eintNonlocal && plist->nsci == 0)
{
return;
}
bool bCalcEner = flags & GMX_FORCE_ENERGY;
bool bCalcFshift = flags & GMX_FORCE_VIRIAL;
- /* don't launch copy-back if there was no work to do */
- if (nb->plist[iloc]->nsci == 0)
+ /* don't launch non-local copy-back if there was no non-local work to do */
+ if (iloc == eintNonlocal && nb->plist[iloc]->nsci == 0)
{
return;
}
}
/* With DD the local D2H transfer can only start after the non-local
- has been launched. */
+ kernel has finished. */
if (iloc == eintLocal && nb->bUseTwoStreams)
{
stat = cudaStreamWaitEvent(stream, nb->nonlocal_done, 0);
/* After the non-local D2H is launched the nonlocal_done event can be
recorded which signals that the local D2H can proceed. This event is not
- placed after the non-local kernel because we first need the non-local
- data back first. */
+ placed after the non-local kernel because we want the non-local data
+ back first. */
if (iloc == eintNonlocal)
{
stat = cudaEventRecord(nb->nonlocal_done, stream);
/* turn energy calculation always on/off (for debugging/testing only) */
bCalcEner = (bCalcEner || always_ener) && !never_ener;
- /* don't launch wait/update timers & counters if there was no work to do
+ /* Launch wait/update timers & counters, unless doing the non-local phase
+ when there is not actually work to do. This is consistent with
+ nbnxn_cuda_launch_kernel.
NOTE: if timing with multiple GPUs (streams) becomes possible, the
counters could end up being inconsistent due to not being incremented
on some of the nodes! */
- if (nb->plist[iloc]->nsci == 0)
+ if (iloc == eintNonlocal && nb->plist[iloc]->nsci == 0)
{
return;
}
wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
/* skip the reduction if there was no non-local work to do */
- if (nbv->grp[eintLocal].nbl_lists.nbl[0]->nsci > 0)
+ if (nbv->grp[eintNonlocal].nbl_lists.nbl[0]->nsci > 0)
{
nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatNonlocal,
nbv->grp[eintNonlocal].nbat, f);
}
wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
- if (nbv->grp[eintLocal].nbl_lists.nbl[0]->nsci > 0)
- {
- /* skip the reduction if there was no non-local work to do */
- nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatLocal,
- nbv->grp[eintLocal].nbat, f);
- }
+ nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatLocal,
+ nbv->grp[eintLocal].nbat, f);
wallcycle_sub_stop(wcycle, ewcsNB_F_BUF_OPS);
wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, 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.
#define GMX_SIMD4_HAVE_DOUBLE /* We can use 256-bit operations for this */
/* SINGLE */
-#undef gmx_simd_fmadd_ps
-#define gmx_simd_fmadd_ps _mm_macc_ps
-#undef gmx_simd_fmsub_ps
-#define gmx_simd_fmsub_ps(a, b, c) _mm_msub_ps
-#undef gmx_simd_fnmadd_ps
-#define gmx_simd_fnmadd_ps(a, b, c) _mm_nmacc_ps
-#undef gmx_simd_fnmsub_ps
-#define gmx_simd_fnmsub_ps(a, b, c) _mm_nmsub_ps
+#undef gmx_simd_fmadd_f
+#define gmx_simd_fmadd_f _mm_macc_ps
+#undef gmx_simd_fmsub_f
+#define gmx_simd_fmsub_f _mm_msub_ps
+#undef gmx_simd_fnmadd_f
+#define gmx_simd_fnmadd_f _mm_nmacc_ps
+#undef gmx_simd_fnmsub_f
+#define gmx_simd_fnmsub_f _mm_nmsub_ps
#undef gmx_simd_fraction_f
-#define gmx_simd_fraction_f _mm_frcz_ps
+#define gmx_simd_fraction_f _mm_frcz_ps
/* DOUBLE */
-#undef gmx_simd_fmadd_pd
-#define gmx_simd_fmadd_pd _mm_macc_pd
-#undef gmx_simd_fmsub_pd
-#define gmx_simd_fmsub_pd(a, b, c) _mm_msub_pd
-#undef gmx_simd_fnmadd_pd
-#define gmx_simd_fnmadd_pd(a, b, c) _mm_nmacc_pd
-#undef gmx_simd_fnmsub_pd
-#define gmx_simd_fnmsub_pd(a, b, c) _mm_nmsub_pd
+#undef gmx_simd_fmadd_d
+#define gmx_simd_fmadd_d _mm_macc_pd
+#undef gmx_simd_fmsub_d
+#define gmx_simd_fmsub_d _mm_msub_pd
+#undef gmx_simd_fnmadd_d
+#define gmx_simd_fnmadd_d _mm_nmacc_pd
+#undef gmx_simd_fnmsub_d
+#define gmx_simd_fnmsub_d _mm_nmsub_pd
#undef gmx_simd_fraction_d
-#define gmx_simd_fraction_d _mm_frcz_pd
+#define gmx_simd_fraction_d _mm_frcz_pd
/* Even if the _main_ SIMD implementation for this architecture file corresponds
* to 128-bit AVX (since it will be faster), the 256-bit operations will always
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015, 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.
"angle",
"-g1", "vector",
"-group1",
- "resname RV1 and name A1 A2",
+ "resname RV2 and name A1 A2",
"resname RV3 RV4 and name A1 A2",
"-g2", "plane",
"-group2",
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="referencedata.xsl"?>
<ReferenceData>
- <String Name="CommandLine">angle -g1 vector -group1 'resname RV1 and name A1 A2' 'resname RV3 RV4 and name A1 A2' -g2 plane -group2 'resname RP1 RP2 and name A1 A2 A3' -binw 60</String>
+ <String Name="CommandLine">angle -g1 vector -group1 'resname RV2 and name A1 A2' 'resname RV3 RV4 and name A1 A2' -g2 plane -group2 'resname RP1 RP2 and name A1 A2 A3' -binw 60</String>
<OutputData Name="Data">
<AnalysisData Name="angle">
<DataFrame Name="Frame0">
<Int Name="Count">2</Int>
<Int Name="DataSet">0</Int>
<DataValue>
- <Real Name="Value">90</Real>
+ <Real Name="Value">180</Real>
</DataValue>
<DataValue>
- <Real Name="Value">120.00000000000001</Real>
+ <Real Name="Value">45</Real>
</DataValue>
</DataValues>
<DataValues>
<DataValues>
<Int Name="Count">2</Int>
<DataValue>
- <Real Name="Value">105</Real>
+ <Real Name="Value">112.5</Real>
</DataValue>
<DataValue>
<Real Name="Value">112.5</Real>
<DataValues>
<Int Name="Count">2</Int>
<DataValue>
- <Real Name="Value">0</Real>
+ <Real Name="Value">0.0083333333333333332</Real>
<Real Name="Error">0</Real>
</DataValue>
<DataValue>
<DataValues>
<Int Name="Count">2</Int>
<DataValue>
- <Real Name="Value">0.0083333333333333332</Real>
+ <Real Name="Value">0</Real>
<Real Name="Error">0</Real>
</DataValue>
<DataValue>
#else
int fd = mkstemp(buf);
- switch (fd)
- {
- case EINVAL:
- gmx_fatal(FARGS, "Invalid template %s for mkstemp", buf);
- break;
- case EEXIST:
- gmx_fatal(FARGS, "mkstemp created existing file", buf);
- break;
- case EACCES:
- gmx_fatal(FARGS, "Permission denied for opening %s", buf);
- break;
- default:
- break;
+ if (fd < 0)
+ {
+ gmx_fatal(FARGS, "Creating temporary file %s: %s", buf,
+ strerror(errno));
}
close(fd);
#endif
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015, 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.
snew(re->order, re->nrepl);
for (i = 0; i < re->nrepl; i++)
{
- snew(re->cyclic[i], re->nrepl);
+ snew(re->cyclic[i], re->nrepl+1);
snew(re->order[i], re->nrepl);
}
/* allocate space for the functions storing the data for the replicas */