Unverified Commit 9c51bb6c authored by iafoss's avatar iafoss Committed by GitHub
Browse files

Merge pull request #4 from lammps/master

update
parents c05e1871 2ac79d44
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -227,7 +227,15 @@ pkg_depends(USER-LB MPI)
pkg_depends(USER-PHONON KSPACE)
pkg_depends(USER-SCAFACOS MPI)

# detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF)
find_package(OpenMP QUIET)
if(OpenMP_FOUND)
  check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
  if(HAVE_OMP_H_INCLUDE)
    set(BUILD_OMP_DEFAULT ON)
  endif()
endif()

# 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
@@ -237,14 +245,14 @@ find_package(OpenMP QUIET)
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9))
  option(BUILD_OMP "Build with OpenMP support" OFF)
else()
  option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
  option(BUILD_OMP "Build with OpenMP support" ${BUILD_OMP_DEFAULT})
endif()

if(BUILD_OMP)
  find_package(OpenMP REQUIRED)
  check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
  if(NOT HAVE_OMP_H_INCLUDE)
    message(FATAL_ERROR "Cannot find required 'omp.h' header file")
    message(FATAL_ERROR "Cannot find the 'omp.h' header file required for full OpenMP support")
  endif()
  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ if(PKG_USER-INTEL)
    endif()
  endif()
  if(INTEL_LRT_MODE STREQUAL "C++11")
    add_definitions(-DLMP_INTEL_USERLRT -DLMP_INTEL_LRT11)
    add_definitions(-DLMP_INTEL_USELRT -DLMP_INTEL_LRT11)
  endif()

  if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+5 −1
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ via apt-get and all files are accessible in both the Windows Explorer and your
Linux shell (bash). This avoids switching to a different operating system or
installing a virtual machine. Everything runs on Windows.

.. seealso::

   You can find more detailed information at the `Windows Subsystem for Linux Installation Guide for Windows 10 <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_.

Installing Bash on Windows
--------------------------

@@ -103,7 +107,7 @@ needed for various LAMMPS features:

.. code-block:: bash

   sudo apt install -y build-essential ccache gfortran openmpi-bin libopenmpi-dev libfftw3-dev libjpeg-dev libpng12-dev python-dev python-virtualenv libblas-dev liblapack-dev libhdf5-serial-dev hdf5-tools
   sudo apt install -y build-essential ccache gfortran openmpi-bin libopenmpi-dev libfftw3-dev libjpeg-dev libpng-dev python-dev python-virtualenv libblas-dev liblapack-dev libhdf5-serial-dev hdf5-tools

Files in Ubuntu on Windows
^^^^^^^^^^^^^^^^^^^^^^^^^^
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ Examples
   bond_coeff * 2.0 0.25 0.7564

   bond_style oxrna2/fene
   bond_coeff \* 2.0 0.25 0.76107
   bond_coeff * 2.0 0.25 0.76107

Description
"""""""""""
+7 −7
Original line number Diff line number Diff line
@@ -29,14 +29,14 @@ Description

Calculate forces through finite difference calculations of energy
versus position.  These forces can be compared to analytic forces
computed by pair styles, bond styles, etc.  E.g. for debugging
purposes.
computed by pair styles, bond styles, etc.  This can be useful for
debugging or other purposes.

The group specified with the command means only atoms within the group
have their averages computed.  Results are set to 0.0 for atoms not in
the group.

This fix performs a loop over all atoms (in the group).  For each atom
This fix performs a loop over all atoms in the group.  For each atom
and each component of force it adds *delta* to the position, and
computes the new energy of the entire system.  It then subtracts
*delta* from the original position and again computes the new energy
@@ -66,10 +66,10 @@ by two times *delta*.
.. note::

   The cost of each energy evaluation is essentially the cost of an MD
   timestep.  This invoking this fix once has a cost of 2N timesteps,
   where N is the total number of atoms in the system (assuming all atoms
   are included in the group).  So this fix can be very expensive to use
   for large systems.
   timestep.  Thus invoking this fix once for a 3d system has a cost
   of 6N timesteps, where N is the total number of atoms in the system
   (assuming all atoms are included in the group).  So this fix can be
   very expensive to use for large systems.

----------

Loading