forked from lijiext/lammps
correct and improve typesetting for various sub-sub-subsections in "Getting started"
This commit is contained in:
parent
cf6f504977
commit
555a02786d
|
@ -79,7 +79,7 @@ This section has the following sub-sections:
|
|||
|
||||
:line
|
||||
|
||||
[{Read this first:}] :link(start_2_1)
|
||||
Read this first :h5,link(start_2_1)
|
||||
|
||||
If you want to avoid building LAMMPS yourself, read the preceeding
|
||||
section about options available for downloading and installing
|
||||
|
@ -148,9 +148,9 @@ include it in the LAMMPS distribution.
|
|||
|
||||
:line
|
||||
|
||||
[{Steps to build a LAMMPS executable:}] :link(start_2_2)
|
||||
Steps to build a LAMMPS executable :h5,link(start_2_2)
|
||||
|
||||
[Step 0]
|
||||
Step 0 :h6
|
||||
|
||||
The src directory contains the C++ source and header files for LAMMPS.
|
||||
It also contains a top-level Makefile and a MAKE sub-directory with
|
||||
|
@ -172,10 +172,12 @@ a list of available choices from src/MAKE and all of its
|
|||
sub-directories. If one of those has the options you want or is the
|
||||
machine you want, you can type a command like:
|
||||
|
||||
make mpi
|
||||
make mpi :pre
|
||||
or
|
||||
make serial_icc
|
||||
|
||||
make serial :pre
|
||||
or
|
||||
|
||||
gmake mac :pre
|
||||
|
||||
Note that the corresponding Makefile.machine can exist in src/MAKE or
|
||||
|
@ -189,14 +191,14 @@ Note that on a multi-processor or multi-core platform you can launch a
|
|||
parallel make, by using the "-j" switch with the make command, which
|
||||
will build LAMMPS more quickly.
|
||||
|
||||
If you get no errors and an executable like lmp_mpi or lmp_g++_serial
|
||||
or lmp_mac is produced, then you're done; it's your lucky day.
|
||||
If you get no errors and an executable like [lmp_mpi] or [lmp_serial]
|
||||
or [lmp_mac] is produced, then you're done; it's your lucky day.
|
||||
|
||||
Note that by default only a few of LAMMPS optional packages are
|
||||
installed. To build LAMMPS with optional packages, see "this
|
||||
section"_#start_3 below.
|
||||
|
||||
[Step 1]
|
||||
Step 1 :h6
|
||||
|
||||
If Step 0 did not work, you will need to create a low-level Makefile
|
||||
for your machine, like Makefile.foo. You should make a copy of an
|
||||
|
@ -207,13 +209,13 @@ the first line, the "compiler/linker settings" section, and the
|
|||
file in src/MAKE/MINE and it will not be altered by any future LAMMPS
|
||||
updates.
|
||||
|
||||
[Step 2]
|
||||
Step 2 :h6
|
||||
|
||||
Change the first line of Makefile.foo to list the word "foo" after the
|
||||
"#", and whatever other options it will set. This is the line you
|
||||
will see if you just type "make".
|
||||
|
||||
[Step 3]
|
||||
Step 3 :h6
|
||||
|
||||
The "compiler/linker settings" section lists compiler and linker
|
||||
settings for your C++ compiler, including optimization flags. You can
|
||||
|
@ -242,7 +244,7 @@ first time on a new platform, a long list of *.d files will be printed
|
|||
out rapidly. This is not an error; it is the Makefile doing its
|
||||
normal creation of dependencies.
|
||||
|
||||
[Step 4]
|
||||
Step 4 :h6
|
||||
|
||||
The "system-specific settings" section has several parts. Note that
|
||||
if you change any -D setting in this section, you should do a full
|
||||
|
@ -349,7 +351,7 @@ platforms. The -DPACK_ARRAY setting is the default. See the
|
|||
"kspace_style"_kspace_style.html command for info about PPPM. See
|
||||
Step 6 below for info about building LAMMPS with an FFT library.
|
||||
|
||||
[Step 5]
|
||||
Step 5 :h6
|
||||
|
||||
The 3 MPI variables are used to specify an MPI library to build LAMMPS
|
||||
with. Note that you do not need to set these if you use the MPI
|
||||
|
@ -405,7 +407,7 @@ Note that the ANSI-standard function clock() rolls over after an hour
|
|||
or so, and is therefore insufficient for timing long LAMMPS
|
||||
simulations.
|
||||
|
||||
[Step 6]
|
||||
Step 6 :h6
|
||||
|
||||
The 3 FFT variables allow you to specify an FFT library which LAMMPS
|
||||
uses (for performing 1d FFTs) when running the particle-particle
|
||||
|
@ -458,7 +460,7 @@ accuracy for reduced memory use and parallel communication costs for
|
|||
transposing 3d FFT data. Note that single precision FFTs have only
|
||||
been tested with the FFTW3, FFTW2, MKL, and KISS FFT options.
|
||||
|
||||
[Step 7]
|
||||
Step 7 :h6
|
||||
|
||||
The 3 JPG variables allow you to specify a JPEG and/or PNG library
|
||||
which LAMMPS uses when writing out JPEG or PNG files via the "dump
|
||||
|
@ -481,13 +483,13 @@ find it.
|
|||
As before, if these header and library files are in the usual place on
|
||||
your machine, you may not need to set these variables.
|
||||
|
||||
[Step 8]
|
||||
Step 8 :h6
|
||||
|
||||
Note that by default only a few of LAMMPS optional packages are
|
||||
installed. To build LAMMPS with optional packages, see "this
|
||||
section"_#start_3 below, before proceeding to Step 9.
|
||||
|
||||
[Step 9]
|
||||
Step 9 :h6
|
||||
|
||||
That's it. Once you have a correct Makefile.foo, and you have
|
||||
pre-built any other needed libraries (e.g. MPI, FFT, etc) all you need
|
||||
|
@ -506,7 +508,7 @@ You should get the executable lmp_foo when the build is complete.
|
|||
|
||||
:line
|
||||
|
||||
[{Errors that can occur when making LAMMPS:}] :link(start_2_3)
|
||||
Errors that can occur when making LAMMPS: h5 :link(start_2_3)
|
||||
|
||||
NOTE: If an error occurs when building LAMMPS, the compiler or linker
|
||||
will state very explicitly what the problem is. The error message
|
||||
|
@ -543,22 +545,22 @@ above in Step 4.
|
|||
|
||||
:line
|
||||
|
||||
[{Additional build tips:}] :link(start_2_4)
|
||||
Additional build tips :h5,link(start_2_4)
|
||||
|
||||
(1) Building LAMMPS for multiple platforms.
|
||||
Building LAMMPS for multiple platforms. :h6
|
||||
|
||||
You can make LAMMPS for multiple platforms from the same src
|
||||
directory. Each target creates its own object sub-directory called
|
||||
Obj_target where it stores the system-specific *.o files.
|
||||
|
||||
(2) Cleaning up.
|
||||
Cleaning up. :h6
|
||||
|
||||
Typing "make clean-all" or "make clean-machine" will delete *.o object
|
||||
files created when LAMMPS is built, for either all builds or for a
|
||||
particular machine.
|
||||
|
||||
(3) Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
|
||||
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL
|
||||
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
|
||||
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
|
||||
|
||||
As explained above, any of these 3 settings can be specified on the
|
||||
LMP_INC line in your low-level src/MAKE/Makefile.foo.
|
||||
|
@ -608,14 +610,14 @@ neighbor lists and would run very slowly in terms of CPU secs/timestep.
|
|||
|
||||
:line
|
||||
|
||||
Building for a Mac :h5 :link(start_2_5)
|
||||
Building for a Mac :h5,link(start_2_5)
|
||||
|
||||
OS X is BSD Unix, so it should just work. See the
|
||||
src/MAKE/MACHINES/Makefile.mac and Makefile.mac_mpi files.
|
||||
|
||||
:line
|
||||
|
||||
Building for Windows :h5 :link(start_2_6)
|
||||
Building for Windows :h5,link(start_2_6)
|
||||
|
||||
If you want to build a Windows version of LAMMPS, you can build it
|
||||
yourself, but it may require some effort. LAMMPS expects a Unix-like
|
||||
|
@ -664,7 +666,7 @@ Makefile.machine to add settings needed by some packages.
|
|||
|
||||
:line
|
||||
|
||||
[{Package basics:}] :link(start_3_1)
|
||||
Package basics: :h5,link(start_3_1)
|
||||
|
||||
The source code for LAMMPS is structured as a set of core files which
|
||||
are always included, plus optional packages. Packages are groups of
|
||||
|
@ -718,7 +720,7 @@ files or either a standard or user-contributed package are given in
|
|||
|
||||
:line
|
||||
|
||||
[{Including/excluding packages:}] :link(start_3_2)
|
||||
Including/excluding packages :h5,link(start_3_2)
|
||||
|
||||
To use (or not use) a package you must include it (or exclude it)
|
||||
before building LAMMPS. From the src directory, this is typically as
|
||||
|
@ -792,7 +794,7 @@ package-related make options.
|
|||
|
||||
:line
|
||||
|
||||
[{Packages that require extra libraries:}] :link(start_3_3)
|
||||
Packages that require extra libraries :h5,link(start_3_3)
|
||||
|
||||
A few of the standard and user packages require additional auxiliary
|
||||
libraries. Many of them are provided with LAMMPS, in which case they
|
||||
|
@ -877,7 +879,7 @@ the LAMMPS build will typically fail.
|
|||
|
||||
:line
|
||||
|
||||
[{Packages that require Makefile.machine settings}] :link(start_3_4)
|
||||
Packages that require Makefile.machine settings :h5,link(start_3_4)
|
||||
|
||||
A few packages require specific settings in Makefile.machine, to
|
||||
either build or use the package effectively. These are the
|
||||
|
@ -1037,7 +1039,7 @@ then be called from another application or a scripting language. See
|
|||
LAMMPS to other codes. See "this section"_Section_python.html for
|
||||
more info on wrapping and running LAMMPS from Python.
|
||||
|
||||
[Static library:] :h5
|
||||
Static library :h5
|
||||
|
||||
To build LAMMPS as a static library (*.a file on Linux), type
|
||||
|
||||
|
@ -1051,7 +1053,7 @@ will create the file liblammps_foo.a which another application can
|
|||
link to. It will also create a soft link liblammps.a, which will
|
||||
point to the most recently built static library.
|
||||
|
||||
[Shared library:] :h5
|
||||
Shared library :h5
|
||||
|
||||
To build LAMMPS as a shared library (*.so file on Linux), which can be
|
||||
dynamically loaded, e.g. from Python, type
|
||||
|
@ -1123,7 +1125,7 @@ For the csh or tcsh shells, you would add something like this to your
|
|||
|
||||
setenv LD_LIBRARY_PATH $\{LD_LIBRARY_PATH\}:/home/sjplimp/lammps/src :pre
|
||||
|
||||
[Calling the LAMMPS library:] :h5
|
||||
Calling the LAMMPS library :h5
|
||||
|
||||
Either flavor of library (static or shared) allows one or more LAMMPS
|
||||
objects to be instantiated from the calling program.
|
||||
|
|
Loading…
Reference in New Issue