diff --git a/doc/src/Build_basics.txt b/doc/src/Build_basics.txt index 79c22d8fe4a11ffcce68532644107ecfbaaabc80..425266a35fd8e40bf1e30831245101f2d0695b0b 100644 --- a/doc/src/Build_basics.txt +++ b/doc/src/Build_basics.txt @@ -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]: diff --git a/doc/src/Build_extras.txt b/doc/src/Build_extras.txt index b55efa02a7d59ebbd0dd384593f10c0bdb0ec390..a3a05ed50ee8c2fbda866f9439ea3279d040c86e 100644 --- a/doc/src/Build_extras.txt +++ b/doc/src/Build_extras.txt @@ -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 diff --git a/doc/src/Errors.txt b/doc/src/Errors.txt index a8d8d3a18e5951fc4bc9775e242d74e3df41c6b1..10f84874a32a6b187aa11e306f698695f0e607bd 100644 --- a/doc/src/Errors.txt +++ b/doc/src/Errors.txt @@ -1,4 +1,4 @@ -"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 diff --git a/doc/src/Howto_couple.txt b/doc/src/Howto_couple.txt index 4c0f72a806e5982759b4f0909f93e22adb2b825f..d7b4924d8cda690ef5204f6adabab34f2fff0a7d 100644 --- a/doc/src/Howto_couple.txt +++ b/doc/src/Howto_couple.txt @@ -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 diff --git a/doc/src/Howto_library.txt b/doc/src/Howto_library.txt index 8e99182f872cc15f0a6f99957dff10f9063dc286..741078e7eb7cb74a574c0e0bada4cca4414cce89 100644 --- a/doc/src/Howto_library.txt +++ b/doc/src/Howto_library.txt @@ -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 **) diff --git a/doc/src/Intro_nonfeatures.txt b/doc/src/Intro_nonfeatures.txt index 41f001fc8b675de6c1e3624b1695dd3bfc5ca96c..87ab42e2acc3a74fa0b96346f11e8fefbf8ea848 100644 --- a/doc/src/Intro_nonfeatures.txt +++ b/doc/src/Intro_nonfeatures.txt @@ -28,7 +28,7 @@ GUI: LAMMPS can be built as a library and a Python wrapper that wraps the library interface is provided. Thus, GUI interfaces can be written in Python (or C or C++ if desired) that run LAMMPS and visualize or plot its output. Examples of this are provided in the -python directory and described on the "Python"_Python.html doc +python directory and described on the "Python"_Python_head.html doc page. :ulb,l Builder: Several pre-processing tools are packaged with LAMMPS. Some @@ -68,7 +68,7 @@ page"_http://lammps.sandia.gov/viz.html page of the LAMMPS website for visualization packages that can use LAMMPS output data. :l Plotting: See the next bullet about Pizza.py as well as the -"Python"_Python.html doc page for examples of plotting LAMMPS output. +"Python"_Python_head.html doc page for examples of plotting LAMMPS output. Scripts provided with the {python} tool in the tools directory will extract and massage data in log and dump files to make it easier to analyze and plot. See the "Tools"_Tools.html doc page for more diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index ad2a41d6bc12c190a63c44b7c9aa70a28a9ee11e..ca30f32311bb24d04b45367ea1076974b0502707 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -47,9 +47,9 @@ all LAMMPS development is coordinated. "PDF file"_Manual.pdf of the entire manual, generated by "htmldoc"_http://freecode.com/projects/htmldoc -The content for this manual is part of the LAMMPS distribution. -You can build a local copy of the Manual as HTML pages or a PDF file, -by following the steps on the "this page"_Manual_build.html. +The content for this manual is part of the LAMMPS distribution. You +can build a local copy of the Manual as HTML pages or a PDF file, by +following the steps on the "Manual build"_Manual_build.html doc page. There is also a "Developer.pdf"_Developer.pdf document which gives a brief description of the basic code structure of LAMMPS. @@ -82,7 +82,7 @@ every LAMMPS command. Examples Tools Modify - Python + Python_head Errors Manual_build @@ -120,8 +120,9 @@ END_RST --> "Example scripts"_Examples.html :l "Auxiliary tools"_Tools.html :l "Modify & extend LAMMPS"_Modify.html :l -"Use Python with LAMMPS"_Python.html :l +"Use Python with LAMMPS"_Python_head.html :l "Errors"_Errors.html :l +"Building the LAMMPS manual"_Manual_build.html :l :ole <!-- END_HTML_ONLY --> diff --git a/doc/src/Manual_build.txt b/doc/src/Manual_build.txt index 2be4b98960e77ab80d81e4d7f7ca7eebaa15dd80..747a55a7296d0ab206c0119ecb7a85dd5e8e7a36 100644 --- a/doc/src/Manual_build.txt +++ b/doc/src/Manual_build.txt @@ -8,7 +8,7 @@ Section"_Manual.html :c :line -Building the LAMMPS Manual :h2 +Building the LAMMPS manual :h2 Depending on how you obtained LAMMPS, the doc directory has 2 or 3 sub-directories and optionally 2 PDF files and an ePUB file: diff --git a/doc/src/Modify.txt b/doc/src/Modify.txt index 6189b9ba3e328ace0f6ba34f3574c5c9d47aae9b..666aaba8a77a4d69eccbe9fe8b381e5c1d494dc1 100644 --- a/doc/src/Modify.txt +++ b/doc/src/Modify.txt @@ -1,6 +1,6 @@ "Previous Section"_Tools.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next -Section"_Python.html :c +Section"_Python_head.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Packages_details.txt b/doc/src/Packages_details.txt index ff0ce7844c96deaea6a8e15ebc571a2b548f2a13..5ab85a80c842c8a0a1672af8140e27e0be33d0e8 100644 --- a/doc/src/Packages_details.txt +++ b/doc/src/Packages_details.txt @@ -763,8 +763,8 @@ A "python"_python.html command which allow you to execute Python code from a LAMMPS input script. The code can be in a separate file or embedded in the input script itself. See the "Python call"_Python_call.html doc page for an overview of using Python from -LAMMPS in this manner and all the "Python"_Python.html doc pages for -other ways to use LAMMPS and Python together. +LAMMPS in this manner and all the "Python"_Python_head.html doc pages +for other ways to use LAMMPS and Python together. NOTE: Building with the PYTHON package assumes you have a Python shared library available on your system, which needs to be a Python 2 @@ -780,7 +780,7 @@ extras"_Build_extras.html doc page. [Supporting info:] src/PYTHON: filenames -> commands -"Python call"_Python.html +"Python call"_Python_head.html lib/python/README examples/python :ul diff --git a/doc/src/Python_call.txt b/doc/src/Python_call.txt index 621f1fe2410f7f7d58e193466481cc3cd19a4578..029c8f831cc537da73f898ac5ba3172036a54faf 100644 --- a/doc/src/Python_call.txt +++ b/doc/src/Python_call.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_examples.txt b/doc/src/Python_examples.txt index 46e5fee2b97da5d4f46644883434729c6e5406ad..f4b2197464312286a4a5cacd7600ba4c5bc56007 100644 --- a/doc/src/Python_examples.txt +++ b/doc/src/Python_examples.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python.txt b/doc/src/Python_head.txt similarity index 100% rename from doc/src/Python.txt rename to doc/src/Python_head.txt diff --git a/doc/src/Python_install.txt b/doc/src/Python_install.txt index 85cf267de06f543d092114e473eff44aa3149006..97f6bf3c3a6ba5c21bb9f043d9d7313b769c7742 100644 --- a/doc/src/Python_install.txt +++ b/doc/src/Python_install.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_library.txt b/doc/src/Python_library.txt index 8d0c724a45992294f7860612e5042387efc150ec..9a3ea93fc30ee932cbc1a85e374f37fb41bddee9 100644 --- a/doc/src/Python_library.txt +++ b/doc/src/Python_library.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_mpi.txt b/doc/src/Python_mpi.txt index 6e0a2ce3198fd79bb98d1bf24fe0e60675de72ce..96c42e0d0ff2a06ff889f3c5072047df6677632f 100644 --- a/doc/src/Python_mpi.txt +++ b/doc/src/Python_mpi.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_pylammps.txt b/doc/src/Python_pylammps.txt index d7baa93e2e69154b20fdc2f7f4666f500f2d6a02..303ac21a276fcab9444a33686b2373ee79cfae53 100644 --- a/doc/src/Python_pylammps.txt +++ b/doc/src/Python_pylammps.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_run.txt b/doc/src/Python_run.txt index a94dc07f2d7368ec8086fc1535337ed3c245f82f..963248efced3a9ce8a084cf3411f562e33f00138 100644 --- a/doc/src/Python_run.txt +++ b/doc/src/Python_run.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_shlib.txt b/doc/src/Python_shlib.txt index 206f56688c80c9107ab7a20f8df0343e52733b03..91c90d9a8f46628102a7ce200fb535e873a9061c 100644 --- a/doc/src/Python_shlib.txt +++ b/doc/src/Python_shlib.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/Python_test.txt b/doc/src/Python_test.txt index 3d52485aa8726fe4eddae6ee1a5420315d584eeb..2bfec91bd60827dcfaab23ca389ea065cb92b846 100644 --- a/doc/src/Python_test.txt +++ b/doc/src/Python_test.txt @@ -1,5 +1,5 @@ -"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS -Documentation"_ld - "LAMMPS Commands"_lc :c +"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws - +"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) diff --git a/doc/src/fix_external.txt b/doc/src/fix_external.txt index 1dec226414c9f7e62b13b3d60a2f34efc6326ccd..dd7f7914e96f365db3d523578e88efa8068aee5d 100644 --- a/doc/src/fix_external.txt +++ b/doc/src/fix_external.txt @@ -34,7 +34,7 @@ This fix allows external programs that are running LAMMPS through its "library interface"_Howto_library.html to modify certain LAMMPS properties on specific timesteps, similar to the way other fixes do. The external driver can be a "C/C++ or Fortran -program"_Howto_library.html or a "Python script"_Python.html. +program"_Howto_library.html or a "Python script"_Python_head.html. :line diff --git a/doc/src/python.txt b/doc/src/python.txt index 0c0a203ccdbf479cc68d77c94a2740a1a51f0169..54d18d2f6069c8e23400b9fd10be83083006c54a 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -100,7 +100,7 @@ be passed to various commands as arguments, so that the variable is evaluated during a simulation run. A broader overview of how Python can be used with LAMMPS is given on -the "Python"_Python.html doc page. There is an examples/python +the "Python"_Python_head.html doc page. There is an examples/python directory which illustrates use of the python command. :line @@ -483,8 +483,8 @@ building LAMMPS. LAMMPS must also be built as a shared library and your Python function must be able to to load the Python module in python/lammps.py that wraps the LAMMPS library interface. These are the same steps required to use Python by itself to wrap LAMMPS. -Details on these steps are explained on the "Python"_Python.html doc -page. Note that it is important that the stand-alone LAMMPS +Details on these steps are explained on the "Python"_Python_head.html +doc page. Note that it is important that the stand-alone LAMMPS executable and the LAMMPS shared library be consistent (built from the same source code files) in order for this to work. If the two have been built at different times using different source files, problems diff --git a/lib/gpu/Install.py b/lib/gpu/Install.py index 3b12db509145422a44b4c1e69f9b93732cd4bd5f..d1024c0085eb230a004efce14c6a38227a6221a6 100644 --- a/lib/gpu/Install.py +++ b/lib/gpu/Install.py @@ -23,16 +23,17 @@ optionally copies Makefile.auto to a new Makefile.osuffix -m = use Makefile.machine as starting point, copy to Makefile.auto default machine = linux + default for -h, -a, -p, -e settings are those in -m Makefile -h = set CUDA_HOME variable in Makefile.auto to hdir hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda -a = set CUDA_ARCH variable in Makefile.auto to arch - use arch = 20 for Fermi (C2050/C2070, deprecated as of CUDA 8.0) - or GeForce GTX 580 or similar - use arch = 30 for Kepler (K10) - use arch = 35 for Kepler (K40) or GeForce GTX Titan or similar - use arch = 37 for Kepler (dual K80) - use arch = 60 for Pascal (P100) - use arch = 70 for Volta + use arch = sm_20 for Fermi (C2050/C2070, deprecated as of CUDA 8.0) + or GeForce GTX 580 or similar + use arch = sm_30 for Kepler (K10) + use arch = sm_35 for Kepler (K40) or GeForce GTX Titan or similar + use arch = sm_37 for Kepler (dual K80) + use arch = sm_60 for Pascal (P100) + use arch = sm_70 for Volta -p = set CUDA_PRECISION variable in Makefile.auto to precision use precision = double or mixed or single -e = set EXTRAMAKE variable in Makefile.auto to Makefile.lammps.esuffix @@ -47,7 +48,7 @@ Examples: make lib-gpu args="-b" # build GPU lib 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 -a 35 -p single -o mpi.mixed -b" # create new Makefile.mpi.mixed, also build GPU lib with these settings +make lib-gpu args="-m mpi -a sm_35 -p single -o mpi.mixed -b" # create new Makefile.mpi.mixed, also build GPU lib with these settings """ # print error message or help @@ -128,7 +129,7 @@ for line in lines: if hflag and words[0] == "CUDA_HOME" and words[1] == '=': line = line.replace(words[2],hdir) if aflag and words[0] == "CUDA_ARCH" and words[1] == '=': - line = line.replace(words[2],"-arch=sm_%s" % arch) + line = line.replace(words[2],"-arch=%s" % arch) if pflag and words[0] == "CUDA_PRECISION" and words[1] == '=': line = line.replace(words[2],precstr) if eflag and words[0] == "EXTRAMAKE" and words[1] == '=': diff --git a/lib/gpu/Makefile.linux b/lib/gpu/Makefile.linux index ed5b6092d3fdbd0c710ee94fe9ca4138cb369e89..9580bfd4ae32cfe68d094e04ed9e6cbb995551b5 100644 --- a/lib/gpu/Makefile.linux +++ b/lib/gpu/Makefile.linux @@ -13,8 +13,8 @@ endif NVCC = nvcc -# Tesla CUDA -CUDA_ARCH = -arch=sm_21 +# older CUDA +#CUDA_ARCH = -arch=sm_21 # newer CUDA #CUDA_ARCH = -arch=sm_13 # older CUDA