Commit 9c3748e0 authored by Steven J. Plimpton's avatar Steven J. Plimpton
Browse files

change Python.txt to Python_head.txt, adapt GPU package syntax

parent ad9126f3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -162,9 +162,10 @@ cmake ../cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_For
NOTE: When the cmake command completes, it prints info to the screen
as to which compilers it is using, and what flags will be used in the
compilation.  Note that if the top-level compiler is mpicxx, it is
simply a wrapper on a real compiler.  The low-level compiler info is
also in the Cmake output.  You should check to insure you are using
the compiler and optimization flags are the ones you want.
simply a wrapper on a real compiler.  The underlying compiler info is
what will be listed in the CMake output.  You should check to insure
you are using the compiler and optimization flags are the ones you
want.

[Makefile.machine settings]:

+17 −6
Original line number Diff line number Diff line
@@ -84,12 +84,22 @@ which GPU hardware to build for.
-D OCL_TUNE=value     # hardware choice for GPU_API=opencl
                      # generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
-D GPU_ARCH=value     # hardware choice for GPU_API=cuda
                      # value = 20 (Fermi) or 30 (Kepler) or 50 (Maxwell) or 60 (Pascal) or 70 (Volta)
                      # default is Cuda-compiler dependent, but typically Fermi
                      # value = sm_XX, see below
                      # default is Cuda-compiler dependent, but typically sm_20
-D CUDPP_OPT=value    # optimization setting for GPU_API=cudea
                      # enables CUDA Performance Primitives Optimizations
                      # yes (default) or no :pre

GPU_ARCH settings for different GPU hardware is as follows:

sm_20 for Fermi (C2050/C2070, deprecated as of CUDA 8.0) or GeForce GTX 580 or similar
sm_30 for Kepler (K10)
sm_35 for Kepler (K40) or GeForce GTX Titan or similar
sm_37 for Kepler (dual K80)
sm_50 for Maxwell
sm_60 for Pascal (P100)
sm_70 for Volta :ul

[Traditional make]:

Before building LAMMPS, you must build the GPU library in lib/gpu.
@@ -107,18 +117,19 @@ script with the specified args:
make lib-gpu               # print help message
make lib-gpu args="-b"     # build GPU library with default Makefile.linux
make lib-gpu args="-m xk7 -p single -o xk7.single"  # create new Makefile.xk7.single, altered for single-precision
make lib-gpu args="-m mpi -p mixed -b" # build GPU library with mixed precision using settings in Makefile.mpi :pre
make lib-gpu args="-m mpi -a sm_60 -p mixed -b" # build GPU library with mixed precision and P100 using other settings in Makefile.mpi :pre

Note that this procedure starts with a Makefile.machine in lib/gpu, as
specified by the "-m" switch.  For your convenience, machine makefiles
for "mpi" and "serial" are provided, which have the same settings as
the corresponding machine makefiles in the main LAMMPS source
folder. In addition you can alter 4 important settings in the
Makefile.machine you start from via the -h, -a, -p, -e switches, and
also save a copy of the new Makefile if desired:
Makefile.machine you start from via the corresponding -h, -a, -p, -e
switches (as in the examples above), and also save a copy of the new
Makefile if desired:

CUDA_HOME = where NVIDIA CUDA software is installed on your system
CUDA_ARCH = what GPU hardware you have (same as CMake, see help message for details)
CUDA_ARCH = sm_XX, what GPU hardware you have, same as CMake GPU_ARCH above
CUDA_PRECISION = precision (double, mixed, single)
EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul

+1 −1
Original line number Diff line number Diff line
"Previous Section"_Python.html - "LAMMPS WWW Site"_lws -
"Previous Section"_Python_head.html - "LAMMPS WWW Site"_lws -
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next
Section"_Manual.html :c

+3 −3
Original line number Diff line number Diff line
@@ -84,9 +84,9 @@ supports a vanilla C-like interface). For example, from C++ you could
create one (or more) "instances" of LAMMPS, pass it an input script to
process, or execute individual commands, all by invoking the correct
class methods in LAMMPS.  From C or Fortran you can make function
calls to do the same things.  See the "Python"_Python.html doc pages
for a description of the Python wrapper provided with LAMMPS that
operates through the LAMMPS library interface.
calls to do the same things.  See the "Python"_Python_head.html doc
pages for a description of the Python wrapper provided with LAMMPS
that operates through the LAMMPS library interface.

The files src/library.cpp and library.h contain the C-style interface
to LAMMPS.  See the "Howto library"_Howto_library.html doc page for a
+3 −3
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ Library interface to LAMMPS :h3
As described on the "Build basics"_Build_basics.html doc page, LAMMPS
can be built as a library, so that it can be called by another code,
used in a "coupled manner"_Howto_couple.html with other codes, or
driven through a "Python interface"_Python.html.
driven through a "Python interface"_Python_head.html.

All of these methodologies use a C-style interface to LAMMPS that is
provided in the files src/library.cpp and src/library.h.  The
@@ -35,8 +35,8 @@ details.

NOTE: You can write code for additional functions as needed to define
how your code talks to LAMMPS and add them to src/library.cpp and
src/library.h, as well as to the "Python interface"_Python.html.  The
added functions can access or change any internal LAMMPS data you
src/library.h, as well as to the "Python interface"_Python_head.html.
The added functions can access or change any internal LAMMPS data you
wish.

void lammps_open(int, char **, MPI_Comm, void **)
Loading