From: Roland Schulz Date: Fri, 5 Dec 2014 23:31:17 +0000 (-0500) Subject: Merge release-5-0 into master X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=5a9dc6db279628d8f4ce39b5f3103dcac05e0dd7;p=alexxy%2Fgromacs.git Merge release-5-0 into master Conflicts (trivial): src/gromacs/gmxlib/gmx_thread_affinity.c src/gromacs/mdlib/clincs.cpp Manual changes: Removed config.h because not necessary anymore: src/gromacs/mdlib/nbnxn_search_simd_4xn.h src/gromacs/mdlib/nbnxn_search.c Removed config.h supression: docs/doxygen/suppressions.txt uncrustify: src/gromacs/mdlib/clincs.cpp Change-Id: I00064120f12f609fabecac9b3c823d33c015e59c --- 5a9dc6db279628d8f4ce39b5f3103dcac05e0dd7 diff --cc docs/doxygen/suppressions.txt index d1337b46da,592505a962..71d9f29d23 --- a/docs/doxygen/suppressions.txt +++ b/docs/doxygen/suppressions.txt @@@ -17,14 -10,8 +17,13 @@@ src/gromacs/utility/baseversion-gen.c: : error: no matching directory for module: module_mdrun_integration_tests # These would be nice to fix, but can wait for later -*: warning: includes local file as src/gromacs/gmxlib/nonbonded/nb_kernel_*/*: warning: included file "gromacs/simd/math_x86_*.h" is not documented as exposed outside its module +src/gromacs/gmxlib/nonbonded/nb_kernel_*/*: warning: includes "config.h" unnecessarily +src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c: warning: includes "config.h" unnecessarily +src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c: warning: includes "config.h" unnecessarily +src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c: warning: includes "config.h" unnecessarily +src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h: warning: should include "config.h" +src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c: warning: includes "config.h" unnecessarily - src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h: warning: should include "config.h" # These are specific to Folding@Home, and easiest to suppress here *: warning: includes non-local file as "corewrap.h" diff --cc src/gromacs/gmxlib/gmx_thread_affinity.c index 75e277999b,78695c64d2..e4cc7386e1 --- a/src/gromacs/gmxlib/gmx_thread_affinity.c +++ b/src/gromacs/gmxlib/gmx_thread_affinity.c @@@ -383,43 -381,11 +383,46 @@@ gmx_check_thread_affinity_set(FIL cpu_set_t mask_current; int i, ret, cpu_count, cpu_set; gmx_bool bAllSet; +#endif + #ifdef GMX_LIB_MPI + gmx_bool bAllSet_All; + #endif assert(hw_opt); + if (!bAfterOpenmpInit) + { + /* Check for externally set OpenMP affinity and turn off internal + * pinning if any is found. We need to do this check early to tell + * thread-MPI whether it should do pinning when spawning threads. + * TODO: the above no longer holds, we should move these checks later + */ + if (hw_opt->thread_affinity != threadaffOFF) + { + char *message; + if (!gmx_omp_check_thread_affinity(&message)) + { + /* TODO: with -pin auto we should only warn when using all cores */ + md_print_warn(cr, fplog, "%s", message); + sfree(message); + hw_opt->thread_affinity = threadaffOFF; + } + } + + /* With thread-MPI this is needed as pinning might get turned off, + * which needs to be known before starting thread-MPI. + * With thread-MPI hw_opt is processed here on the master rank + * and passed to the other ranks later, so we only do this on master. + */ + if (!SIMMASTER(cr)) + { + return; + } +#ifndef GMX_THREAD_MPI + return; +#endif + } + +#ifdef HAVE_SCHED_GETAFFINITY if (hw_opt->thread_affinity == threadaffOFF) { /* internal affinity setting is off, don't bother checking process affinity */ diff --cc src/gromacs/mdlib/clincs.cpp index 57ff2d7b8f,783ad72c85..aa4e633f77 --- a/src/gromacs/mdlib/clincs.cpp +++ b/src/gromacs/mdlib/clincs.cpp @@@ -1462,8 -1490,9 +1481,9 @@@ gmx_bool constrain_lincs(FILE *fplog, g t_nrnb *nrnb, int maxwarn, int *warncount) { + gmx_bool bCalcDHDL; char buf[STRLEN], buf2[22], buf3[STRLEN]; - int i, warn, p_imax, error; + int i, warn, p_imax; real ncons_loc, p_ssd, p_max = 0; rvec dx; gmx_bool bOK; @@@ -1669,6 -1694,25 +1685,26 @@@ } } + if (bCalcDHDL) + { + /* Reduce the dH/dlambda contributions over the threads */ + real dhdlambda; + int th; + + dhdlambda = 0; + for (th = 0; th < lincsd->nth; th++) + { + dhdlambda += lincsd->th[th].dhdlambda; + } + if (econqCoord) + { + /* dhdlambda contains dH/dlambda*dt^2, correct for this */ ++ /* TODO This should probably use invdt, so that sd integrator scaling works properly */ + dhdlambda /= ir->delta_t*ir->delta_t; + } + *dvdlambda += dhdlambda; + } + if (bCalcVir && lincsd->nth > 1) { for (i = 1; i < lincsd->nth; i++) diff --cc src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h index 146c95855b,7b4bc4f524..70d6edff67 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h @@@ -57,10 -54,10 +57,10 @@@ #define STRIDE (UNROLLI) #endif -#include "../nbnxn_kernel_simd_utils.h" +#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_utils.h" static gmx_inline void gmx_simdcall - gmx_load_simd_4xn_interactions(int gmx_unused excl, + gmx_load_simd_4xn_interactions(int excl, gmx_exclfilter gmx_unused filter_S0, gmx_exclfilter gmx_unused filter_S1, gmx_exclfilter gmx_unused filter_S2, diff --cc src/gromacs/mdlib/nbnxn_search.c index 856ae32d0f,d201407bfd..f7c27be2f2 --- a/src/gromacs/mdlib/nbnxn_search.c +++ b/src/gromacs/mdlib/nbnxn_search.c @@@ -33,35 -33,34 +33,33 @@@ * the research papers on the package. Check out http://www.gromacs.org. */ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "gmxpre.h" + +#include "nbnxn_search.h" - #include "config.h" - +#include #include #include -#include -#include "sysstuff.h" -#include "gromacs/utility/smalloc.h" -#include "types/commrec.h" -#include "macros.h" +#include "gromacs/legacyheaders/gmx_omp_nthreads.h" +#include "gromacs/legacyheaders/macros.h" +#include "gromacs/legacyheaders/nrnb.h" +#include "gromacs/legacyheaders/ns.h" +#include "gromacs/legacyheaders/types/commrec.h" #include "gromacs/math/utilities.h" -#include "vec.h" -#include "pbc.h" -#include "nbnxn_consts.h" +#include "gromacs/math/vec.h" +#include "gromacs/mdlib/nb_verlet.h" +#include "gromacs/mdlib/nbnxn_atomdata.h" +#include "gromacs/mdlib/nbnxn_consts.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/smalloc.h" + /* nbnxn_internal.h included gromacs/simd/macros.h */ -#include "nbnxn_internal.h" -#ifdef GMX_NBNXN_SIMD +#include "gromacs/mdlib/nbnxn_internal.h" +#ifdef GMX_SIMD #include "gromacs/simd/vector_operations.h" #endif -#include "nbnxn_atomdata.h" -#include "nbnxn_search.h" -#include "gmx_omp_nthreads.h" -#include "nrnb.h" -#include "ns.h" - -#include "gromacs/fileio/gmxfio.h" #ifdef NBNXN_SEARCH_BB_SIMD4 /* Always use 4-wide SIMD for bounding box calculations */ diff --cc src/gromacs/mdlib/nbnxn_search_simd_4xn.h index 33a307b584,8a328404ba..4e1c15a0ee --- a/src/gromacs/mdlib/nbnxn_search_simd_4xn.h +++ b/src/gromacs/mdlib/nbnxn_search_simd_4xn.h @@@ -33,8 -33,7 +33,6 @@@ * the research papers on the package. Check out http://www.gromacs.org. */ - #include "config.h" -- #if GMX_SIMD_REAL_WIDTH >= NBNXN_CPU_CLUSTER_I_SIZE #define STRIDE_S (GMX_SIMD_REAL_WIDTH) #else