change Python.txt to Python_head.txt, adapt GPU package syntax
This commit is contained in:
@ -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
|
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
|
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
|
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
|
simply a wrapper on a real compiler. The underlying compiler info is
|
||||||
also in the Cmake output. You should check to insure you are using
|
what will be listed in the CMake output. You should check to insure
|
||||||
the compiler and optimization flags are the ones you want.
|
you are using the compiler and optimization flags are the ones you
|
||||||
|
want.
|
||||||
|
|
||||||
[Makefile.machine settings]:
|
[Makefile.machine settings]:
|
||||||
|
|
||||||
|
|||||||
@ -84,12 +84,22 @@ which GPU hardware to build for.
|
|||||||
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
|
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
|
||||||
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
|
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
|
||||||
-D GPU_ARCH=value # hardware choice for GPU_API=cuda
|
-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)
|
# value = sm_XX, see below
|
||||||
# default is Cuda-compiler dependent, but typically Fermi
|
# default is Cuda-compiler dependent, but typically sm_20
|
||||||
-D CUDPP_OPT=value # optimization setting for GPU_API=cudea
|
-D CUDPP_OPT=value # optimization setting for GPU_API=cudea
|
||||||
# enables CUDA Performance Primitives Optimizations
|
# enables CUDA Performance Primitives Optimizations
|
||||||
# yes (default) or no :pre
|
# 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]:
|
[Traditional make]:
|
||||||
|
|
||||||
Before building LAMMPS, you must build the GPU library in lib/gpu.
|
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 # print help message
|
||||||
make lib-gpu args="-b" # build GPU library with default Makefile.linux
|
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 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
|
Note that this procedure starts with a Makefile.machine in lib/gpu, as
|
||||||
specified by the "-m" switch. For your convenience, machine makefiles
|
specified by the "-m" switch. For your convenience, machine makefiles
|
||||||
for "mpi" and "serial" are provided, which have the same settings as
|
for "mpi" and "serial" are provided, which have the same settings as
|
||||||
the corresponding machine makefiles in the main LAMMPS source
|
the corresponding machine makefiles in the main LAMMPS source
|
||||||
folder. In addition you can alter 4 important settings in the
|
folder. In addition you can alter 4 important settings in the
|
||||||
Makefile.machine you start from via the -h, -a, -p, -e switches, and
|
Makefile.machine you start from via the corresponding -h, -a, -p, -e
|
||||||
also save a copy of the new Makefile if desired:
|
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_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)
|
CUDA_PRECISION = precision (double, mixed, single)
|
||||||
EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul
|
EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul
|
||||||
|
|
||||||
|
|||||||
@ -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
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next
|
||||||
Section"_Manual.html :c
|
Section"_Manual.html :c
|
||||||
|
|
||||||
|
|||||||
@ -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
|
create one (or more) "instances" of LAMMPS, pass it an input script to
|
||||||
process, or execute individual commands, all by invoking the correct
|
process, or execute individual commands, all by invoking the correct
|
||||||
class methods in LAMMPS. From C or Fortran you can make function
|
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
|
calls to do the same things. See the "Python"_Python_head.html doc
|
||||||
for a description of the Python wrapper provided with LAMMPS that
|
pages for a description of the Python wrapper provided with LAMMPS
|
||||||
operates through the LAMMPS library interface.
|
that operates through the LAMMPS library interface.
|
||||||
|
|
||||||
The files src/library.cpp and library.h contain the C-style 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
|
to LAMMPS. See the "Howto library"_Howto_library.html doc page for a
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Library interface to LAMMPS :h3
|
|||||||
As described on the "Build basics"_Build_basics.html doc page, LAMMPS
|
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,
|
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
|
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
|
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
|
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
|
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
|
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
|
src/library.h, as well as to the "Python interface"_Python_head.html.
|
||||||
added functions can access or change any internal LAMMPS data you
|
The added functions can access or change any internal LAMMPS data you
|
||||||
wish.
|
wish.
|
||||||
|
|
||||||
void lammps_open(int, char **, MPI_Comm, void **)
|
void lammps_open(int, char **, MPI_Comm, void **)
|
||||||
|
|||||||
@ -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
|
the library interface is provided. Thus, GUI interfaces can be
|
||||||
written in Python (or C or C++ if desired) that run LAMMPS and
|
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
|
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
|
page. :ulb,l
|
||||||
|
|
||||||
Builder: Several pre-processing tools are packaged with LAMMPS. Some
|
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
|
visualization packages that can use LAMMPS output data. :l
|
||||||
|
|
||||||
Plotting: See the next bullet about Pizza.py as well as the
|
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
|
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
|
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
|
analyze and plot. See the "Tools"_Tools.html doc page for more
|
||||||
|
|||||||
@ -47,9 +47,9 @@ all LAMMPS development is coordinated.
|
|||||||
"PDF file"_Manual.pdf of the entire manual, generated by
|
"PDF file"_Manual.pdf of the entire manual, generated by
|
||||||
"htmldoc"_http://freecode.com/projects/htmldoc
|
"htmldoc"_http://freecode.com/projects/htmldoc
|
||||||
|
|
||||||
The content for this manual is part of the LAMMPS distribution.
|
The content for this manual is part of the LAMMPS distribution. You
|
||||||
You can build a local copy of the Manual as HTML pages or a PDF file,
|
can build a local copy of the Manual as HTML pages or a PDF file, by
|
||||||
by following the steps on the "this page"_Manual_build.html.
|
following the steps on the "Manual build"_Manual_build.html doc page.
|
||||||
|
|
||||||
There is also a "Developer.pdf"_Developer.pdf document which gives
|
There is also a "Developer.pdf"_Developer.pdf document which gives
|
||||||
a brief description of the basic code structure of LAMMPS.
|
a brief description of the basic code structure of LAMMPS.
|
||||||
@ -82,7 +82,7 @@ every LAMMPS command.
|
|||||||
Examples
|
Examples
|
||||||
Tools
|
Tools
|
||||||
Modify
|
Modify
|
||||||
Python
|
Python_head
|
||||||
Errors
|
Errors
|
||||||
Manual_build
|
Manual_build
|
||||||
|
|
||||||
@ -120,8 +120,9 @@ END_RST -->
|
|||||||
"Example scripts"_Examples.html :l
|
"Example scripts"_Examples.html :l
|
||||||
"Auxiliary tools"_Tools.html :l
|
"Auxiliary tools"_Tools.html :l
|
||||||
"Modify & extend LAMMPS"_Modify.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
|
"Errors"_Errors.html :l
|
||||||
|
"Building the LAMMPS manual"_Manual_build.html :l
|
||||||
:ole
|
:ole
|
||||||
|
|
||||||
<!-- END_HTML_ONLY -->
|
<!-- END_HTML_ONLY -->
|
||||||
|
|||||||
@ -8,7 +8,7 @@ Section"_Manual.html :c
|
|||||||
|
|
||||||
:line
|
:line
|
||||||
|
|
||||||
Building the LAMMPS Manual :h2
|
Building the LAMMPS manual :h2
|
||||||
|
|
||||||
Depending on how you obtained LAMMPS, the doc directory has
|
Depending on how you obtained LAMMPS, the doc directory has
|
||||||
2 or 3 sub-directories and optionally 2 PDF files and an ePUB file:
|
2 or 3 sub-directories and optionally 2 PDF files and an ePUB file:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
"Previous Section"_Tools.html - "LAMMPS WWW Site"_lws -
|
"Previous Section"_Tools.html - "LAMMPS WWW Site"_lws -
|
||||||
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next
|
||||||
Section"_Python.html :c
|
Section"_Python_head.html :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -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
|
from a LAMMPS input script. The code can be in a separate file or
|
||||||
embedded in the input script itself. See the "Python
|
embedded in the input script itself. See the "Python
|
||||||
call"_Python_call.html doc page for an overview of using Python from
|
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
|
LAMMPS in this manner and all the "Python"_Python_head.html doc pages
|
||||||
other ways to use LAMMPS and Python together.
|
for other ways to use LAMMPS and Python together.
|
||||||
|
|
||||||
NOTE: Building with the PYTHON package assumes you have a Python
|
NOTE: Building with the PYTHON package assumes you have a Python
|
||||||
shared library available on your system, which needs to be a Python 2
|
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:]
|
[Supporting info:]
|
||||||
|
|
||||||
src/PYTHON: filenames -> commands
|
src/PYTHON: filenames -> commands
|
||||||
"Python call"_Python.html
|
"Python call"_Python_head.html
|
||||||
lib/python/README
|
lib/python/README
|
||||||
examples/python :ul
|
examples/python :ul
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"Higher level section"_Python.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
"Higher level section"_Python_head.html - "LAMMPS WWW Site"_lws -
|
||||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
:link(lws,http://lammps.sandia.gov)
|
||||||
:link(ld,Manual.html)
|
:link(ld,Manual.html)
|
||||||
|
|||||||
@ -34,7 +34,7 @@ This fix allows external programs that are running LAMMPS through its
|
|||||||
"library interface"_Howto_library.html to modify certain LAMMPS
|
"library interface"_Howto_library.html to modify certain LAMMPS
|
||||||
properties on specific timesteps, similar to the way other fixes do.
|
properties on specific timesteps, similar to the way other fixes do.
|
||||||
The external driver can be a "C/C++ or Fortran
|
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
|
:line
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,7 @@ be passed to various commands as arguments, so that the variable is
|
|||||||
evaluated during a simulation run.
|
evaluated during a simulation run.
|
||||||
|
|
||||||
A broader overview of how Python can be used with LAMMPS is given on
|
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.
|
directory which illustrates use of the python command.
|
||||||
|
|
||||||
:line
|
: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
|
your Python function must be able to to load the Python module in
|
||||||
python/lammps.py that wraps the LAMMPS library interface. These are
|
python/lammps.py that wraps the LAMMPS library interface. These are
|
||||||
the same steps required to use Python by itself to wrap LAMMPS.
|
the same steps required to use Python by itself to wrap LAMMPS.
|
||||||
Details on these steps are explained on the "Python"_Python.html doc
|
Details on these steps are explained on the "Python"_Python_head.html
|
||||||
page. Note that it is important that the stand-alone LAMMPS
|
doc page. Note that it is important that the stand-alone LAMMPS
|
||||||
executable and the LAMMPS shared library be consistent (built from the
|
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
|
same source code files) in order for this to work. If the two have
|
||||||
been built at different times using different source files, problems
|
been built at different times using different source files, problems
|
||||||
|
|||||||
@ -23,16 +23,17 @@ optionally copies Makefile.auto to a new Makefile.osuffix
|
|||||||
|
|
||||||
-m = use Makefile.machine as starting point, copy to Makefile.auto
|
-m = use Makefile.machine as starting point, copy to Makefile.auto
|
||||||
default machine = linux
|
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
|
-h = set CUDA_HOME variable in Makefile.auto to hdir
|
||||||
hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda
|
hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda
|
||||||
-a = set CUDA_ARCH variable in Makefile.auto to arch
|
-a = set CUDA_ARCH variable in Makefile.auto to arch
|
||||||
use arch = 20 for Fermi (C2050/C2070, deprecated as of CUDA 8.0)
|
use arch = sm_20 for Fermi (C2050/C2070, deprecated as of CUDA 8.0)
|
||||||
or GeForce GTX 580 or similar
|
or GeForce GTX 580 or similar
|
||||||
use arch = 30 for Kepler (K10)
|
use arch = sm_30 for Kepler (K10)
|
||||||
use arch = 35 for Kepler (K40) or GeForce GTX Titan or similar
|
use arch = sm_35 for Kepler (K40) or GeForce GTX Titan or similar
|
||||||
use arch = 37 for Kepler (dual K80)
|
use arch = sm_37 for Kepler (dual K80)
|
||||||
use arch = 60 for Pascal (P100)
|
use arch = sm_60 for Pascal (P100)
|
||||||
use arch = 70 for Volta
|
use arch = sm_70 for Volta
|
||||||
-p = set CUDA_PRECISION variable in Makefile.auto to precision
|
-p = set CUDA_PRECISION variable in Makefile.auto to precision
|
||||||
use precision = double or mixed or single
|
use precision = double or mixed or single
|
||||||
-e = set EXTRAMAKE variable in Makefile.auto to Makefile.lammps.esuffix
|
-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="-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 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
|
# print error message or help
|
||||||
@ -128,7 +129,7 @@ for line in lines:
|
|||||||
if hflag and words[0] == "CUDA_HOME" and words[1] == '=':
|
if hflag and words[0] == "CUDA_HOME" and words[1] == '=':
|
||||||
line = line.replace(words[2],hdir)
|
line = line.replace(words[2],hdir)
|
||||||
if aflag and words[0] == "CUDA_ARCH" and words[1] == '=':
|
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] == '=':
|
if pflag and words[0] == "CUDA_PRECISION" and words[1] == '=':
|
||||||
line = line.replace(words[2],precstr)
|
line = line.replace(words[2],precstr)
|
||||||
if eflag and words[0] == "EXTRAMAKE" and words[1] == '=':
|
if eflag and words[0] == "EXTRAMAKE" and words[1] == '=':
|
||||||
|
|||||||
@ -13,8 +13,8 @@ endif
|
|||||||
|
|
||||||
NVCC = nvcc
|
NVCC = nvcc
|
||||||
|
|
||||||
# Tesla CUDA
|
# older CUDA
|
||||||
CUDA_ARCH = -arch=sm_21
|
#CUDA_ARCH = -arch=sm_21
|
||||||
# newer CUDA
|
# newer CUDA
|
||||||
#CUDA_ARCH = -arch=sm_13
|
#CUDA_ARCH = -arch=sm_13
|
||||||
# older CUDA
|
# older CUDA
|
||||||
|
|||||||
Reference in New Issue
Block a user