Unverified Commit 3b7c15a8 authored by Vishnu V. Krishnan's avatar Vishnu V. Krishnan
Browse files

Merging to stay up-to-date

Merge remote-tracking branch 'lammps_upstream/master' into log_spacing
parents c2a200fe dc1e3150
Loading
Loading
Loading
Loading
+32 −25
Original line number Diff line number Diff line
@@ -87,7 +87,8 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
# this is fast, so check for it all the time
message(STATUS "Running check for auto-generated files from make-based build system")
file(GLOB SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${LAMMPS_SOURCE_DIR}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
foreach(_SRC ${SRC_AUTOGEN_FILES})
  get_filename_component(FILENAME "${_SRC}" NAME)
  if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME})
@@ -172,21 +173,17 @@ set(LAMMPS_LINK_LIBS)
set(LAMMPS_DEPS)
set(LAMMPS_API_DEFINES)

set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE GRANULAR
  KSPACE MANYBODY MC MESSAGE MISC MOLECULE PERI REPLICA RIGID SHOCK
  SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD
  USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION
  USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD
  USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF
  USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REAXC USER-SCAFACOS
  USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK
  USER-QUIP USER-QMMM USER-YAFF USER-ADIOS)
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
  GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MOLECULE PERI POEMS QEQ
  REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
  USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS
  USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB
  USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
  USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REAXC
  USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
  USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-ADIOS)
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
set(OTHER_PACKAGES CORESHELL QEQ)
foreach(PKG ${DEFAULT_PACKAGES})
  option(PKG_${PKG} "Build ${PKG} Package" OFF)
endforeach()
foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
  option(PKG_${PKG} "Build ${PKG} Package" OFF)
endforeach()

@@ -203,7 +200,6 @@ endif()

include_directories(${LAMMPS_SOURCE_DIR})


if(PKG_USER-ADIOS)
  # The search for ADIOS2 must come before MPI because
  # it includes its own MPI search with the latest FindMPI.cmake
@@ -213,7 +209,6 @@ if(PKG_USER-ADIOS)
  list(APPEND LAMMPS_LINK_LIBS adios2::adios2)
endif()


# do MPI detection after language activation, if MPI for these language is required
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
@@ -233,7 +228,6 @@ else()
  list(APPEND LAMMPS_LINK_LIBS mpi_stubs)
endif()


set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)")
set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall)
set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES})
@@ -322,7 +316,18 @@ pkg_depends(USER-SCAFACOS MPI)

include(CheckIncludeFileCXX)
find_package(OpenMP QUIET)

# TODO: this is a temporary workaround until a better solution is found. AK 2019-05-30
# GNU GCC 9.x uses settings incompatible with our use of 'default(none)' in OpenMP pragmas
# where we assume older GCC semantics. For the time being, we disable OpenMP by default
# for GCC 9.x and beyond. People may manually turn it on, but need to run the script
# src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9.
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0))
  option(BUILD_OMP "Build with OpenMP support" OFF)
else()
  option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
endif()

if(BUILD_OMP)
  find_package(OpenMP REQUIRED)
  check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
@@ -446,7 +451,6 @@ else()
  set(CUDA_REQUEST_PIC)
endif()


if(PKG_VORONOI)
  find_package(VORO)
  if(VORO_FOUND)
@@ -895,6 +899,8 @@ foreach(PKG ${DEFAULT_PACKAGES})
    list(APPEND LIB_SOURCES ${${PKG}_SOURCES})
    include_directories(${${PKG}_SOURCES_DIR})
  endif()

  RegisterPackages(${${PKG}_SOURCES_DIR})
endforeach()

# packages that need defines set
@@ -913,6 +919,8 @@ foreach(PKG ${ACCEL_PACKAGES})

  # check for package files in src directory due to old make system
  DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})

  RegisterPackages(${${PKG}_SOURCES_DIR})
endforeach()

##############################################
@@ -961,7 +969,6 @@ if(PKG_USER-H5MD)
  include_directories(${HDF5_INCLUDE_DIRS})
endif()


######################################################################
# packages which selectively include variants based on enabled styles
# e.g. accelerator packages
@@ -1438,10 +1445,12 @@ endif()
######################################################
# Generate style headers based on global list of
# styles registered during package selection
# Generate packages headers from all packages
######################################################
set(LAMMPS_STYLE_HEADERS_DIR ${CMAKE_CURRENT_BINARY_DIR}/styles)

GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR})
GeneratePackagesHeaders(${LAMMPS_STYLE_HEADERS_DIR})

include_directories(${LAMMPS_STYLE_HEADERS_DIR})

@@ -1450,7 +1459,7 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
######################################
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] =  {\n")
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
list(SORT temp_PKG_LIST)
foreach(PKG ${temp_PKG_LIST})
    if(PKG_${PKG})
@@ -1529,8 +1538,6 @@ if(BUILD_EXE)

endif()



###############################################################################
# Build documentation
###############################################################################
@@ -1683,7 +1690,7 @@ endif()
###############################################################################
# Print package summary
###############################################################################
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
  if(PKG_${PKG})
    message(STATUS "Building package: ${PKG}")
  endif()
+85 −0
Original line number Diff line number Diff line
@@ -181,3 +181,88 @@ function(DetectBuildSystemConflict lammps_src_dir)
    endforeach()
  endif()
endfunction(DetectBuildSystemConflict)


function(FindPackagesHeaders path style_class file_pattern headers)
    file(GLOB files "${path}/${file_pattern}*.h")
    get_property(plist GLOBAL PROPERTY ${headers})

    foreach(file_name ${files})
        file(STRINGS ${file_name} is_style LIMIT_COUNT 1 REGEX ${style_class})
        if(is_style)
            list(APPEND plist ${file_name})
        endif()
    endforeach()
    set_property(GLOBAL PROPERTY ${headers} "${plist}")
endfunction(FindPackagesHeaders)

function(RegisterPackages search_path)
    FindPackagesHeaders(${search_path} ANGLE_CLASS     angle_     PKGANGLE     ) # angle     ) # force
    FindPackagesHeaders(${search_path} ATOM_CLASS      atom_vec_  PKGATOM_VEC  ) # atom      ) # atom      atom_vec_hybrid
    FindPackagesHeaders(${search_path} BODY_CLASS      body_      PKGBODY      ) # body      ) # atom_vec_body
    FindPackagesHeaders(${search_path} BOND_CLASS      bond_      PKGBOND      ) # bond      ) # force
    FindPackagesHeaders(${search_path} COMMAND_CLASS   "[^.]"     PKGCOMMAND   ) # command   ) # input
    FindPackagesHeaders(${search_path} COMPUTE_CLASS   compute_   PKGCOMPUTE   ) # compute   ) # modify
    FindPackagesHeaders(${search_path} DIHEDRAL_CLASS  dihedral_  PKGDIHEDRAL  ) # dihedral  ) # force
    FindPackagesHeaders(${search_path} DUMP_CLASS      dump_      PKGDUMP      ) # dump      ) # output    write_dump
    FindPackagesHeaders(${search_path} FIX_CLASS       fix_       PKGFIX       ) # fix       ) # modify
    FindPackagesHeaders(${search_path} IMPROPER_CLASS  improper_  PKGIMPROPER  ) # improper  ) # force
    FindPackagesHeaders(${search_path} INTEGRATE_CLASS "[^.]"     PKGINTEGRATE ) # integrate ) # update
    FindPackagesHeaders(${search_path} KSPACE_CLASS    "[^.]"     PKGKSPACE    ) # kspace    ) # force
    FindPackagesHeaders(${search_path} MINIMIZE_CLASS  min_       PKGMINIMIZE  ) # minimize  ) # update
    FindPackagesHeaders(${search_path} NBIN_CLASS      nbin_      PKGNBIN      ) # nbin      ) # neighbor
    FindPackagesHeaders(${search_path} NPAIR_CLASS     npair_     PKGNPAIR     ) # npair     ) # neighbor
    FindPackagesHeaders(${search_path} NSTENCIL_CLASS  nstencil_  PKGNSTENCIL  ) # nstencil  ) # neighbor
    FindPackagesHeaders(${search_path} NTOPO_CLASS     ntopo_     PKGNTOPO     ) # ntopo     ) # neighbor
    FindPackagesHeaders(${search_path} PAIR_CLASS      pair_      PKGPAIR      ) # pair      ) # force
    FindPackagesHeaders(${search_path} READER_CLASS    reader_    PKGREADER    ) # reader    ) # read_dump
    FindPackagesHeaders(${search_path} REGION_CLASS    region_    PKGREGION    ) # region    ) # domain
endfunction(RegisterPackages)

function(CreatePackagesHeader path filename)
  set(temp "")
  if(ARGC GREATER 2)
    list(REMOVE_AT ARGV 0 1)
    foreach(FNAME ${ARGV})
      set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${FNAME}")
      get_filename_component(DNAME ${FNAME} DIRECTORY)
      get_filename_component(DNAME ${DNAME} NAME)
      get_filename_component(FNAME ${FNAME} NAME)
      set(temp "${temp}#undef PACKAGE\n#define PACKAGE \"${DNAME}\"\n")
      set(temp "${temp}#include \"${DNAME}/${FNAME}\"\n")
    endforeach()
  endif()
  message(STATUS "Generating ${filename}...")
  file(WRITE "${path}/${filename}.tmp" "${temp}" )
  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${path}/${filename}.tmp" "${path}/${filename}")
  set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${path}/${filename}")
endfunction(CreatePackagesHeader)

function(GeneratePackagesHeader path property style)
  get_property(files GLOBAL PROPERTY ${property})
  CreatePackagesHeader("${path}" "packages_${style}.h" ${files})
endfunction(GeneratePackagesHeader)

function(GeneratePackagesHeaders output_path)
    GeneratePackagesHeader(${output_path} PKGANGLE      angle     ) # force
    GeneratePackagesHeader(${output_path} PKGATOM_VEC   atom      ) # atom      atom_vec_hybrid
    GeneratePackagesHeader(${output_path} PKGBODY       body      ) # atom_vec_body
    GeneratePackagesHeader(${output_path} PKGBOND       bond      ) # force
    GeneratePackagesHeader(${output_path} PKGCOMMAND    command   ) # input
    GeneratePackagesHeader(${output_path} PKGCOMPUTE    compute   ) # modify
    GeneratePackagesHeader(${output_path} PKGDIHEDRAL   dihedral  ) # force
    GeneratePackagesHeader(${output_path} PKGDUMP       dump      ) # output    write_dump
    GeneratePackagesHeader(${output_path} PKGFIX        fix       ) # modify
    GeneratePackagesHeader(${output_path} PKGIMPROPER   improper  ) # force
    GeneratePackagesHeader(${output_path} PKGINTEGRATE  integrate ) # update
    GeneratePackagesHeader(${output_path} PKGKSPACE     kspace    ) # force
    GeneratePackagesHeader(${output_path} PKGMINIMIZE   minimize  ) # update
    GeneratePackagesHeader(${output_path} PKGNBIN       nbin      ) # neighbor
    GeneratePackagesHeader(${output_path} PKGNPAIR      npair     ) # neighbor
    GeneratePackagesHeader(${output_path} PKGNSTENCIL   nstencil  ) # neighbor
    GeneratePackagesHeader(${output_path} PKGNTOPO      ntopo     ) # neighbor
    GeneratePackagesHeader(${output_path} PKGPAIR       pair      ) # force
    GeneratePackagesHeader(${output_path} PKGREADER     reader    ) # read_dump
    GeneratePackagesHeader(${output_path} PKGREGION     region    ) # domain
endfunction(GeneratePackagesHeaders)
+1 −1
Original line number Diff line number Diff line
.TH LAMMPS "15 May 2019" "2019-05-15"
.TH LAMMPS "31 May 2019" "2019-05-31"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.
+25 −14
Original line number Diff line number Diff line
@@ -5828,6 +5828,12 @@ Must have periodic x,y dimensions and non-periodic z dimension to use
Must have periodic x,y dimensions and non-periodic z dimension to use
2d slab option with pppm/disp. :dd

{Incorrect conversion in format string} :dt

A format style variable was not using either a %f, a %g, or a %e conversion.
Or an immediate variable with format suffix was not using either
a %f, a %g or a %e conversion in the format suffix. :dd

{Incorrect element names in ADP potential file} :dt

The element names in the ADP file do not match those requested. :dd
@@ -7448,6 +7454,11 @@ The Atoms section of a data file must come before a Triangles section. :dd
The Atoms section of a data file must come before a Velocities
section. :dd

{Must re-specify non-restarted pair style (xxx) after read_restart} :dt

For pair styles, that do not store their settings in a restart file,
it must be defined with a new 'pair_style' command after read_restart. :dd

{Must set both respa inner and outer} :dt

Cannot use just the inner or outer option with respa without using the
@@ -10049,19 +10060,19 @@ create_box command. :dd
A universe or uloop style variable must specify a number of values >= to the
number of processor partitions. :dd

{Unknown angle style} :dt
{Unrecognized angle style} :dt

The choice of angle style is unknown. :dd

{Unknown atom style} :dt
{Unrecognized atom style} :dt

The choice of atom style is unknown. :dd

{Unknown body style} :dt
{Unrecognized body style} :dt

The choice of body style is unknown. :dd

{Unknown bond style} :dt
{Unrecognized bond style} :dt

The choice of bond style is unknown. :dd

@@ -10077,23 +10088,23 @@ Self-explanatory. :dd

Self-explanatory. :dd

{Unknown command: %s} :dt
{Unrecognized command: %s} :dt

The command is not known to LAMMPS.  Check the input script. :dd

{Unknown compute style} :dt
{Unrecognized compute style} :dt

The choice of compute style is unknown. :dd

{Unknown dihedral style} :dt
{Unrecognized dihedral style} :dt

The choice of dihedral style is unknown. :dd

{Unknown dump reader style} :dt
{Unrecognized dump reader style} :dt

The choice of dump reader style via the format keyword is unknown. :dd

{Unknown dump style} :dt
{Unrecognized dump style} :dt

The choice of dump style is unknown. :dd

@@ -10101,7 +10112,7 @@ The choice of dump style is unknown. :dd

Self-explanatory. :dd

{Unknown fix style} :dt
{Unrecognized fix style} :dt

The choice of fix style is unknown. :dd

@@ -10109,7 +10120,7 @@ The choice of fix style is unknown. :dd

A section of the data file cannot be read by LAMMPS. :dd

{Unknown improper style} :dt
{Unrecognized improper style} :dt

The choice of improper style is unknown. :dd

@@ -10117,7 +10128,7 @@ The choice of improper style is unknown. :dd

One or more specified keywords are not recognized. :dd

{Unknown kspace style} :dt
{Unrecognized kspace style} :dt

The choice of kspace style is unknown. :dd

@@ -10133,7 +10144,7 @@ Self-explanatory. :dd

Self-explanatory. :dd

{Unknown pair style} :dt
{Unrecognized pair style} :dt

The choice of pair style is unknown. :dd

@@ -10141,7 +10152,7 @@ The choice of pair style is unknown. :dd

The choice of sub-style is unknown. :dd

{Unknown region style} :dt
{Unrecognized region style} :dt

The choice of region style is unknown. :dd

+2 −2
Original line number Diff line number Diff line
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="15 May 2019 version">
<META NAME="docnumber" CONTENT="31 May 2019 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
@@ -21,7 +21,7 @@
:line

LAMMPS Documentation :c,h1
15 May 2019 version :c,h2
31 May 2019 version :c,h2

"What is a LAMMPS version?"_Manual_version.html

Loading