Merge release-2019 into master
authorRoland Schulz <roland.schulz@intel.com>
Wed, 23 Jan 2019 17:23:51 +0000 (09:23 -0800)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 23 Jan 2019 17:55:57 +0000 (18:55 +0100)
Change-Id: I17cea87b19b5350853fdf652539a2f43e6092784

1  2 
cmake/gmxManageLmfit.cmake
cmake/gmxVersionInfo.cmake
docs/CMakeLists.txt
docs/release-notes/index.rst
src/gromacs/CMakeLists.txt
src/gromacs/domdec/partition.cpp
src/gromacs/gpu_utils/gpu_utils_ocl.cpp

index 1217cb9b41719eb5f06fc5f5a1e4e0a7c53e6187,1152d0b8edec368db8ad4a37f8d8eaf62f1fc0e0..1656feb3c2ceb32308b67114bbeb2a286f4df464
@@@ -1,7 -1,7 +1,7 @@@
  #
  # This file is part of the GROMACS molecular simulation package.
  #
--# Copyright (c) 2016,2018, by the GROMACS development team, led by
++# Copyright (c) 2016,2018,2019, 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.
@@@ -74,9 -74,9 +74,9 @@@ function(gmx_manage_lmfit
          set(HAVE_LMFIT 1 CACHE INTERNAL "Is lmfit found?")
      elseif(GMX_USE_LMFIT STREQUAL "EXTERNAL")
          # Find an external lmfit library.
-         find_package(Lmfit ${GMX_LMFIT_MINIMUM_REQUIRED_VERSION})
-         if(NOT LMFIT_FOUND)
-             message(FATAL_ERROR "External lmfit could not be found, please adjust your pkg-config path to include the lmfit.pc file")
+         find_package(Lmfit ${GMX_LMFIT_REQUIRED_VERSION})
+         if(NOT LMFIT_FOUND OR LMFIT_VERSION VERSION_LESS GMX_LMFIT_REQUIRED_VERSION)
+             message(FATAL_ERROR "External lmfit >= ${GMX_LMFIT_REQUIRED_VERSION} could not be found, please adjust your pkg-config path to include the lmfit.pc file")
          endif()
  
          set(HAVE_LMFIT 1 CACHE INTERNAL "Is lmfit found?")
index 6531d44d3eeaa86b592cb307a71d206532043094,46e3ede48fbf0ca4b931454f3d0b03b363e02962..a804d132e93ba529643f81edfbd2d54df1548ba9
@@@ -57,7 -57,6 +57,7 @@@
  #         GROMACS     2016   2
  #         GROMACS     2018   3
  #         GROMACS     2019   4
 +#         GROMACS     2020   5
  #   LIBRARY_SOVERSION_MINOR so minor version for the built libraries.
  #       Should be increased for each release that changes only the implementation.
  #       In GROMACS, the typical policy is to increase it for each patch version
  
  # The GROMACS convention is that these are the version number of the next
  # release that is going to be made from this branch.
 -set(GMX_VERSION_MAJOR 2019)
 -set(GMX_VERSION_PATCH 1)
 +set(GMX_VERSION_MAJOR 2020)
 +set(GMX_VERSION_PATCH 0)
  # The suffix, on the other hand, is used mainly for betas and release
  # candidates, where it signifies the most recent such release from
  # this branch; it will be empty before the first such release, as well
@@@ -213,7 -212,7 +213,7 @@@ set(GMX_VERSION_SUFFIX ""
  # here. The important thing is to minimize the chance of third-party
  # code being able to dynamically link with a version of libgromacs
  # that might not work.
 -set(LIBRARY_SOVERSION_MAJOR 4)
 +set(LIBRARY_SOVERSION_MAJOR 5)
  set(LIBRARY_SOVERSION_MINOR 0)
  set(LIBRARY_VERSION ${LIBRARY_SOVERSION_MAJOR}.${LIBRARY_SOVERSION_MINOR}.0)
  
@@@ -236,13 -235,13 +236,13 @@@ if (NOT SOURCE_IS_SOURCE_DISTRIBUTION A
  endif()
  
  set(REGRESSIONTEST_VERSION "${GMX_VERSION_STRING}")
 -set(REGRESSIONTEST_BRANCH "refs/heads/release-2019")
 +set(REGRESSIONTEST_BRANCH "refs/heads/master")
  # Run the regressiontests packaging job with the correct pakage
  # version string, and the release box checked, in order to have it
  # build the regressiontests tarball with all the right naming. The
  # naming affects the md5sum that has to go here, and if it isn't right
  # release workflow will report a failure.
 -set(REGRESSIONTEST_MD5SUM "1271a74bfe91028b7f184866d5aee98e" CACHE INTERNAL "MD5 sum of the regressiontests tarball for this GROMACS version")
 +set(REGRESSIONTEST_MD5SUM "3d06d41e07f523d70ae575b9ad75c670" CACHE INTERNAL "MD5 sum of the regressiontests tarball for this GROMACS version")
  
  math(EXPR GMX_VERSION_NUMERIC
       "${GMX_VERSION_MAJOR}*10000 + ${GMX_VERSION_PATCH}")
@@@ -259,8 -258,8 +259,8 @@@ endif(
  # from Zenodo for the manual and source code
  # Has to be done by hand before every final release
  # Use force to override anything given as a cmake command line input
- set(GMX_MANUAL_DOI "10.5281/zenodo.2424486" CACHE INTERNAL "reserved doi for GROMACS manual" FORCE)
- set(GMX_SOURCE_DOI "10.5281/zenodo.2424363" CACHE INTERNAL "reserved doi for GROMACS source code" FORCE)
+ set(GMX_MANUAL_DOI "" CACHE INTERNAL "reserved doi for GROMACS manual" FORCE)
+ set(GMX_SOURCE_DOI "" CACHE INTERNAL "reserved doi for GROMACS source code" FORCE)
  
  #####################################################################
  # git version info management
diff --combined docs/CMakeLists.txt
index de8bd2e8aa6faf446284189adf93a5a0a68242b8,c0d29b9794421376a221458ed2b8edfac0556329..55a43089e8503e9d50164baf2c78c38d2b33ef4c
@@@ -367,15 -367,6 +367,15 @@@ if (SPHINX_FOUND
          how-to/visualize.rst
          install-guide/index.rst
          release-notes/index.rst
 +        release-notes/highlights.rst
 +        release-notes/features.rst
 +        release-notes/performance.rst
 +        release-notes/tools.rst
 +        release-notes/bugs-fixed.rst
 +        release-notes/removed-functionality.rst
 +        release-notes/deprecated-functionality.rst
 +        release-notes/portability.rst
 +        release-notes/miscellaneous.rst
          release-notes/2019/2019.1.rst
          release-notes/2019/major/highlights.rst
          release-notes/2019/major/features.rst
          release-notes/2019/major/deprecated-functionality.rst
          release-notes/2019/major/portability.rst
          release-notes/2019/major/miscellaneous.rst
+         release-notes/2018/2018.6.rst
          release-notes/2018/2018.5.rst
          release-notes/2018/2018.4.rst
          release-notes/2018/2018.3.rst
      add_custom_target(install-guide
          COMMAND
              ${SPHINX_EXECUTABLE}
 -            -q -E -b text
 +            -q -b text
              -w sphinx-install.log
              -d ${CMAKE_CURRENT_BINARY_DIR}/install-guide/_doctrees
              -c ${SPHINX_INPUT_DIR}
      add_custom_target(webpage-sphinx
          DEPENDS sphinx-programs
          DEPENDS sphinx-input
 -        DEPENDS sphinx-image-conversion 
 +        DEPENDS sphinx-image-conversion
 +        DEPENDS manual 
          COMMAND
              ${CMAKE_COMMAND} -E make_directory ${SPHINX_INPUT_DIR}/_static
          COMMAND
              ${SPHINX_EXECUTABLE}
 -            -q -E -b html
 +            -q -b html
              -w sphinx-html.log
              -d "${SPHINX_CACHE_DIR}"
              "${SPHINX_INPUT_DIR}"
      add_custom_target(man
          COMMAND
              ${SPHINX_EXECUTABLE}
 -            -q -E -b man
 +            -q -b man
              -w sphinx-man.log
              -d ${SPHINX_CACHE_DIR}
              -t do_man
index 41afbdde4633ed9e3a69879c45e950859cc36def,d200921c360cc40f3827a06d9e04440f0be58647..ac2a9646f992ee4abd381635cf2e1e43762d50ce
@@@ -8,35 -8,18 +8,35 @@@ releases of |Gromacs|. Major releases c
  functionality supported, whereas patch releases contain only fixes for
  issues identified in the corresponding major releases.
  
 -Two versions of |Gromacs| are under active maintenance, the 2019
 -series and the 2018 series. In the latter, only highly conservative
 +Two versions of |Gromacs| are under active maintenance, the NEXT
 +series and the 2019 series. In the latter, only highly conservative
  fixes will be made, and only to address issues that affect scientific
  correctness. Naturally, some of those releases will be made after the
 -year 2018 ends, but we keep 2018 in the name so users understand how
 +year 2019 ends, but we keep 2018 in the name so users understand how
  up to date their version is. Such fixes will also be incorporated into
 -the 2019 release series, as appropriate. Around the time the 2020
 -release is made, the 2018 series will no longer be maintained.
 +the NEXT release series, as appropriate. Around the time the NEXT+1
 +release is made, the 2019 series will no longer be maintained.
  
  Where issue numbers are reported in these release notes, more details
  can be found at https://redmine.gromacs.org at that issue number.
  
 +|Gromacs| NEXT series
 +---------------------
 +
 +.. toctree::
 +   :maxdepth: 1
 +
 +   highlights
 +   features
 +   performance
 +   tools
 +   bugs-fixed
 +   deprecated-functionality
 +   removed-functionality
 +   portability
 +   miscellaneous
 +
 +
  |Gromacs| 2019 series
  ---------------------
  
@@@ -74,6 -57,7 +74,7 @@@ Patch release
  .. toctree::
     :maxdepth: 1
  
+    2018/2018.6
     2018/2018.5
     2018/2018.4
     2018/2018.3
index f99a56900474a13f077a0c650a972835004d78d5,d2f4e9b0e6e21ee7602902c762d16bbea037aca1..5520903032d2a6798842ecc76d39f0a7245e47f1
@@@ -107,7 -107,6 +107,7 @@@ add_subdirectory(linearalgebra
  add_subdirectory(math)
  add_subdirectory(mdrun)
  add_subdirectory(mdrunutility)
 +add_subdirectory(mdspan)
  add_subdirectory(mdtypes)
  add_subdirectory(onlinehelp)
  add_subdirectory(options)
@@@ -228,6 -227,17 +228,17 @@@ if (GMX_USE_OPENCL
              message(FATAL_ERROR "Did not find required external clFFT library, consider setting clFFT_ROOT_DIR")
          endif()
  
+         if(MSVC)
+             message(FATAL_ERROR
+ "An OpenCL build was requested with Visual Studio compiler, but GROMACS
+ requires clFFT, which was not found on your system. GROMACS does bundle
+ clFFT to help with building for OpenCL, but that clFFT has not yet been
+ ported to the more recent versions of that compiler that GROMACS itself
+ requires. Thus for now, OpenCL is not available with MSVC and the internal
+ build of clFFT in GROMACS 2019. Either change compiler, try installing
+ a clFFT package, or use the latest GROMACS 2018 point release.")
+         endif()
          # Fall back on the internal version
          set (_clFFT_dir ../external/clFFT/src)
          add_subdirectory(${_clFFT_dir} clFFT-build)
@@@ -301,14 -311,11 +312,14 @@@ target_link_libraries(libgromac
                        PUBLIC
                        ${GMX_PUBLIC_LIBRARIES}
                        )
 +if (GMX_OPENMP)
 +    target_link_libraries(libgromacs PUBLIC OpenMP::OpenMP_CXX)
 +endif()
  set_target_properties(libgromacs PROPERTIES
                        OUTPUT_NAME "gromacs${GMX_LIBS_SUFFIX}"
                        SOVERSION ${LIBRARY_SOVERSION_MAJOR}
                        VERSION ${LIBRARY_VERSION}
 -                      COMPILE_FLAGS "${OpenMP_C_FLAGS}")
 +                      )
  
  gmx_manage_lmfit()
  target_link_libraries(libgromacs PRIVATE lmfit)
index df96239fa8932f72dc35cfec4fa954fa77356071,96ae045367318a1af2f980e00e360e876f49852f..bd00656df2b7468617981be14cf04a62f4913f31
@@@ -879,7 -879,7 +879,7 @@@ static void get_load_distribution(gmx_d
  
      for (int d = dd->ndim - 1; d >= 0; d--)
      {
-         const DDCellsizesWithDlb &cellsizes = comm->cellsizesWithDlb[d];
+         const DDCellsizesWithDlb *cellsizes = (isDlbOn(dd->comm) ? &comm->cellsizesWithDlb[d] : nullptr);
          const int                 dim       = dd->dim[d];
          /* Check if we participate in the communication in this dimension */
          if (d == dd->ndim-1 ||
              load = &comm->load[d];
              if (isDlbOn(dd->comm))
              {
-                 cell_frac = cellsizes.fracUpper - cellsizes.fracLower;
+                 cell_frac = cellsizes->fracUpper - cellsizes->fracLower;
              }
              int pos = 0;
              if (d == dd->ndim-1)
                      sbuf[pos++] = cell_frac;
                      if (d > 0)
                      {
-                         sbuf[pos++] = cellsizes.fracLowerMax;
-                         sbuf[pos++] = cellsizes.fracUpperMin;
+                         sbuf[pos++] = cellsizes->fracLowerMax;
+                         sbuf[pos++] = cellsizes->fracUpperMin;
                      }
                  }
                  if (bSepPME)
                      sbuf[pos++] = comm->load[d+1].flags;
                      if (d > 0)
                      {
-                         sbuf[pos++] = cellsizes.fracLowerMax;
-                         sbuf[pos++] = cellsizes.fracUpperMin;
+                         sbuf[pos++] = cellsizes->fracLowerMax;
+                         sbuf[pos++] = cellsizes->fracUpperMin;
                      }
                  }
                  if (bSepPME)
  
                  if (isDlbOn(comm))
                  {
-                     rowMaster = cellsizes.rowMaster.get();
+                     rowMaster = cellsizes->rowMaster.get();
                  }
                  load->sum      = 0;
                  load->max      = 0;
@@@ -3002,7 -3002,7 +3002,7 @@@ void dd_partition_system(FIL
                           gmx_bool                 bMasterState,
                           int                      nstglobalcomm,
                           t_state                 *state_global,
 -                         const gmx_mtop_t        *top_global,
 +                         const gmx_mtop_t        &top_global,
                           const t_inputrec        *ir,
                           t_state                 *state_local,
                           PaddedVector<gmx::RVec> *f,
                    true, xGlobal,
                    &ddbox);
  
 -        distributeState(mdlog, dd, *top_global, state_global, ddbox, state_local, f);
 +        distributeState(mdlog, dd, top_global, state_global, ddbox, state_local, f);
  
          dd_make_local_cgs(dd, &top_local->cgs);
  
                  if (dd->splitConstraints || dd->splitSettles)
                  {
                      /* Only for inter-cg constraints we need special code */
 -                    n = dd_make_local_constraints(dd, n, top_global, fr->cginfo,
 +                    n = dd_make_local_constraints(dd, n, &top_global, fr->cginfo,
                                                    constr, ir->nProjOrder,
                                                    top_local->idef.il);
                  }
      if (comm->nstDDDump > 0 && step % comm->nstDDDump == 0)
      {
          dd_move_x(dd, state_local->box, state_local->x, nullWallcycle);
 -        write_dd_pdb("dd_dump", step, "dump", top_global, cr,
 +        write_dd_pdb("dd_dump", step, "dump", &top_global, cr,
                       -1, state_local->x.rvec_array(), state_local->box);
      }
  
      if (comm->DD_debug > 0)
      {
          /* Set the env var GMX_DD_DEBUG if you suspect corrupted indices */
 -        check_index_consistency(dd, top_global->natoms, ncg_mtop(top_global),
 +        check_index_consistency(dd, top_global.natoms, ncg_mtop(&top_global),
                                  "after partitioning");
      }
  
index d3ce8e0a88c32033c8139ee32515c994cee68f16,3efe5d40dbc350589ade552eaaff6de078ddc753..d5dc3a9d90271d642cd6b3d00da2ff0041f52d88
@@@ -276,7 -276,7 +276,7 @@@ static int checkGpu(size_
      std::string errorMessage;
      if (!isDeviceSane(deviceInfo, &errorMessage))
      {
-         gmx_warning((formatString("While sanity checking device #%zu, ", deviceId) + errorMessage).c_str());
+         gmx_warning("While sanity checking device #%zu, %s", deviceId, errorMessage.c_str());
          return egpuInsane;
      }
  
@@@ -600,6 -600,22 +600,6 @@@ size_t sizeof_gpu_dev_info(
      return sizeof(gmx_device_info_t);
  }
  
 -void gpu_set_host_malloc_and_free(bool               bUseGpuKernels,
 -                                  gmx_host_alloc_t **nb_alloc,
 -                                  gmx_host_free_t  **nb_free)
 -{
 -    if (bUseGpuKernels)
 -    {
 -        *nb_alloc = &pmalloc;
 -        *nb_free  = &pfree;
 -    }
 -    else
 -    {
 -        *nb_alloc = nullptr;
 -        *nb_free  = nullptr;
 -    }
 -}
 -
  int gpu_info_get_stat(const gmx_gpu_info_t &info, int index)
  {
      return info.gpu_dev[index].stat;