Unverified Commit c471902d authored by Jacob Gissinger's avatar Jacob Gissinger Committed by GitHub
Browse files

Merge pull request #23 from lammps/master

rebase
parents 3aedfbf9 413fdbbf
......@@ -276,11 +276,14 @@ endif()
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
find_package(LAPACK)
if(NOT LAPACK_FOUND)
find_package(BLAS)
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
enable_language(Fortran)
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.[fF])
add_library(linalg STATIC ${LAPACK_SOURCES})
set(LAPACK_LIBRARIES linalg)
else()
list(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif()
endif()
......
......@@ -275,6 +275,16 @@ cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake
</dl>
</td>
</tr>
<tr>
<td><code>BUILD_EXE</code></td>
<td>control whether to build LAMMPS executable</td>
<td>
<dl>
<dt><code>on</code> (default)</dt>
<dt><code>off</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>BUILD_SHARED_LIBS</code></td>
<td>control whether to build LAMMPS as a shared-library</td>
......
......@@ -31,7 +31,7 @@ SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocess
SOURCES=$(filter-out $(wildcard src/lammps_commands*.txt) src/lammps_support.txt src/lammps_tutorials.txt,$(wildcard src/*.txt))
OBJECTS=$(SOURCES:src/%.txt=$(RSTDIR)/%.rst)
.PHONY: help clean-all clean epub html pdf old venv spelling anchor_check
.PHONY: help clean-all clean epub mobi html pdf old venv spelling anchor_check
# ------------------------------------------
......@@ -42,6 +42,8 @@ help:
@echo " old create old-style HTML doc pages in old dir"
@echo " fetch fetch HTML and PDF files from LAMMPS web site"
@echo " epub create ePUB format manual for e-book readers"
@echo " mobi convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)"
@echo " (requires ebook-convert tool from calibre)"
@echo " clean remove all intermediate RST files"
@echo " clean-all reset the entire build environment"
@echo " txt2html build txt2html tool"
......@@ -106,6 +108,11 @@ epub: $(OBJECTS)
@rm -rf epub
@echo "Build finished. The ePUB manual file is created."
mobi: epub
@rm -f LAMMPS.mobi
@ebook-convert LAMMPS.epub LAMMPS.mobi
@echo "Conversion finished. The MOBI manual file is created."
pdf: utils/txt2html/txt2html.exe
@(\
set -e; \
......
......@@ -28,6 +28,7 @@ as described on the "Install"_Install.html doc page.
Build_settings
Build_package
Build_extras
Build_windows
END_RST -->
......@@ -39,7 +40,8 @@ END_RST -->
"Basic build options"_Build_basics.html
"Optional build settings"_Build_settings.html
"Include packages in build"_Build_package.html
"Packages with extra build options"_Build_extras.html :all(b)
"Packages with extra build options"_Build_extras.html
"Notes for building LAMMPS on Windows"_Build_windows.html :all(b)
If you have problems building LAMMPS, it is often due to software
issues on your local machine. If you can, find a local expert to
......
......@@ -61,7 +61,7 @@ library files. Failing this, these 3 variables can be used to specify
where the mpi.h file (MPI_INC), and the MPI library files (MPI_PATH)
are found, and the name of the library files (MPI_LIB).
For a serial build, you need to specify the 3 varaibles, as shown
For a serial build, you need to specify the 3 variables, as shown
above.
For a serial LAMMPS build, use the dummy MPI library provided in
......@@ -145,7 +145,7 @@ By default CMake will use a compiler it finds and it will add
optimization flags appropriate to that compiler and any "accelerator
packages"_Speed_packages.html you have included in the build.
You can tell CMake to look for a specific compiler with these varaible
You can tell CMake to look for a specific compiler with these variable
settings. Likewise you can specify the FLAGS variables if you want to
experiment with alternate optimization flags. You should specify all
3 compilers, so that the small number of LAMMPS source files written
......@@ -216,8 +216,8 @@ LAMMPS can be built as either an executable or as a static or shared
library. The LAMMPS library can be called from another application or
a scripting language. See the "Howto couple"_Howto_couple.html doc
page for more info on coupling LAMMPS to other codes. See the
"Python"_Python doc page for more info on wrapping and running LAMMPS
from Python via its library interface.
"Python"_Python_head.html doc page for more info on wrapping and
running LAMMPS from Python via its library interface.
[CMake variables]:
......@@ -247,7 +247,7 @@ Note that for a shared library to be usable by a calling program, all
the auxiliary libraries it depends on must also exist as shared
libraries. This will be the case for libraries included with LAMMPS,
such as the dummy MPI library in src/STUBS or any package libraries in
the lib/packages directroy, since they are always built as shared
the lib/packages directory, since they are always built as shared
libraries using the -fPIC switch. However, if a library like MPI or
FFTW does not exist as a shared library, the shared library build will
generate an error. This means you will need to install a shared
......@@ -299,7 +299,7 @@ Install LAMMPS after a build :h4,link(install)
After building LAMMPS, you may wish to copy the LAMMPS executable of
library, along with other LAMMPS files (library header, doc files) to
a globally visible place on your system, for others to access. Note
that you may need super-user priveleges (e.g. sudo) if the directory
that you may need super-user privileges (e.g. sudo) if the directory
you want to copy files to is protected.
[CMake variable]:
......
......@@ -40,7 +40,7 @@ executable called "lmp" and a library called "liblammps.a" in the
If your machine has multiple CPU cores (most do these days), using a
command like "make -jN" (with N being the number of available local
CPU cores) can be much faster. If you plan to do development on
LAMMPS or need to recompile LAMMPS repeatedly, installation of the
LAMMPS or need to re-compile LAMMPS repeatedly, installation of the
ccache (= Compiler Cache) software may speed up compilation even more.
After compilation, you can optionally copy the LAMMPS executable and
......@@ -50,7 +50,7 @@ make install # optional, copy LAMMPS executable & library elsewhere :pre
:line
There are 3 variants of CMake: a command-line verison (cmake), a text mode
There are 3 variants of CMake: a command-line version (cmake), a text mode
UI version (ccmake), and a graphical GUI version (cmake-GUI). You can use
any of them interchangeably to configure and create the LAMMPS build
environment. On Linux all the versions produce a Makefile as their
......@@ -188,7 +188,7 @@ module list # is a cmake module already loaded?
module avail # is a cmake module available?
module load cmake3 # load cmake module with appropriate name :pre
Most Linux distributions offer precompiled cmake packages through
Most Linux distributions offer pre-compiled cmake packages through
their package management system. If you do not have CMake or a new
enough version, you can download the latest version at
"https://cmake.org/download/"_https://cmake.org/download/.
......
......@@ -340,7 +340,7 @@ NOTE: the use of the MEAM package is discouraged, as it has been
superseded by the USER-MEAMC package, which is a direct translation of
the Fortran code in the MEAM library to C++. The code in USER-MEAMC
should be functionally equivalent to the MEAM package, fully supports
use of "pair_style hybrid"_pair_hybrid.html (the MEAM packaged doesn
use of "pair_style hybrid"_pair_hybrid.html (the MEAM package does
not), and has optimizations that make it significantly faster than the
MEAM package.
......@@ -470,7 +470,7 @@ lib/python/README for more details.
-D PYTHON_EXECUTABLE=path # path to Python executable to use :pre
Without this setting, CMake will ues the default Python on your
Without this setting, CMake will guess the default Python on your
system. To use a different Python version, you can either create a
virtualenv, activate it and then run cmake. Or you can set the
PYTHON_EXECUTABLE variable to specify which Python interpreter should
......@@ -687,7 +687,7 @@ the HDF5 library.
No additional settings are needed besides "-D PKG_USER-H5MD=yes".
This should autodetect the H5MD library on your system. Several
This should auto-detect the H5MD library on your system. Several
advanced CMake H5MD options exist if you need to specify where it is
installed. Use the ccmake (terminal window) or cmake-gui (graphical)
tools to see these options and set them interactively from their user
......@@ -777,7 +777,7 @@ on your system.
No additional settings are needed besides "-D PKG_USER-NETCDF=yes".
This should autodetect the NETCDF library if it is installed on your
This should auto-detect the NETCDF library if it is installed on your
system at standard locations. Several advanced CMake NETCDF options
exist if you need to specify where it was installed. Use the ccmake
(terminal window) or cmake-gui (graphical) tools to see these options
......@@ -905,7 +905,7 @@ Eigen3 is a template library, so you do not need to build it.
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location) :pre
If DOWNLOAD_EIGEN3 is set, the Eigen3 library will be downloaded and
inside the CMake build directory. If the Eig3n3 library is already on
inside the CMake build directory. If the Eigen3 library is already on
your system (in a location CMake cannot find it), EIGEN3_INCLUDE_DIR
is the directory the Eigen3++ include file is in.
......@@ -936,7 +936,7 @@ your system.
No additional settings are needed besides "-D PKG_USER-VTK=yes".
This should autodetect the VTK library if it is installed on your
This should auto-detect the VTK library if it is installed on your
system at standard locations. Several advanced VTK options exist if
you need to specify where it was installed. Use the ccmake (terminal
window) or cmake-gui (graphical) tools to see these options and set
......
......@@ -35,16 +35,16 @@ This initial compilation can take a long time, since LAMMPS is a large
project with many features. If your machine has multiple CPU cores
(most do these days), using a command like "make -jN mpi" (with N =
the number of available CPU cores) can be much faster. If you plan to
do development on LAMMPS or need to recompile LAMMPS repeatedly, the
do development on LAMMPS or need to re-compile LAMMPS repeatedly, the
installation of the ccache (= Compiler Cache) software may speed up
compilation even more.
After the initial build, whenever you edit LAMMPS source files, or add
or remove new files to the source directory (e.g. by installing or
uninstalling packages), you must recompile and relink the LAMMPS
uninstalling packages), you must re-compile and relink the LAMMPS
executable with the same "make" command. This makefiles dependencies
should insure that only the subset of files that need to be are
recompiled.
re-compiled.
NOTE: When you build LAMMPS for the first time, a long list of *.d
files will be printed out rapidly. This is not an error; it is the
......@@ -71,8 +71,8 @@ Makefiles you may wish to try include these (some require a package
first be installed). Many of these include specific compiler flags
for optimized performance. Please note, however, that some of these
customized machine Makefile are contributed by users. Since both
compilers, OS configs, and LAMMPS itself keep changing, their settings
may become outdated:
compilers, OS configurations, and LAMMPS itself keep changing, their
settings may become outdated:
make mac # build serial LAMMPS on a Mac
make mac_mpi # build parallel LAMMPS on a Mac
......
......@@ -80,8 +80,8 @@ per-timestep CPU cost, FFTs are only a portion of long-range
Coulombics, and 1d FFTs are only a portion of the FFT cost (parallel
communication can be costly). A breakdown of these timings is printed
to the screen at the end of a run using the "kspace_style
pppm"_kspace_style.html command. The "Run output"_doc page gives more
details.
pppm"_kspace_style.html command. The "Run output"_Run_output.html
doc page gives more details.
FFTW is a fast, portable FFT library that should also work on any
platform and can be faster than the KISS FFT library. You can
......@@ -101,7 +101,7 @@ Performing 3d FFTs in parallel can be time consuming due to data
access and required communication. This cost can be reduced by
performing single-precision FFTs instead of double precision. Single
precision means the real and imaginary parts of a complex datum are
4-byte floats. Double precesion means they are 8-byte doubles. Note
4-byte floats. Double precision means they are 8-byte doubles. Note
that Fourier transform and related PPPM operations are somewhat less
sensitive to floating point truncation errors and thus the resulting
error is less than the difference in precision. Using the -DFFT_SINGLE
......@@ -193,7 +193,7 @@ Output of JPG, PNG, and movie files :h4,link(graphics)
The "dump image"_dump_image.html command has options to output JPEG or
PNG image files. Likewise the "dump movie"_dump_image.html command
ouputs movie files in MPEG format. Using these options requires the
outputs movie files in MPEG format. Using these options requires the
following settings:
[CMake variables]:
......@@ -206,7 +206,7 @@ following settings:
# default = yes if CMake can find ffmpeg, else no :pre
Usually these settings are all that is needed. If CMake cannot find
the graphics header, library, executuable files, you can set these
the graphics header, library, executable files, you can set these
variables:
-D JPEG_INCLUDE_DIR=path # path to jpeglib.h header file
......
"Higher level section"_Build.html - "LAMMPS WWW Site"_lws - "LAMMPS
Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
Notes for building LAMMPS on Windows :h3
"General remarks"_#generic
"Running Linux on Windows"_#linux
"Using GNU GCC ported to Windows"_#gnu
"Using a cross-compiler"_#cross :ul
:line
General remarks :h4,link(generic)
LAMMPS is developed and tested primarily on Linux machines. The vast
majority of HPC clusters and supercomputers today runs on Linux as well.
Thus portability to other platforms is desired, but not always achieved.
The LAMMPS developers strongly rely on LAMMPS users giving feedback and
providing assistance in resolving portability issues. This particularly
true for compiling LAMMPS on Windows, since this platform has significant
differences with some low-level functionality.
Running Linux on Windows :h4,link(linux)
So before trying to build LAMMPS on Windows, please consider if using
the pre-compiled Windows binary packages are sufficient for your needs
(as an aside, those packages themselves are build on a Linux machine
using cross-compilers). If it is necessary for your to compile LAMMPS
on a Windows machine (e.g. because it is your main desktop), please also
consider using a virtual machine software and run a Linux virtual machine,
or - if have a recently updated Windows 10 installation - consider using
the Windows subsystem for Linux, which allows to run a bash shell from
Ubuntu and from there on, you can pretty much use that shell like you
are running on an Ubuntu Linux machine (e.g. installing software via
apt-get). For more details on that, please see "this tutorial"_Howto_bash.html
Using GNU GCC ported to Windows :h4,link(gnu)
One option for compiling LAMMPS on Windows natively, that has been known
to work in the past is to install a bash shell, unix shell utilities,
perl, GNU make, and a GNU compiler ported to Windows. The Cygwin package
provides a unix/linux interface to low-level Windows functions, so LAMMPS
can be compiled on Windows. The necessary (minor) modifications to LAMMPS
are included, but may not always up-to-date for recently added functionality
and the corresponding new code. A machine makefile for using cygwin for
the old build system is provided. The CMake build system is untested
for this; you will have to request that makefiles are generated and
manually set the compiler.
When compiling for Windows [not] set the -DLAMMPS_MEMALIGN define
in the LMP_INC makefile variable and add -lwsock32 -lpsapi to the linker
flags in LIB makefile variable. Try adding -static-libgcc or -static or
both to the linker flags when your resulting LAMMPS Windows executable
complains about missing .dll files. The CMake configuration should set
this up automatically, but is untested.
In case of problems, you are recommended to contact somebody with
experience in using cygwin. If you do come across portability problems
requiring changes to the LAMMPS source code, or figure out corrections
yourself, please report them on the lammps-users mailing list, or file
them as an issue or pull request on the LAMMPS github project.
Using a cross-compiler :h4,link(cross)
If you need to provide custom LAMMPS binaries for Windows, but do not
need to do the compilation on Windows, please consider using a Linux
to Windows cross-compiler. This is how currently the Windows binary
packages are created by the LAMMPS developers. Because of that, this is
probably the currently best tested and supported way to build LAMMPS
executables for Windows. There are makefiles provided for the
traditional build system, but CMake has also been successfully tested
using the mingw32-cmake and mingw64-cmake wrappers that are bundled
with the cross-compiler environment on Fedora machines.
Please keep in mind, though, that this only applies to compiling LAMMPS.
Whether the resulting binaries do work correctly is no tested by the
LAMMPS developers. We instead rely on the feedback of the users
of these pre-compiled LAMMPS packages for Windows. We will try to resolve
issues to the best of our abilities if we become aware of them. However
this is subject to time constraints and focus on HPC platforms.
Native Visual C++ support :h4,link(native)
Support for the Visual C++ compilers is currently not available. The
CMake build system is capable of creating suitable a Visual Studio
style build environment, but the LAMMPS code itself is not fully ported
to support Visual C++. Volunteers to take on this task are welcome.
......@@ -19,7 +19,7 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
All commands :h3
An alphabetic list of all LAMMPS commmands.
An alphabetic list of all LAMMPS commands.
"angle_coeff"_angle_coeff.html,
"angle_style"_angle_style.html,
......
......@@ -95,7 +95,7 @@ OPT.
"helix (o)"_dihedral_helix.html,
"multi/harmonic (o)"_dihedral_multi_harmonic.html,
"nharmonic (o)"_dihedral_nharmonic.html,
"opls (iko)"_dihedral_opls.htm;,
"opls (iko)"_dihedral_opls.html,
"quadratic (o)"_dihedral_quadratic.html,
"spherical (o)"_dihedral_spherical.html,
"table (o)"_dihedral_table.html,
......
......@@ -14,7 +14,7 @@ LAMMPS commands are case sensitive. Command names are lower-case, as
are specified command arguments. Upper case letters may be used in
file names or user-chosen ID strings.
Here are 6 rulse for how each line in the input script is parsed by
Here are 6 rules for how each line in the input script is parsed by
LAMMPS:
(1) If the last printable character on the line is a "&" character,
......@@ -71,7 +71,7 @@ floating-point value. The format string is used to output the result
of the variable expression evaluation. If a format string is not
specified a high-precision "%.20g" is used as the default.
This can be useful for formatting print output to a desired precion:
This can be useful for formatting print output to a desired precision:
print "Final energy per atom: $(pe/atoms:%10.3f) eV/atom" :pre
......
......@@ -743,7 +743,7 @@ Self-explanatory. :dd
Self-explanatory. :dd
{Cannot (yet) use single precision with MSM (remove -DFFT_SINGLE from Makefile and recompile)} :dt
{Cannot (yet) use single precision with MSM (remove -DFFT_SINGLE from Makefile and re-compile)} :dt
Single precision cannot be used with MSM. :dd
......@@ -5078,7 +5078,7 @@ Self-explanatory. :dd
Occurs when number of neighbor atoms for an atom increased too much
during a run. Increase SAFE_ZONE and MIN_CAP in fix_qeq.h and
recompile. :dd
re-compile. :dd
{Fix qeq/point requires atom attribute q} :dt
......@@ -5092,7 +5092,7 @@ Self-explanatory. :dd
Occurs when number of neighbor atoms for an atom increased too much
during a run. Increase SAFE_ZONE and MIN_CAP in fix_qeq.h and
recompile. :dd
re-compile. :dd
{Fix qeq/shielded requires atom attribute q} :dt
......@@ -5110,7 +5110,7 @@ Self-explanatory. :dd
Occurs when number of neighbor atoms for an atom increased too much
during a run. Increase SAFE_ZONE and MIN_CAP in fix_qeq.h and
recompile. :dd
re-compile. :dd
{Fix qeq/slater requires atom attribute q} :dt
......@@ -5541,7 +5541,7 @@ See the package gpu command. :dd
{GPUs are requested but Kokkos has not been compiled for CUDA} :dt
Recompile Kokkos with CUDA support to use GPUs. :dd
Re-compile Kokkos with CUDA support to use GPUs. :dd
{Ghost velocity forward comm not yet implemented with Kokkos} :dt
......
......@@ -13,7 +13,7 @@ This is an alphabetic list of the WARNING messages LAMMPS prints out
and the reason why. If the explanation here is not sufficient, the
documentation for the offending command may help. Warning messages
also list the source file and line number where the warning was
generated. For example, a message lile this:
generated. For example, a message like this:
WARNING: Bond atom missing in box size check (domain.cpp:187) :pre
......
......@@ -64,11 +64,11 @@ Thermodynamic output, which can be setup via the
"thermo_style"_thermo_style.html command, often includes pressure
values. As explained on the doc page for the
"thermo_style"_thermo_style.html command, the default pressure is
setup by the thermo command itself. It is NOT the presure associated
setup by the thermo command itself. It is NOT the pressure associated
with any barostatting fix you have defined or with any compute you
have defined that calculates a presure. The doc pages for the
have defined that calculates a pressure. The doc pages for the
barostatting fixes explain the ID of the pressure compute they create.
Thus if you want to view these pressurse, you need to specify them
Thus if you want to view these pressures, you need to specify them
explicitly via the "thermo_style custom"_thermo_style.html command.
Or you can use the "thermo_modify"_thermo_modify.html command to
re-define what pressure compute is used for default thermodynamic
......
......@@ -337,7 +337,7 @@ the sphere that surrounds each vertex. The diameter value can be
different for each body particle. These floating-point values can be
listed on as many lines as you wish; see the
"read_data"_read_data.html command for more details. Because the
maxmimum vertices per face is hard-coded to be 4
maximum number of vertices per face is hard-coded to be 4
(i.e. quadrilaterals), faces with more than 4 vertices need to be
split into triangles or quadrilaterals. For triangular faces, the
last vertex index should be set to -1.
......
......@@ -171,16 +171,16 @@ void lammps_create_atoms(void *, int, tagint *, int *, double *, double *,
The gather functions collect peratom info of the requested type (atom
coords, atom types, forces, etc) from all processors, and returns the
same vector of values to each callling processor. The scatter
same vector of values to each calling processor. The scatter
functions do the inverse. They distribute a vector of peratom values,
passed by all calling processors, to invididual atoms, which may be
owned by different processos.
passed by all calling processors, to individual atoms, which may be
owned by different processors.
The lammps_gather_atoms() function does this for all N atoms in the
system, ordered by atom ID, from 1 to N. The
lammps_gather_atoms_concat() function does it for all N atoms, but
simply concatenates the subset of atoms owned by each processor. The
resulting vector is not ordered by atom ID. Atom IDs can be requetsed
resulting vector is not ordered by atom ID. Atom IDs can be requested
by the same function if the caller needs to know the ordering. The
lammps_gather_subset() function allows the caller to request values
for only a subset of atoms (identified by ID).
......
......@@ -73,7 +73,7 @@ that package into your current Python installation.
cd $LAMMPS_DIR/python
python install.py :pre
NOTE: Recompiling the shared library requires reinstalling the Python package
NOTE: Recompiling the shared library requires re-installing the Python package
Installation inside of a virtualenv :h5
......
......@@ -159,7 +159,7 @@ ellipsoidal particles:
The advantage of these fixes is that those which thermostat the
particles include the rotational degrees of freedom in the temperature
calculation and thermostatting. The "fix langevin"_fix_langevin
calculation and thermostatting. The "fix langevin"_fix_langevin.html
command can also be used with its {omgea} or {angmom} options to
thermostat the rotational degrees of freedom for spherical or
ellipsoidal particles. Other thermostatting fixes only operate on the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment