Merge branch release-2016
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 23 Jun 2016 17:51:17 +0000 (19:51 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 23 Jun 2016 21:38:02 +0000 (23:38 +0200)
 Conflicts:
 cmake/gmxVersionInfo.cmake

Trivial change to version status, resolve as in master

        src/gromacs/hardware/detecthardware.cpp

New logic for hwloc caching clashed with new logging interface.

    src/gromacs/hardware/hardwaretopology.cpp

New field isThisSystem_ was being initialized alongside other fields
that are now initialized elsewhere by the mockable interface.

     src/gromacs/mdlib/forcerec.cpp

Fix for tabulated bonded, and MD logging interface change both
touched init_forcerec.

Change-Id: Ied02b04c0985b5b956af7d46530e04cf51ef1648

13 files changed:
1  2 
cmake/gmxVersionInfo.cmake
src/gromacs/gpu_utils/gpu_utils_ocl.cpp
src/gromacs/hardware/detecthardware.cpp
src/gromacs/hardware/hardwaretopology.cpp
src/gromacs/hardware/hardwaretopology.h
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/gmx_omp_nthreads.h
src/gromacs/mdlib/minimize.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/utility/stringutil.h
src/programs/mdrun/runner.cpp
src/testutils/CMakeLists.txt

Simple merge
index cb218b9670e7942bb1669b228efe7c187e88dbb4,e06111d7aef64b83cc92ab3f15b4cbad31af09f2..a94a2afb05fcc3dd990ae0272e49e76eeec1ee70
@@@ -886,7 -882,11 +884,11 @@@ gmx_hw_info_t *gmx_detect_hardware(cons
  
          // TODO: Get rid of this altogether.
          hwinfo_g->nthreads_hw_avail = hwinfo_g->hardwareTopology->machine().logicalProcessorCount;
-         check_nthreads_hw_avail(mdlog, hwinfo_g->nthreads_hw_avail);
+         // If we detected the topology on this system, double-check that it makes sense
+         if (hwinfo_g->hardwareTopology->isThisSystem())
+         {
 -            check_nthreads_hw_avail(cr, fplog, hwinfo_g->nthreads_hw_avail);
++            check_nthreads_hw_avail(mdlog, hwinfo_g->nthreads_hw_avail);
+         }
  
          /* detect GPUs */
          hwinfo_g->gpu_info.n_dev            = 0;
               getenv("GMX_DISABLE_GPU_DETECTION") == NULL);
          if (hwinfo_g->gpu_info.bDetectGPUs)
          {
 -            gmx_detect_gpus(fplog, cr);
 +            gmx_detect_gpus(mdlog, cr);
          }
+         gmx_collect_hardware_mpi(*hwinfo_g->cpuInfo);
      }
      /* increase the reference counter */
      n_hwinfo++;
index 4501a86b3e9c5b3894232cd338dafc6a9b6ca7a5,483e2539efecab0008fc8d964ee3a90e30f567a3..4416948c1d1fbd5ca5a970310616efe675a02da6
@@@ -593,10 -585,15 +585,8 @@@ HardwareTopology HardwareTopology::dete
  {
      HardwareTopology result;
  
-     result.supportLevel_ = SupportLevel::None;
 -    // Default values for machine and numa stuff
 -    result.machine_.logicalProcessorCount   = 0;
 -    result.machine_.numa.baseLatency        = 0.0;
 -    result.machine_.numa.maxRelativeLatency = 0.0;
 -    result.supportLevel_                    = SupportLevel::None;
 -    result.isThisSystem_                    = true;
--
  #if GMX_HWLOC
-     parseHwLoc(&result.machine_, &result.supportLevel_);
+     parseHwLoc(&result.machine_, &result.supportLevel_, &result.isThisSystem_);
  #endif
  
      // If something went wrong in hwloc (or if it was not present) we might
      return result;
  }
  
 +HardwareTopology::Machine::Machine()
 +{
 +    logicalProcessorCount   = 0;
 +    numa.baseLatency        = 0.0;
 +    numa.maxRelativeLatency = 0.0;
 +}
 +
  
  HardwareTopology::HardwareTopology()
--    : supportLevel_(SupportLevel::None)
++    : supportLevel_(SupportLevel::None),
++      machine_(),
++      isThisSystem_(true)
  {
  }
  
-     : supportLevel_(SupportLevel::None)
 +HardwareTopology::HardwareTopology(int logicalProcessorCount)
++    : supportLevel_(SupportLevel::None),
++      machine_(),
++      isThisSystem_(true)
 +{
 +    if (logicalProcessorCount > 0)
 +    {
 +        machine_.logicalProcessorCount = logicalProcessorCount;
 +        supportLevel_                  = SupportLevel::LogicalProcessorCount;
 +    }
 +}
 +
  int HardwareTopology::numberOfCores() const
  {
      if (supportLevel() >= SupportLevel::Basic)
index c7030b235ca1d6f8b55d4f9b412247405836f0f2,703a1cd471ad50196031a097fa5ad0d9349ed62e..6dd0b2e808667eb4d5a4b8f135340c6b2591220e
  #include "gromacs/topology/mtop_util.h"
  #include "gromacs/trajectory/trajectoryframe.h"
  #include "gromacs/utility/cstringutil.h"
+ #include "gromacs/utility/exceptions.h"
  #include "gromacs/utility/fatalerror.h"
  #include "gromacs/utility/gmxassert.h"
 +#include "gromacs/utility/logger.h"
  #include "gromacs/utility/pleasecite.h"
  #include "gromacs/utility/smalloc.h"
  #include "gromacs/utility/stringutil.h"
@@@ -2256,20 -2313,19 +2312,20 @@@ gmx_bool usingGpu(nonbonded_verlet_t *n
      return nbv != NULL && nbv->bUseGPU;
  }
  
 -void init_forcerec(FILE              *fp,
 -                   t_forcerec        *fr,
 -                   t_fcdata          *fcd,
 -                   const t_inputrec  *ir,
 -                   const gmx_mtop_t  *mtop,
 -                   const t_commrec   *cr,
 -                   matrix             box,
 -                   const char        *tabfn,
 -                   const char        *tabpfn,
 -                   const t_filenm    *tabbfnm,
 -                   const char        *nbpu_opt,
 -                   gmx_bool           bNoSolvOpt,
 -                   real               print_force)
 +void init_forcerec(FILE                *fp,
 +                   const gmx::MDLogger &mdlog,
 +                   t_forcerec          *fr,
 +                   t_fcdata            *fcd,
 +                   const t_inputrec    *ir,
 +                   const gmx_mtop_t    *mtop,
 +                   const t_commrec     *cr,
 +                   matrix               box,
 +                   const char          *tabfn,
 +                   const char          *tabpfn,
-                    const char          *tabbfn,
++                   const t_filenm      *tabbfnm,
 +                   const char          *nbpu_opt,
 +                   gmx_bool             bNoSolvOpt,
 +                   real                 print_force)
  {
      int            i, m, negp_pp, negptable, egi, egj;
      real           rtab;
index 95d9fc212d8a3d163e91323d059d3307e41b0730,274d909bf82446a41c62461e03acac7e2639f165..f1aba0e1c3e3035ec36b5886e3d6bac3e775c93b
  
  struct t_commrec;
  struct t_fcdata;
+ struct t_filenm;
  
 +namespace gmx
 +{
 +class MDLogger;
 +}
 +
  /*! \brief Create a new forcerec structure */
  t_forcerec *mk_forcerec(void);
  
Simple merge
Simple merge
Simple merge
Simple merge
index 1ef4161814bac25f2ac23097114540e847dccc33,ddc5895c956b11c1abdb083777dc6fce8ed9fa30..badcb18ae1ef9ff1b4c34f661cc6574b2c290444
@@@ -1174,10 -1151,10 +1175,10 @@@ int mdrunner(gmx_hw_opt_t *hw_opt
          fr          = mk_forcerec();
          fr->hwinfo  = hwinfo;
          fr->gpu_opt = &hw_opt->gpu_opt;
 -        init_forcerec(fplog, fr, fcd, inputrec, mtop, cr, box,
 +        init_forcerec(fplog, mdlog, fr, fcd, inputrec, mtop, cr, box,
                        opt2fn("-table", nfile, fnm),
                        opt2fn("-tablep", nfile, fnm),
-                       opt2fn("-tableb", nfile, fnm),
+                       getFilenm("-tableb", nfile, fnm),
                        nbpu_opt,
                        FALSE,
                        pforce);
Simple merge