Merge release-5-0 into master
authorRoland Schulz <roland@utk.edu>
Fri, 5 Dec 2014 23:31:17 +0000 (18:31 -0500)
committerRoland Schulz <roland@utk.edu>
Sun, 7 Dec 2014 00:08:19 +0000 (19:08 -0500)
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

1  2 
docs/doxygen/suppressions.txt
src/gromacs/domdec/domdec.cpp
src/gromacs/gmxlib/gmx_thread_affinity.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/gmxpreprocess/readpull.c
src/gromacs/mdlib/clincs.cpp
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h
src/gromacs/mdlib/nbnxn_pairlist.h
src/gromacs/mdlib/nbnxn_search.c
src/gromacs/mdlib/nbnxn_search_simd_4xn.h

index d1337b46dab06f6afe85173a414a23a45efa0ee5,592505a9621365d18c49fe914f035d8ae78291a4..71d9f29d23e6ac0dedbf67ee83ac07c9ed0f61ae
@@@ -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 <config.h>
  src/gromacs/gmxlib/nonbonded/nb_kernel_*/*: warning: included file "gromacs/simd/math_x86_*.h" is not documented as exposed outside its module
- src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h: warning: should include "config.h"
 +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
  
  # These are specific to Folding@Home, and easiest to suppress here
  *: warning: includes non-local file as "corewrap.h"
Simple merge
index 75e277999be1fcef991d5d14a30d2456a8449214,78695c64d21f81a4427ad126fb8c71dfb9e1ac33..e4cc7386e1324c5e825e251ec8f25460f38cb1f8
@@@ -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 */
Simple merge
Simple merge
index 57ff2d7b8fb86f5924a748bdba5f6f0a6d92725b,783ad72c8530158783b5eab8f7f3d647489c9f75..aa4e633f77e0729350f3b990760068ca7f8bafa8
@@@ -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;
          }
      }
  
+     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++)
index 146c95855be950c76df0f85aa910b34dd6994de0,7b4bc4f524eac0e8bfa8e03b1b35208291004842..70d6edff67ce522c8c678f1f7a8cab28bd5163e7
  #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,
Simple merge
index 856ae32d0f0d8c00a97f736ab14d5d66b64026d1,d201407bfda9af23daef7e4e4dffea23951f2f0c..f7c27be2f28fd8f310acd44252ceb5ba9527a79b
   * the research papers on the package. Check out http://www.gromacs.org.
   */
  
 -#ifdef HAVE_CONFIG_H
 -#include <config.h>
 -#endif
 +#include "gmxpre.h"
 +
 +#include "nbnxn_search.h"
  
- #include "config.h"
 +#include <assert.h>
  #include <math.h>
  #include <string.h>
 -#include <assert.h>
  
 -#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 */
index 33a307b58456ab8080b37e6c0309915d0f148217,8a328404badb64065b5791bef66e029bb0de6868..4e1c15a0ee65c8b19e4bc59d12345db7971d06f4
@@@ -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